-
Notifications
You must be signed in to change notification settings - Fork 0
/
perm.sh
executable file
·206 lines (186 loc) · 11.4 KB
/
perm.sh
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
echo "Assiging permissions to users..."
app/Console/cake acl_extras aco_sync
# app/Console/cake cache clear_all
echo "*************** Assign Admin Permissions *******************"
#Admin permissions
app/Console/cake acl grant Group.1 controllers
# Allow managers to some controllers
echo "*************** Assign Managers Permissions *******************"
app/Console/cake acl deny Group.2 controllers
app/Console/cake acl grant Group.2 controllers/Users/manager_dashboard
app/Console/cake acl grant Group.2 controllers/Sadrs
app/Console/cake acl grant Group.2 controllers/Aefis
app/Console/cake acl grant Group.2 controllers/SadrFollowups
app/Console/cake acl grant Group.2 controllers/Pqmps
app/Console/cake acl grant Group.2 controllers/Devices
app/Console/cake acl grant Group.2 controllers/Medications
app/Console/cake acl grant Group.2 controllers/Transfusions
app/Console/cake acl grant Group.2 controllers/Padrs
app/Console/cake acl grant Group.2 controllers/Ce2bs
app/Console/cake acl grant Group.2 controllers/Saes
app/Console/cake acl grant Group.2 controllers/Attachments
app/Console/cake acl grant Group.2 controllers/Counties
app/Console/cake acl grant Group.2 controllers/Countries
app/Console/cake acl grant Group.2 controllers/Designations
app/Console/cake acl grant Group.2 controllers/Doses
app/Console/cake acl grant Group.2 controllers/DrugDictionaries
app/Console/cake acl grant Group.2 controllers/FacilityCodes
app/Console/cake acl grant Group.2 controllers/Feedbacks
app/Console/cake acl grant Group.2 controllers/Frequencies
app/Console/cake acl grant Group.2 controllers/HelpInfos
app/Console/cake acl grant Group.2 controllers/Messages
app/Console/cake acl grant Group.2 controllers/Routes
app/Console/cake acl grant Group.2 controllers/SadrListOfDrugs
app/Console/cake acl grant Group.2 controllers/SadrListOfMedicines
app/Console/cake acl grant Group.2 controllers/AefiListOfVaccines
app/Console/cake acl grant Group.2 controllers/ListOfDevices
app/Console/cake acl grant Group.2 controllers/MedicationProducts
app/Console/cake acl grant Group.2 controllers/Pints
app/Console/cake acl grant Group.2 controllers/WhoDrugs
app/Console/cake acl grant Group.2 controllers/Pages
app/Console/cake acl grant Group.2 controllers/Users/changePassword
app/Console/cake acl grant Group.2 controllers/Users/edit
app/Console/cake acl grant Group.2 controllers/Users/admin_index
app/Console/cake acl grant Group.2 controllers/Users/admin_add
app/Console/cake acl grant Group.2 controllers/Notifications
app/Console/cake acl grant Group.2 controllers/Comments
app/Console/cake acl grant Group.2 controllers/Reports
app/Console/cake acl grant Group.2 controllers/AefiDescriptions
# Allow reporters to some
echo "*************** Assign Reporter Permissions *******************"
app/Console/cake acl deny Group.3 controllers
app/Console/cake acl grant Group.3 controllers/Users/reporter_dashboard
app/Console/cake acl grant Group.3 controllers/Users/edit
app/Console/cake acl grant Group.3 controllers/Sadrs/sadrIndex
app/Console/cake acl grant Group.3 controllers/Sadrs/reporter_index
app/Console/cake acl grant Group.3 controllers/Sadrs/reporter_add
app/Console/cake acl grant Group.3 controllers/Sadrs/reporter_followup
app/Console/cake acl grant Group.3 controllers/Sadrs/reporter_edit
app/Console/cake acl grant Group.3 controllers/Sadrs/reporter_view
app/Console/cake acl grant Group.3 controllers/Sadrs/institutionCodes
app/Console/cake acl grant Group.3 controllers/Sadrs/reporter_delete
app/Console/cake acl grant Group.3 controllers/Aefis/aefiIndex
app/Console/cake acl grant Group.3 controllers/Aefis/institutionCodes
app/Console/cake acl grant Group.3 controllers/Aefis/reporter_index
app/Console/cake acl grant Group.3 controllers/Aefis/reporter_add
app/Console/cake acl grant Group.3 controllers/Aefis/reporter_followup
app/Console/cake acl grant Group.3 controllers/Aefis/reporter_edit
app/Console/cake acl grant Group.3 controllers/Aefis/reporter_view
app/Console/cake acl grant Group.3 controllers/Aefis/reporter_delete
app/Console/cake acl grant Group.3 controllers/Pqmps/reporter_index
app/Console/cake acl grant Group.3 controllers/Pqmps/reporter_add
app/Console/cake acl grant Group.3 controllers/Pqmps/reporter_edit
app/Console/cake acl grant Group.3 controllers/Pqmps/reporter_view
app/Console/cake acl grant Group.3 controllers/Pqmps/reporter_delete
app/Console/cake acl grant Group.3 controllers/Ce2bs/reporter_index
app/Console/cake acl grant Group.3 controllers/Ce2bs/reporter_add
app/Console/cake acl grant Group.3 controllers/Ce2bs/reporter_edit
app/Console/cake acl grant Group.3 controllers/Ce2bs/reporter_view
app/Console/cake acl grant Group.3 controllers/Ce2bs/reporter_delete
app/Console/cake acl grant Group.3 controllers/Devices/reporter_index
app/Console/cake acl grant Group.3 controllers/Devices/reporter_add
app/Console/cake acl grant Group.3 controllers/Devices/reporter_followup
app/Console/cake acl grant Group.3 controllers/Devices/reporter_edit
app/Console/cake acl grant Group.3 controllers/Devices/reporter_view
app/Console/cake acl grant Group.3 controllers/Devices/reporter_delete
app/Console/cake acl grant Group.3 controllers/Medications/reporter_index
app/Console/cake acl grant Group.3 controllers/Medications/reporter_add
app/Console/cake acl grant Group.3 controllers/Medications/reporter_followup
app/Console/cake acl grant Group.3 controllers/Medications/reporter_edit
app/Console/cake acl grant Group.3 controllers/Medications/reporter_view
app/Console/cake acl grant Group.3 controllers/Medications/reporter_delete
app/Console/cake acl grant Group.3 controllers/Transfusions/reporter_index
app/Console/cake acl grant Group.3 controllers/Transfusions/reporter_add
app/Console/cake acl grant Group.3 controllers/Transfusions/reporter_followup
app/Console/cake acl grant Group.3 controllers/Transfusions/reporter_edit
app/Console/cake acl grant Group.3 controllers/Transfusions/reporter_view
app/Console/cake acl grant Group.3 controllers/Transfusions/reporter_delete
app/Console/cake acl grant Group.3 controllers/SadrFollowups/sadrIndex
app/Console/cake acl grant Group.3 controllers/SadrFollowups/followupIndex
app/Console/cake acl grant Group.3 controllers/Pqmps/pqmpIndex
app/Console/cake acl grant Group.3 controllers/Users/changePassword
app/Console/cake acl grant Group.3 controllers/Notifications/reporter_index
app/Console/cake acl grant Group.3 controllers/Notifications/delete
app/Console/cake acl grant Group.3 controllers/SadrListOfDrugs/delete
app/Console/cake acl grant Group.3 controllers/SadrListOfMedicines/delete
app/Console/cake acl grant Group.3 controllers/AefiListOfVaccines/delete
app/Console/cake acl grant Group.3 controllers/ListOfDevices/delete
app/Console/cake acl grant Group.3 controllers/MedicationProducts/delete
app/Console/cake acl grant Group.3 controllers/Pints/delete
app/Console/cake acl grant Group.3 controllers/Comments
app/Console/cake acl grant Group.3 controllers/Reports
app/Console/cake acl grant Group.3 controllers/AefiDescriptions
# Allow institution administrators to some
echo "*************** Assign Institution Managers Permissions *******************"
app/Console/cake acl deny Group.4 controllers
app/Console/cake acl grant Group.4 controllers/Users/partner_dashboard
app/Console/cake acl grant Group.4 controllers/Sadrs/sadrIndex
app/Console/cake acl grant Group.4 controllers/Sadrs/institutionCodes
app/Console/cake acl grant Group.4 controllers/Sadrs/partner_index
app/Console/cake acl grant Group.4 controllers/Sadrs/partner_view
app/Console/cake acl grant Group.4 controllers/Sadrs/institutionCodes
app/Console/cake acl grant Group.4 controllers/Aefis/aefiIndex
app/Console/cake acl grant Group.4 controllers/Aefis/institutionCodes
app/Console/cake acl grant Group.4 controllers/Aefis/partner_index
app/Console/cake acl grant Group.4 controllers/Aefis/partner_view
app/Console/cake acl grant Group.4 controllers/SadrFollowups/sadrIndex
app/Console/cake acl grant Group.4 controllers/SadrFollowups/followupIndex
app/Console/cake acl grant Group.4 controllers/Pqmps/pqmpIndex
app/Console/cake acl grant Group.4 controllers/Pqmps/partner_index
app/Console/cake acl grant Group.4 controllers/Pqmps/partner_view
app/Console/cake acl grant Group.4 controllers/Devices/partner_index
app/Console/cake acl grant Group.4 controllers/Devices/partner_view
app/Console/cake acl grant Group.4 controllers/Medications/partner_index
app/Console/cake acl grant Group.4 controllers/Medications/partner_view
app/Console/cake acl grant Group.4 controllers/Transfusions/partner_index
app/Console/cake acl grant Group.4 controllers/Transfusions/partner_view
app/Console/cake acl grant Group.4 controllers/Users/changePassword
app/Console/cake acl grant Group.4 controllers/Users/edit
app/Console/cake acl grant Group.4 controllers/Users/partner_index
app/Console/cake acl grant Group.4 controllers/Notifications/partner_index
app/Console/cake acl grant Group.4 controllers/Notifications/delete
app/Console/cake acl grant Group.4 controllers/Comments
app/Console/cake acl grant Group.4 controllers/Reports
# Allow mini managers to some controllers
echo "*************** Assign Mini Managers Permissions *******************"
app/Console/cake acl deny Group.5 controllers
app/Console/cake acl grant Group.5 controllers/Users/reviewer_dashboard
app/Console/cake acl grant Group.5 controllers/Sadrs
app/Console/cake acl grant Group.5 controllers/Aefis
app/Console/cake acl grant Group.5 controllers/SadrFollowups
app/Console/cake acl grant Group.5 controllers/Pqmps
app/Console/cake acl grant Group.5 controllers/Devices
app/Console/cake acl grant Group.5 controllers/Medications
app/Console/cake acl grant Group.5 controllers/Transfusions
app/Console/cake acl grant Group.5 controllers/Padrs
app/Console/cake acl grant Group.5 controllers/Ce2bs
app/Console/cake acl grant Group.5 controllers/Saes
app/Console/cake acl grant Group.5 controllers/Attachments
app/Console/cake acl grant Group.5 controllers/Counties
app/Console/cake acl grant Group.5 controllers/Countries
app/Console/cake acl grant Group.5 controllers/Designations
app/Console/cake acl grant Group.5 controllers/Doses
app/Console/cake acl grant Group.5 controllers/DrugDictionaries
app/Console/cake acl grant Group.5 controllers/FacilityCodes
app/Console/cake acl grant Group.5 controllers/Feedbacks
app/Console/cake acl grant Group.5 controllers/Frequencies
app/Console/cake acl grant Group.5 controllers/HelpInfos
app/Console/cake acl grant Group.5 controllers/Messages
app/Console/cake acl grant Group.5 controllers/Routes
app/Console/cake acl grant Group.5 controllers/SadrListOfDrugs
app/Console/cake acl grant Group.5 controllers/SadrListOfMedicines
app/Console/cake acl grant Group.5 controllers/AefiListOfVaccines
app/Console/cake acl grant Group.5 controllers/ListOfDevices
app/Console/cake acl grant Group.5 controllers/MedicationProducts
app/Console/cake acl grant Group.5 controllers/Pints
app/Console/cake acl grant Group.5 controllers/WhoDrugs
app/Console/cake acl grant Group.5 controllers/Pages
app/Console/cake acl grant Group.5 controllers/Users/changePassword
app/Console/cake acl grant Group.5 controllers/Users/edit
app/Console/cake acl grant Group.5 controllers/Users/admin_index
app/Console/cake acl grant Group.5 controllers/Users/admin_add
app/Console/cake acl grant Group.5 controllers/Notifications
app/Console/cake acl grant Group.5 controllers/Comments
app/Console/cake acl grant Group.5 controllers/Reports
app/Console/cake acl grant Group.5 controllers/AefiDescriptions
echo "*************** Completed *******************"