We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 061f972 commit f17329fCopy full SHA for f17329f
contracts/feature/Permissions.sol
@@ -76,4 +76,19 @@ contract Permissions is IPermissions {
76
);
77
}
78
79
+
80
+ function _checkRoleWithSwitch(bytes32 role, address account) internal view virtual {
81
+ if (!hasRoleWithSwitch(role, account)) {
82
+ revert(
83
+ string(
84
+ abi.encodePacked(
85
+ "AccessControl: account ",
86
+ Strings.toHexString(uint160(account), 20),
87
+ " is missing role ",
88
+ Strings.toHexString(uint256(role), 32)
89
+ )
90
91
+ );
92
+ }
93
94
0 commit comments