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.

 Note: DataPoint Owner is NOT approved for this DP by default, it needs to call approve() for himself, if needed_

approvedDataManager

function approvedDataManager(DataPoint dp, address dm) external view returns (bool)

Verifies if DataManager is allowed to write in specific DataPoint

Parameters

NameTypeDescription
dpDataPointIdentifier of the DataPoint
dmaddressAddress of DataManager

Return Values

NameTypeDescription
[0]boolif write access is allowed

approveDataManager

function approveDataManager(DataPoint dp, address dm, bool approved) external

Defines if DataManager is allowed to write in specific DataPoint

Function SHOULD be restricted to DataPoint maintainer only

Parameters

NameTypeDescription
dpDataPointIdentifier of the DataPoint
dmaddressAddress of DataManager
approvedboolif DataManager should be approved for the DataPoint

On this page