Use to size the bitmask. The maximum number of permissions is 8 * sizeof
The module identifier to differentiate storage keys.
Add a permission to a user.
Updated permissions are stored in the contract's storage.
if the user already has the permission or if the permission does not exist.
The permission to grant.
The user identified by his address.
Checks if the user has any of the given permissions.
true if the user has any of the permissions, false otherwise.
if the permission does not exist.
The permission bitmask to check.
The user identified by his address.
Checks if the user has the given permission.
true if the user has the permission, false otherwise.
if the permission does not exist.
The permission bitmask to check.
The user identified by his address.
Creates a new permission.
Permissions are dynamically created and not stored in the contract's storage. While this optimization reduces storage usage, it also means that the permission must be globally defined and consistent.
a number representing the permission.
if the maximum number of permissions is reached.
The name of the permission.
Removes a permission from a user.
Updated permissions are stored in the contract's storage.
if the user does not have the permission or if the permission does not exist.
The permission to remove.
The user identified by his address.
Generated using TypeDoc
Represents a role-based access control object.
Remarks
Manages roles and permissions using a bitmask approach. Each bit in a bitmask represents a distinct permission.
Example