ODCdataIndex
AccessManagerFacet
Facet to manage access of DataManagers to DataObjects
_Workflow:
1. A maintainer (owner, deployer) of the project should allocate the DataPoint for his project calling DataPointRegistry.allocate()
2. When DataManager is deployed, the maintainer should approve this deployed DataManager to use the DataPoint
If Project needs to deploy multiple DMs, we recommend that Factory, which deploys DM's first allocate a DP for itself
and then it can approve deployed DMs.
approvedDataManager
Verifies if DataManager is allowed to write in specific DataPoint
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | Identifier of the DataPoint |
dm | address | Address of DataManager |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | if write access is allowed |
approveDataManager
Defines if DataManager is allowed to write in specific DataPoint
Function SHOULD be restricted to DataPoint maintainer only
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | Identifier of the DataPoint |
dm | address | Address of DataManager |
approved | bool | if DataManager should be approved for the DataPoint |