-
Notifications
You must be signed in to change notification settings - Fork 0
/
permissions.acl
70 lines (62 loc) · 2.16 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
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule AllAccess {
description: "AllAccess - grant everything to everybody"
participant: "org.hyperledger.composer.system.Participant"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
/*
rule R1_TraderReadAndUpdateThemselvesOnly
{
description: "Trader can read and update their own record only"
participant(t): "org.aut.mathcs.blockchain.trading.Trader"
operation: READ, UPDATE
resource(v): "org.aut.mathcs.blockchain.trading.Trader"
condition: (v.getIdentifier() == t.getIdentifier())
action: ALLOW
}
rule R2_TraderSeeTheirCommodities {
description: "Trader can do anything with their own Commodities"
participant(t): "org.aut.mathcs.blockchain.trading.Trader"
operation: ALL
resource(c): "org.aut.mathcs.blockchain.trading.Commodity"
condition: (c.owner.getIdentifier() == t.getIdentifier())
action: ALLOW
}
rule R3_EnableTransactions {
description: "Enable Traders to submit transactions"
participant: "org.aut.mathcs.blockchain.trading.Trader"
operation: ALL
resource: "org.aut.mathcs.blockchain.trading.Trade"
action: ALLOW
}
rule R4_HistoryWatch {
description: "Traders should be able to see the history of their own transactions only"
participant(t): "org.aut.mathcs.blockchain.trading.Trader"
operation: READ
resource(v): "org.hyperledger.composer.system.HistorianRecord"
condition: (v.participantInvoking.getIdentifier() != t.getIdentifier())
action: DENY
}
rule R5_RegulatorSeeThemselves {
description: "Regulators can see and update their own record"
participant: "org.aut.mathcs.blockchain.trading.Regulator"
operation: READ, UPDATE
resource: "org.aut.mathcs.blockchain.trading.Regulator"
action: ALLOW
}
rule R6_RegTransView {
description: "Grant Regulator full access to Trade Transactions"
participant: "org.aut.mathcs.blockchain.trading.Regulator"
operation: ALL
resource: "org.aut.mathcs.blockchain.trading.Trade"
action: ALLOW
}
*/