-
Notifications
You must be signed in to change notification settings - Fork 0
/
permissions.acl
78 lines (69 loc) · 2.1 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
73
74
75
76
77
78
rule insurance {
description: "The Insurer can only READ transactions that are related to it"
participant(i): "org.kit.blockchain.Insurer"
operation: READ
resource(s): "org.kit.blockchain.Shipment"
condition: (s.insurer == i)
action: ALLOW
}
rule devices {
description: "The Devices can only UPDATE shipments that are related to it"
participant(d): "org.kit.blockchain.Device"
operation: UPDATE
resource(s): "org.kit.blockchain.Shipment"
transaction(tx): "org.kit.blockchain.ShipmentException"
condition: (s.device == d)
action: ALLOW
}
rule dispatcherSP {
description: "Dispatchers can CREATE and READ new Shipments."
participant:"org.kit.blockchain.Dispatcher"
operation: CREATE, READ
resource: "org.kit.blockchain.Shipment"
action: ALLOW
}
rule dispatcherCT {
description:"Dispatchers can only READ contracts."
participant:"org.kit.blockchain.Dispatcher"
operation: READ
resource: "org.kit.blockchain.Contract"
action: ALLOW
}
rule recipients {
description: "Recipients can UPDATE and READ shipments."
participant: "org.kit.blockchain.Recipient"
operation: UPDATE, READ
resource: "org.kit.blockchain.Shipment"
action: ALLOW
}
rule shippers {
description: "Shippers can UPDATE and READ shipments."
participant: "org.kit.blockchain.Shipper"
operation: UPDATE, READ
resource: "org.kit.blockchain.Shipment"
action: ALLOW
}
/**
* Sample access control list.
*/
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
}