-
Notifications
You must be signed in to change notification settings - Fork 4
/
permissions.acl
executable file
·72 lines (63 loc) · 2.11 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
63
64
65
66
67
68
69
70
71
72
/*
Access Control List for the Loyalty Network data
@author Tyrell Perera
*/
rule OfferAllPartner {
description: "Allow full access for the participating partner to their offers"
participant(i): "co.tyrell.loyalty.Partner"
operation: ALL
resource(a): "co.tyrell.loyalty.Offer"
condition: (a.partner.partnerId === i.partnerId)
action: ALLOW
}
rule CardReadUpdatePartner {
description: "Allow read access for the participating partner to member cards"
participant: "co.tyrell.loyalty.Partner"
operation: READ, UPDATE
resource: "co.tyrell.loyalty.Card"
action: ALLOW
}
rule PointIssuePartner {
description: "Allow create and read access for the point issue ledger entry for a partner"
participant(i): "co.tyrell.loyalty.Partner"
operation: CREATE, READ
resource(a): "co.tyrell.loyalty.IssuePoints"
condition: (a.pointsOffer.partner.partnerId === i.partnerId)
action: ALLOW
}
rule CardReadMember {
description: "Allow read access for a member to their card details"
participant(i): "co.tyrell.loyalty.Member"
operation: READ
resource(a): "co.tyrell.loyalty.Card"
condition: (a.owner.email === i.email)
action: ALLOW
}
rule OfferReadAll {
description: "Allow read access to all offers to everyone in the loyalty network"
participant: "co.tyrell.loyalty.*"
operation: READ
resource: "co.tyrell.loyalty.Offer"
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
}