-
Notifications
You must be signed in to change notification settings - Fork 8
/
permissions.acl
39 lines (33 loc) · 1.19 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
/**
* Access control rules for The Spot Market
*/
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 OwnerHasFullAccessToTheirSpots {
description: "Allow all participants full access to their assets"
participant(p): "io.ethventures.thespot.SpotUser"
operation: ALL
resource(r): "io.ethventures.thespot.ParkingSpot"
condition: (r.owner.getIdentifier() === p.getIdentifier())
action: ALLOW
}
rule ContractParticipantHasFullAccessToTheirContracts {
description: "Allow all participants full access to their assets"
participant(p): "io.ethventures.thespot.SpotUser"
operation: ALL
resource(r): "io.ethventures.thespot.Contract"
condition: (r.owner.getIdentifier() === p.getIdentifier() || (r.renter.getIdentifier() === p.getIdentifier()))
action: ALLOW
}
rule EverybodyCanSubmitTransactions {
description: "Allow all participants to submit transactions"
participant: "io.ethventures.thespot.SpotUser"
operation: CREATE
resource: "io.ethventures.thespot.Reserve"
action: ALLOW
}