AccessLevels.sol
AccessLevels
Inherits: IAccessLevels, DataModule, IAppLevelEvents
Author: @ShaneDuncan602, @oscarsernarosero, @TJ-Everett
Data contract to store AccessLevel Levels for user accounts
This contract stores and serves Access Levels via an internal mapping
State Variables
levels
Functions
constructor
Constructor that sets the app manager address used for permissions. This is required for upgrades.
Parameters
Name | Type | Description |
---|---|---|
_dataModuleAppManagerAddress | address | address of the owning app manager |
addLevel
Add the Access Level to the account. Restricted to the owner
Parameters
Name | Type | Description |
---|---|---|
_address | address | address of the account |
_level | uint8 | access level(0-4) |
addMultipleAccessLevels
Add the Access Level(0-4) to the list of account. Restricted to the owner.
Parameters
Name | Type | Description |
---|---|---|
_accounts | address[] | address array upon which to apply the Access Level |
_level | uint8[] | Access Level array to add |
addAccessLevelToMultipleAccounts
Add the Access Level(0-4) to multiple accounts. Restricted to the owner.
Parameters
Name | Type | Description |
---|---|---|
_accounts | address[] | addresses upon which to apply the Access Level |
_level | uint8 | Access Level to add |
getAccessLevel
Get the Access Level for the account.
Parameters
Name | Type | Description |
---|---|---|
_account | address | address of the account |
Returns
Name | Type | Description |
---|---|---|
<none> | uint8 | level Access Level(0-4) |
removeAccessLevel
Remove the Access Level for the account. Restricted to the owner
Parameters
Name | Type | Description |
---|---|---|
_account | address | address of the account |