Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: replace authorizer.Allowed method with PermissionSet #17959

Merged
merged 2 commits into from
May 13, 2020

Conversation

GeorgeMac
Copy link
Contributor

@GeorgeMac GeorgeMac commented May 5, 2020

This is a proposal to change the shape of the Authorizer interface.
Each of our authorizers use a slice of Permissions to evaluate whether a single supplied permission is allowed. This changes that contract to simply return the set of permissions and allow the consumer to validate them itself. The Allowed method still exists, though now it just exists on the new type PermissionSet which is the slice of Permissions.

One advantage of this will be the ability to derive from an authorizer which organizations the authorizer has access to read or write without going via a URM service.

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

@GeorgeMac GeorgeMac changed the title refactor!: replace Allow method with PermissionSet refactor!: replace authorizer.Allowed method with PermissionSet May 5, 2020
@GeorgeMac GeorgeMac requested a review from a team May 5, 2020 14:16
@GeorgeMac GeorgeMac force-pushed the gm/authorizer-permission-set branch 3 times, most recently from 9764fc5 to bca38fd Compare May 5, 2020 16:12
@GeorgeMac GeorgeMac force-pushed the gm/authorizer-permission-set branch from bca38fd to a60a554 Compare May 13, 2020 11:00
@GeorgeMac GeorgeMac merged commit f646653 into master May 13, 2020
@GeorgeMac GeorgeMac deleted the gm/authorizer-permission-set branch May 13, 2020 11:27
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.

None yet

3 participants