Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Apr 20, 2023

Description

Adds a subjectTypes field to permission specifications, allowing certain permissions to be limited to access from certain subject types.

If a request for permissions is made from a non-matching subject type we throw a method or endowment not found error.

Changes

  • Added: Added subjectTypes field to permission specifications
    • This field can be used to limit which subject types can request a given permission

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation for new or updated code as appropriate (note: this will usually be JSDoc)
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@FrederikBolding FrederikBolding marked this pull request as ready for review April 20, 2023 12:14
@FrederikBolding FrederikBolding requested a review from a team as a code owner April 20, 2023 12:14
Mrtenz
Mrtenz previously approved these changes Apr 20, 2023
GuillaumeRx
GuillaumeRx previously approved these changes Apr 20, 2023
@Gudahtt
Copy link
Member

Gudahtt commented Apr 20, 2023

Looks great! Good catch. I can approve after we get CI passing

@FrederikBolding FrederikBolding dismissed stale reviews from GuillaumeRx and Mrtenz via 4eda1ec April 20, 2023 12:34
@FrederikBolding FrederikBolding force-pushed the fb/restrict-certain-permissions-by-type branch from 4eda1ec to db6d1c6 Compare April 20, 2023 13:05
@FrederikBolding FrederikBolding merged commit b7f8a52 into main Apr 20, 2023
@FrederikBolding FrederikBolding deleted the fb/restrict-certain-permissions-by-type branch April 20, 2023 14:06
@legobeat legobeat mentioned this pull request Apr 25, 2023
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* Restrict certain permissions by subject type

* Move logic to validation function

* Add tests

* Address a PR comment

* Expanded comment

* Address PR comments

* Fix import

* Fix lint
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* Restrict certain permissions by subject type

* Move logic to validation function

* Add tests

* Address a PR comment

* Expanded comment

* Address PR comments

* Fix import

* Fix lint
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.

5 participants