-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpermissions.acl
62 lines (55 loc) · 1.79 KB
/
permissions.acl
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
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* Votechain access control
*
* Author: Luke Powlett <[email protected]>
*/
rule EverybodyCanReadEverything {
description: "Allow all participants read access to all resources"
participant: "powlett.luke.votechain.User"
operation: READ
resource: "powlett.luke.votechain.*"
action: ALLOW
}
rule CandidatesCantSubmitTransactions {
description: "Allow all participants to submit transactions"
participant: "powlett.luke.votechain.Candidate"
operation: CREATE
resource: "powlett.luke.votechain.Vote"
action: DENY
}
rule VotersCanSubmitTransactions {
description: "Allow all voters to submit transactions"
participant: "powlett.luke.votechain.Voter"
operation: CREATE
resource: "powlett.luke.votechain.Vote"
action: ALLOW
}
rule OwnerHasFullAccessToTheirAssets {
description: "Allow all participants full access to their assets"
participant(p): "powlett.luke.votechain.User"
operation: ALL
resource(r): "powlett.luke.votechain.Vote"
condition: (r.owner.getIdentifier() === p.getIdentifier())
action: ALLOW
}
rule SystemACL {
description: "System ACL to permit all access"
participant: "org.hyperledger.composer.system.Participant"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}