aragonOS icon indicating copy to clipboard operation
aragonOS copied to clipboard

Setting permissionManager to ANY_ENTITY is equivalent to setting it to BURN_ENTITY

Open ewingrj opened this issue 5 years ago • 1 comments

This is a bit confusing, but once you set a manager to ANY_ENTITY, there is no was to change the manager, or add/revoke permissions.

Setting the manager to ANY_ENTITY should either throw, or update the onlyPermissionManager modifier to handle ANY_ENTITY correctly

ewingrj avatar Oct 26 '18 14:10 ewingrj

I think the biggest part of this confusion is due to how these variables are named. ANY_ENTITY should've really been named ALL_ALLOWED and BURN_ENTITY as BURN_MANAGER. These two particular constants are not meant to be mixed (one is for permissions and the other for managers).

In this case, as an ANY_ENTITY permission manager doesn't really make much sense, and throwing in this particular case seems like an abstraction leak, I think the best solution is to provide documentation and give notice that these constants' names will likely change in the future.

sohkai avatar Oct 26 '18 16:10 sohkai