Skip to content

Add Allowed() and Denied() methods to Decision alias type#1

Open
JoshuaWilkes wants to merge 1 commit into
mainfrom
JoshuaWilkes-patch-1
Open

Add Allowed() and Denied() methods to Decision alias type#1
JoshuaWilkes wants to merge 1 commit into
mainfrom
JoshuaWilkes-patch-1

Conversation

@JoshuaWilkes

Copy link
Copy Markdown
Owner

Adds Allowed() and Denied() methods to the Decision type to allow for less verbose handling of authorization results.

result, _ := policyset.IsAuthorized(entities, request)
if result.Allowed() {
    // do thing
}

Adds Allowed() and Denied() methods to the Decision type to allow for less verbose handling of authorization results.

```
result, _ := policyset.IsAuthorized(entities, request)
if result.Allowed() {
    // do thing
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant