Skip to content

PermissionController 2.0 - #132

Merged
rekmarks merged 25 commits into
mainfrom
permissions-controller-v2-PR2
Nov 23, 2021
Merged

rekmarks merged 25 commits into
mainfrom
permissions-controller-v2-PR2

Conversation

@rekmarks

Copy link
Copy Markdown
Contributor

The permission system 2.0. See the README for details, and this PR on metamask-extension for what actually using it looks like.

Ref: MetaMask/rpc-cap#133

Supersedes #28

@rekmarks rekmarks mentioned this pull request Nov 11, 2021
@rekmarks
rekmarks requested a review from Gudahtt November 11, 2021 20:58
Comment thread packages/controllers/src/permissions/Permission.ts
@rekmarks
rekmarks force-pushed the permissions-controller-v2-PR2 branch from 814429d to cd37424 Compare November 17, 2021 03:50
Comment thread packages/controllers/src/snaps/index.ts
Comment thread packages/controllers/src/permissions/rpc-methods/requestPermissions.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.ts Outdated
Comment thread packages/controllers/src/permissions/permission-middleware.ts
Comment thread packages/controllers/src/permissions/Caveat.test.ts Outdated
Comment thread packages/controllers/src/permissions/Caveat.test.ts Outdated
Comment thread packages/controllers/src/permissions/Permission.test.ts
Comment thread packages/controllers/src/permissions/Caveat.test.ts Outdated
Comment thread packages/controllers/src/permissions/Permission.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated
Comment thread packages/controllers/src/permissions/PermissionController.test.ts
Comment thread packages/controllers/src/permissions/PermissionController.test.ts Outdated

@Gudahtt Gudahtt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are fantastic! I've just finished reviewing everything. Ready to approve when all outstanding comments have been addressed.

@rekmarks
rekmarks requested a review from Gudahtt November 23, 2021 23:43
Gudahtt
Gudahtt previously approved these changes Nov 23, 2021

@Gudahtt Gudahtt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rekmarks
rekmarks merged commit 76b6b0d into main Nov 23, 2021
@rekmarks
rekmarks deleted the permissions-controller-v2-PR2 branch November 23, 2021 23:53
rekmarks added a commit that referenced this pull request Dec 8, 2021
Following #132, restricted methods can no longer be bound to the requesting origin. Instead, they receive a single object parameter with an object property `context`, which in turn has a string property `origin` that identifies the the subject that made the request.

This PR ensures that all restricted method hooks use `context.origin` where necessary instead of assuming that they are bound to the requesting origin.
rekmarks added a commit that referenced this pull request Dec 10, 2021
Following #132, restricted methods can no longer be bound to the requesting origin. Instead, they receive a single object parameter with an object property `context`, which in turn has a string property `origin` that identifies the the subject that made the request.

This PR ensures that all restricted method hooks use `context.origin` where necessary instead of assuming that they are bound to the requesting origin.
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.

2 participants