Skip to content

Restrict certain permissions by subject type - #1233

Merged
FrederikBolding merged 9 commits into
mainfrom
fb/restrict-certain-permissions-by-type
Apr 20, 2023
Merged

Restrict certain permissions by subject type#1233
FrederikBolding merged 9 commits into
mainfrom
fb/restrict-certain-permissions-by-type

Conversation

@FrederikBolding

@FrederikBoldingFrederikBolding commented Apr 20, 2023

Copy link
Copy Markdown
Member

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

Comment threadpackages/permission-controller/src/PermissionController.ts Outdated
@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 ownerApril 20, 2023 12:14
Mrtenz
Mrtenz previously approved these changes Apr 20, 2023
Comment threadpackages/permission-controller/src/PermissionController.ts Outdated
GuillaumeRx
GuillaumeRx previously approved these changes Apr 20, 2023
Comment threadpackages/permission-controller/src/Permission.ts Outdated
Comment threadpackages/permission-controller/src/PermissionController.ts Outdated
@Gudahtt

Copy link
Copy Markdown
Member

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

@FrederikBolding
FrederikBolding dismissed stale reviews from GuillaumeRx and Mrtenz via 4eda1ecApril 20, 2023 12:34
@FrederikBolding
FrederikBoldingforce-pushed the fb/restrict-certain-permissions-by-type branch from 4eda1ec to db6d1c6CompareApril 20, 2023 13:05
@FrederikBolding
FrederikBolding merged commit b7f8a52 into mainApr 20, 2023
@FrederikBolding
FrederikBolding deleted the fb/restrict-certain-permissions-by-type branch April 20, 2023 14:06
@legobeatlegobeat mentioned this pull request Apr 25, 2023
Sign up for freeto 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.

4 participants

@FrederikBolding@Gudahtt@Mrtenz@GuillaumeRx