Skip to content

Commit

Permalink
Make AccessControl GSN compatible (#2135)
Browse files Browse the repository at this point in the history
  • Loading branch information
nventuro authored Mar 16, 2020
1 parent 63c89c7 commit 9005804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/access/AccessControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ abstract contract AccessControl is Context {
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (_roles[role].members.add(account)) {
emit RoleGranted(role, account, msg.sender);
emit RoleGranted(role, account, _msgSender());
}
}

Expand All @@ -175,7 +175,7 @@ abstract contract AccessControl is Context {
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (_roles[role].members.remove(account)) {
emit RoleRevoked(role, account, msg.sender);
emit RoleRevoked(role, account, _msgSender());
}
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/AccessControlMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "../access/AccessControl.sol";

contract AccessControlMock is AccessControl {
constructor() public {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
}

function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {
Expand Down

0 comments on commit 9005804

Please sign in to comment.