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

Enhance Permission Management with Simplified setAllPermissions Method in AccessController #127

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

kingster-will
Copy link

Description

This PR introduces a new method, setAllPermissions, to the AccessController. The existing setPermission function provides comprehensive functionality with the capability to set permissions at a granular level.

The new setAllPermissions function simplifies permission settings by reducing the parameters required, focusing solely on full permissions across all modules and functions. This method is designed to be user-friendly and reduces the risk of configuration errors, making it ideal for scenarios where complete delegation of control is necessary.

  1. Introduction of setAllPermissions Function: Allows users to grant all permissions associated with an IPAccount to another address (signer) through a straightforward interface, using only three parameters: the IPAccount address, the delegate signer address, and the permission level.

  2. Extended Test Coverage: Added tests to validate the functionality of setAllPermissions in various scenarios, ensuring that it behaves as expected without affecting the granular control provided by setPermission.

Test Plan

  1. Deploy the updated AccessController contract.
  2. Use the setAllPermissions function to assign comprehensive permissions to a test address.
  3. Confirm that the test address has appropriate access across all functions and modules.
  4. Verify that no permissions can be set outside the intended scope, ensuring safety against misconfiguration.

Related Issue

Closes #122

Copy link

@jdubpark jdubpark left a comment

Choose a reason for hiding this comment

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

LGTM, AccessController test file is too big though.

@LeoHChen LeoHChen merged commit b30f131 into storyprotocol:main Apr 19, 2024
3 checks passed
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.

Enhance AccessController with setAllPermissions Function for Bulk Permission Delegation
3 participants