Skip to content

Commit e6e6641

Browse files
Krishang NadgaudaKrishang Nadgauda
authored andcommitted
Add setRoleAdmin to Permissions
1 parent d459279 commit e6e6641

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contracts/feature/Permissions.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ contract Permissions is IPermissions, Context {
4848
emit RoleRevoked(role, account, _msgSender());
4949
}
5050

51+
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
52+
bytes32 previousAdminRole = _getRoleAdmin[role];
53+
_getRoleAdmin[role] = adminRole;
54+
emit RoleAdminChanged(role, previousAdminRole, adminRole);
55+
}
56+
5157
function _setupRole(bytes32 role, address account) internal virtual {
5258
_hasRole[role][account] = true;
5359
emit RoleGranted(role, account, _msgSender());

0 commit comments

Comments
 (0)