-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpermissions.acl
67 lines (66 loc) · 1.88 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
/**
* Access control rules for tutorial-network
*/
rule Patientonlyseethemselves{
description: "Patients can see their own record only"
participant(t): "ehr.Patient"
operation: READ
resource(v): "ehr.Patient"
condition: (v.getIdentifier() == t.getIdentifier())
action: ALLOW
}
rule Patientonlyseetheirinfo {
description: "Patients can see/work with their own Commodities"
participant(t): "ehr.Patient"
operation: READ
resource(c): "ehr.PatientInfo"
condition: (c.owner.getIdentifier() == t.getIdentifier())
action: ALLOW
}
rule Patientownhistory{
description: "Patients should be able to see the history of their own transactions only"
participant(t): "ehr.Patient"
operation: READ
resource(v): "org.hyperledger.composer.system.HistorianRecord"
condition: (v.participantInvoking.getIdentifier() != t.getIdentifier())
action: DENY
}
rule Doctorcansubmitpatientrecords{
description: "Enable Doctors to submit records"
participant: "ehr.Doctor"
operation: ALL
resource: "ehr.PatientInfo"
action: ALLOW
}
rule Doctorcanadmitpatients{
description: "Enable Doctors to admit patients"
participant: "ehr.Doctor"
operation: ALL
resource: "ehr.Patient"
action: ALLOW
}
rule Adminseethemselves {
// Since admin can oversee all patient info to check cases
description: "Admins can see and update their own record"
participant: "ehr.Head"
operation: READ, UPDATE, CREATE
resource: "**"
action: ALLOW
}
/**
* Sample access control list.
*/
rule NetworkAdminUser {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule SystemACL {
description: "System ACL to permit all access"
participant: "ANY"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}