Access Control

Address: 0x385b8Fa7A4bC0dB2149B1AB1928AfD21D551bd3d

Adapted version of Access Control from OpenZeppelin to fit the storage-module architecture, that allows contracts to implement role-based mechanisms. When DIMORegistry is deployed, the DEFAULT_ADMIN_ROLE is assigned to the deployer in order to allow them to fully manage the system. This role also permits the creation, granting, and revoking of roles from other addresses.

To manage access to a function, we can use the onlyRole modifier and specify the role that the msg.sender must have to invoke that function.

function mockFunction(...) external onlyRole(ROLE) {…}

In the future, more functions may be added to increase the separation of concerns in the use of contracts and the roles of managers and users.

Last updated