* Remove Roles * Add AccessControl and tests * Removed IAccessControl * Add RoleGranted and RoleRevoked events * Make roles grantable and revokable regardless of their previous status * Fix typo * Add documentation * Cleanup tests * Add enumeration tests * Add _setRoleAdmin tests * Fix lint error * Fix AccessControl link in docs * WIP on access control guide * Rename getRoleMembersCount * Add tests for new role admin * Make AccessControl GSN compatible * Update access control guide * Rename admin to adminRole * Rename roleIds to roles * Add 'operator' to RoleGranted and RoleRevoked events. * Only emit events if the roles were not previously granted/revoked * Uncomment expectEvent.not tests * Rename operator to sender * Add changelog entry
14 lines
320 B
Solidity
14 lines
320 B
Solidity
pragma solidity ^0.6.0;
|
|
|
|
import "../access/AccessControl.sol";
|
|
|
|
contract AccessControlMock is AccessControl {
|
|
constructor() public {
|
|
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
|
|
}
|
|
|
|
function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {
|
|
_setRoleAdmin(roleId, adminRoleId);
|
|
}
|
|
}
|