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.
Functionality
This PR adds privilege levels (similar to the existing ones on Snapshot).
The different levels are:
proposal validation strategy
metadata_uri
renounceOwnership
,transferOwnership
, and grant admin privilege.--
Adds a new function :
function grantPrivilege(address user, PrivilegeLevel level)
. Can be used to revoke a role by callinggrantPrivilege(user, PrivilegeLevel.None)
Adds an event
PrivilegeChanged(address user, PrivilegeLevel level)
--
Renames
ISpaceOwnerActions
toISpacePrivilegedActions
--
Implements
transferOwnership
andrenounceOwnership
instead of using the default OZ one : this is because theController
role needs to be updated whenever theowner
role needs to be updated. TheController
role is a special role because it kind of overlaps withowner
from the OZOwnable
lib. This is done to ensure a space controler doesn't mistakenly delete renounce ownership (he must callrenounceOwnership
in order to properly renounce).Costs
This change should not increase the cost of voting.
It should decrease the code of proposing for every role because the call will skip calling the proposal validation strategy
Tests
List of tests added:
Controller
Controller