⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Refactor GatorPermissionsController for simplification and improved permission storage#7847

Draft
jeffsmale90 wants to merge 1 commit intomainfrom
feat/refactor-gator-permissions-controller
Draft

Refactor GatorPermissionsController for simplification and improved permission storage#7847
jeffsmale90 wants to merge 1 commit intomainfrom
feat/refactor-gator-permissions-controller

Conversation

@jeffsmale90
Copy link
Contributor

…ermission storage

  • Replace gatorPermissionsMapSerialized state with grantedPermissions array (PermissionInfoWithMetadata[])
  • Change GatorPermissionsController constructor to accept config object
  • Replaced isGatorPermissionsEnabled with enabledPermissionTypes property and removed related GatorPermissionsNotEnabledError
  • Updated fetchAndUpdateGatorPermissions to be parameterless
  • Replace getPendingRevocations with isPendingRevocation(permissionContext); as an interim change to moving revocation entirely internal to the controller
  • Add executeSnapRpc utility function to handle Snap RPC requests
  • Drop custom permission support from types, mocks, and mock tests
  • Add test coverage for specific controller error types

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

…ermission storage

- Replace `gatorPermissionsMapSerialized` state with `grantedPermissions` array (`PermissionInfoWithMetadata[]`)
- Change `GatorPermissionsController` constructor to accept `config` object
- Replaced `isGatorPermissionsEnabled` with `enabledPermissionTypes` property and removed related `GatorPermissionsNotEnabledError`
- Updated `fetchAndUpdateGatorPermissions` to be parameterless
- Replace `getPendingRevocations` with `isPendingRevocation(permissionContext);` as an interim change to moving revocation entirely internal to the controller
- Add `executeSnapRpc` utility function to handle Snap RPC requests
- Drop custom permission support from types, mocks, and mock tests
- Add test coverage for specific controller error types
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