-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestAccess.sol
More file actions
46 lines (33 loc) · 1.02 KB
/
testAccess.sol
File metadata and controls
46 lines (33 loc) · 1.02 KB
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
contract testAccess {
address public AccessControlAddress;
modifier onlySuperUser{
address nameReg = AccessControlAddress;
if (nameReg == 0) throw;
if (!nameReg.call(bytes4(sha3("isSuperUser(address)")), msg.sender)) throw;
}
modifier onlyManager{
address nameReg = AccessControlAddress;
if (nameReg == 0) throw;
if (!nameReg.call(bytes4(sha3("isManager(address)")), msg.sender)) throw;
}
modifier onlyUser{
address nameReg = AccessControlAddress;
if (nameReg == 0) throw;
if (!nameReg.call(bytes4(sha3("isUser(address)")), msg.sender)) throw;
}
function testAccess(address acAddress){
AccessControlAddress = acAddress;
}
function testSuperUser(address superUserAddress) onlySuperUser returns (bool) {
return true;
}
function testManager(address superUserAddress) onlyManager returns (bool){
return true;
}
function testUser(address superUserAddress) onlyUser returns (bool){
return true;
}
function changeACAddress(address acAddress){
AccessControlAddress = acAddress;
}
}