Skip to content

Commit

Permalink
Merge pull request #39 from strongdm/project-types
Browse files Browse the repository at this point in the history
cedar: project public types, constructors, and constants from the types package through the cedar package for convenience
  • Loading branch information
patjakdev authored Sep 19, 2024
2 parents 055335e + 3dac321 commit 981a06d
Show file tree
Hide file tree
Showing 10 changed files with 376 additions and 275 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ While in development (0.x.y), each tagged release may contain breaking changes.
### New features in 0.4.0

- `types.Set` is now implemented as a hash set, turning `Set.Contains()` into an O(1) operation, on average. This mitigates a worst case quadratic runtime for the evaluation of the `containsAny()` operator.
- For convenience, public types, constructors, and constants from the `types` package are now exported via the `cedar` package as well.

### Upgrading from 0.3.x to 0.4.x

Expand Down
2 changes: 1 addition & 1 deletion authorize.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (

// IsAuthorized uses the combination of the PolicySet and Entities to determine
// if the given Request to determine Decision and Diagnostic.
func (p PolicySet) IsAuthorized(entityMap types.Entities, req Request) (Decision, Diagnostic) {
func (p PolicySet) IsAuthorized(entityMap Entities, req Request) (Decision, Diagnostic) {
c := eval.InitEnv(&eval.Env{
Entities: entityMap,
Principal: req.Principal,
Expand Down
Loading

0 comments on commit 981a06d

Please sign in to comment.