You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mapping(string => uint8) _named_roles;
uint8 _nroles;
// new methods
function setUserRoleName(uint8 role, string name) // name an existing role
function addUserRole(string name) returns (uint8 role) // create a new role by name (increments nroles)
// overloaded existing methods
function hasUserRole(address who, string role) returns (bool)
function setUserRole(address who, string role, bool enabled)
function setRoleCapability(string role, address code, bytes4 sig, bool enabled)
Other ideas:
force usage of role naming (remove methods using uint8 args)
You should be able to name a role (.e.g 0 -> "admin"), then set by name instead of ID
The text was updated successfully, but these errors were encountered: