forked from IBM/maximo-visual-inspector-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
permissions.acl
159 lines (139 loc) · 4.86 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/**
* Access Control List for the bidding network.
*/
rule SupplierView {
description: "Allow supplier read access to all importer resources"
participant: "composer.food.supply.Supplier"
operation: READ
resource: "composer.food.supply.Importer"
action: ALLOW
}
rule SupplierCanViewOwnData {
description: "Allow supplier access to his own data"
participant(m): "composer.food.supply.Supplier"
operation: ALL
resource(v): "composer.food.supply.Supplier"
condition: (v.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule ImporterCanViewRetailerData {
description: "Allow importer read access to Retailer resources"
participant: "composer.food.supply.Importer"
operation: READ
resource: "composer.food.supply.Retailer"
action: ALLOW
}
rule ImporterCanViewRegulatorData {
description: "Allow importer read access to Regulator resources"
participant: "composer.food.supply.Importer"
operation: READ
resource: "composer.food.supply.Regulator"
action: ALLOW
}
rule ImporterCanSupplierDataView {
description: "Allow importer read access to Supplier resources"
participant: "composer.food.supply.Importer"
operation: READ
resource: "composer.food.supply.Supplier"
action: ALLOW
}
rule ImporterCanViewOwnData {
description: "Allow importer access to his own data"
participant(m): "composer.food.supply.Importer"
operation: ALL
resource(v): "composer.food.supply.Importer"
condition: (v.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule RetailerView {
description: "Allow retailer read access to all importer resources"
participant: "composer.food.supply.Retailer"
operation: READ
resource: "composer.food.supply.Importer"
action: ALLOW
}
rule RetailerCanViewOwnData {
description: "Allow retailer access to his own data"
participant(m): "composer.food.supply.Retailer"
operation: ALL
resource(v): "composer.food.supply.Retailer"
condition: (v.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule RegulatorView {
description: "Allow regulator read access to all resources"
participant: "composer.food.supply.Regulator"
operation: READ
resource: "composer.food.supply.*"
action: ALLOW
}
rule CreateProductListing{
description: "Allow Supplier to create new product listing"
participant(m): "composer.food.supply.Supplier"
operation: CREATE
resource(v): "composer.food.supply.createProductListing"
condition: (v.user.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule ProductListingOwner {
description: "Allow the owner of a product listing total access to their listing"
participant(m): "composer.food.supply.*"
operation: ALL
resource(v): "composer.food.supply.ProductListingContract"
condition: (v.owner.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule TransferListing{
description: "Allow the owner of a product listing to transfer the listing"
participant(m): "composer.food.supply.*"
operation: CREATE
resource(v): "composer.food.supply.transferListing"
condition: (v.productListing.owner.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule TransferListingUpdateRetailerProducts{
description: "Allow members to bid for the product"
participant(m): "composer.food.supply.*"
operation: UPDATE
resource(v): "composer.food.supply.Retailer"
transaction(tx): "composer.food.supply.transferListing"
condition: (tx.productListing.owner.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule CheckProducts{
description: "Allow members to bid for the product"
participant(m): "composer.food.supply.Importer"
operation: CREATE
resource(v): "composer.food.supply.checkProducts"
condition: (v.productListing.owner.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule UpdateExemptedList{
description: "Allow members to bid for the product"
participant(m): "composer.food.supply.Regulator"
operation: CREATE
resource(v): "composer.food.supply.updateExemptedList"
condition: (v.regulator.getIdentifier() == m.getIdentifier())
action: ALLOW
}
rule SystemACL {
description: "System ACL to permit all access"
participant: "ANY"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
rule Default {
description: "Allow all participants access to all resources"
participant: "ANY"
operation: ALL
resource: "composer.food.supply.*"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.*"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}