Enhance Permission Management with Simplified setAllPermissions
Method in AccessController
#127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.Introduction of
setAllPermissions
Function: Allows users to grant all permissions associated with anIPAccount
to another address (signer) through a straightforward interface, using only three parameters: theIPAccount
address, the delegatesigner
address, and thepermission
level.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
AccessController
contract.setAllPermissions
function to assign comprehensive permissions to a test address.Related Issue
Closes #122