Role Manager
Cobo Safe
is designed in the Role-Based Access Control (RBAC) approach.
The admins of an organization can create a Role
and assign permissions to the Role
. Team members, often referred to as Delegates
in Cobo Safe
, can only acquire permissions through their delegated roles.
Role Manager
is a module in Cobo Safe
. It is used to manage the Delegate-Role
relationship.
Developer can create their own Role Managers
by implementing the following interfaces:
interface IRoleManager {
function getRoles(address delegate) external view returns (bytes32[] memory);
function hasRole(address delegate, bytes32 role) external view returns (bool);
}
getRoles()
is used to query theRole
orRoles
assigned to aDelegate
hasRole()
is used to check whether a specificRole
has been assigned to theDelegate
Last updated