forked from neptune-mutual-blue/protocol
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MockAccessControlUser.sol
49 lines (38 loc) · 1.29 KB
/
MockAccessControlUser.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Neptune Mutual Protocol (https://neptunemutual.com)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../../libraries/AccessControlLibV1.sol";
import "../../libraries/ProtoUtilV1.sol";
contract MockAccessControlUser {
using AccessControlLibV1 for IStore;
using ProtoUtilV1 for IStore;
using StoreKeyUtil for IStore;
IStore public s;
constructor(IStore store) {
s = store;
}
function callerMustBeAdmin(address caller) external view {
s.callerMustBeAdmin(caller);
}
function callerMustBeCoverManager(address caller) external view {
s.callerMustBeCoverManager(caller);
}
function callerMustBeGovernanceAgent(address caller) external view {
s.callerMustBeGovernanceAgent(caller);
}
function callerMustBeGovernanceAdmin(address caller) external view {
s.callerMustBeGovernanceAdmin(caller);
}
function callerMustBeRecoveryAgent(address caller) external view {
s.callerMustBeRecoveryAgent(caller);
}
function callerMustBePauseAgent(address caller) external view {
s.callerMustBePauseAgent(caller);
}
function callerMustBeUnpauseAgent(address caller) external view {
s.callerMustBeUnpauseAgent(caller);
}
function hasAccess(bytes32 role, address user) external view returns (bool) {
return s.hasAccess(role, user);
}
}