#
ACLFacet
Inherits: Modifiers
Use it to authorize various actions on the contracts
Use it to (un)assign or check role membership
#
Functions
#
assignRole
Assign a _roleId
to the object in given context
Any object ID can be a context, system is a special context with highest priority
function assignRole(bytes32 _objectId, bytes32 _contextId, string memory _role) external;
Parameters
#
unassignRole
Unassign object from a role in given context
First, assigner attempts to unassign the role.
Second, assign the role.
Any object ID can be a context, system is a special context with highest priority
function unassignRole(bytes32 _objectId, bytes32 _contextId) external;
Parameters
#
isInGroup
Checks if an object belongs to _group
group in given context
Assigning a role to the object makes it a member of a corresponding role group
function isInGroup(bytes32 _objectId, bytes32 _contextId, string memory _group) external view returns (bool);
Parameters
Returns
#
isParentInGroup
Check whether a parent object belongs to the _group
group in given context
Objects can have a parent object, i.e. entity is a parent of a user
function isParentInGroup(bytes32 _objectId, bytes32 _contextId, string memory _group) external view returns (bool);
Parameters
Returns
#
canAssign
Check whether a user can assign specific object to the _role
role in given context
Check permission to assign to a role
function canAssign(bytes32 _assignerId, bytes32 _objectId, bytes32 _contextId, string memory _role)
external
view
returns (bool);
Parameters
Returns
#
hasGroupPrivilege
Check whether a user can call a specific function.
function hasGroupPrivilege(bytes32 _userId, bytes32 _contextId, bytes32 _groupId) external view returns (bool);
Parameters
#
getRoleInContext
Get a user's (an objectId's) assigned role in a specific context
function getRoleInContext(bytes32 objectId, bytes32 contextId) external view returns (bytes32);
Parameters
Returns
#
isRoleInGroup
Get whether role is in group.
Get whether role is in group.
function isRoleInGroup(string memory role, string memory group) external view returns (bool);
Parameters
Returns
#
canGroupAssignRole
Get whether given group can assign given role.
Get whether given group can assign given role.
function canGroupAssignRole(string memory role, string memory group) external view returns (bool);
Parameters
Returns
#
updateRoleAssigner
Update who can assign _role
role
Update who has permission to assign this role
function updateRoleAssigner(string memory _role, string memory _assignerGroup)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_ADMINS);
Parameters
#
updateRoleGroup
Update role group membership for _role
role and _group
group
Update role group membership
function updateRoleGroup(string memory _role, string memory _group, bool _roleInGroup)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_ADMINS);
Parameters