-
Notifications
You must be signed in to change notification settings - Fork 13
/
resetRolePerms.sh
executable file
·510 lines (482 loc) · 20.5 KB
/
resetRolePerms.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
#!/bin/sh
#
# resetRolePerms.sh - Reset all roles and permissions for a CRM instance
#
# Project: BluebirdCRM
# Authors: Brian Shaughnessy and Ken Zalewski
# Organization: New York State Senate
# Date: 2013-05-07
# Revised: 2019-01-31
#
prog=`basename $0`
script_dir=`dirname $0`
execSql=$script_dir/execSql.sh
readConfig=$script_dir/readConfig.sh
. $script_dir/defaults.sh
if [ $# -ne 1 ]; then
echo "Usage: $prog instanceName" >&2
exit 1
fi
instance="$1"
if ! $readConfig --instance $instance --quiet; then
echo "$prog: $instance: Instance not found in config file" >&2
exit 1
fi
## truncate table to remove any that should not belong
sql="TRUNCATE TABLE role_permission;"
$execSql -q $instance -c "$sql" --drupal
## roles:
## 1: anonymous user
## 2: authenticated user
## 3: Superuser
## 4: Administrator
## 5: Conference Services
## 6: SOS
## 7: Print Production
## 8: Analytics User
## 9: Office Administrator
## 10: Office Manager
## 11: Staff
## 12: Data Entry
## 13: Volunteer
## 14: Mailing Creator
## 15: Mailing Scheduler
## 16: Mailing Approver
## 18: Print Production Staff
## 19: Manage Inbox Polling
## reset all role perms
sql="
INSERT IGNORE INTO role_permission (rid, permission, module)
VALUES
(1, 'access content', 'node'),
(1, 'profile edit', 'civicrm'),
(1, 'profile view', 'civicrm'),
(1, 'use text format 1', 'filter'),
(1, 'view public CiviMail content', 'civicrm'),
(2, 'access content', 'node'),
(2, 'change own e-mail', 'userprotect'),
(2, 'change own openid', 'userprotect'),
(2, 'change own password', 'userprotect'),
(2, 'use text format 1', 'filter'),
(2, 'view own unpublished content', 'node'),
(3, 'access administration pages', 'system'),
(3, 'access all cases and activities', 'civicrm'),
(3, 'access all custom data', 'civicrm'),
(3, 'access CiviCRM', 'civicrm'),
(3, 'access CiviReport', 'civicrm'),
(3, 'access Contact Dashboard', 'civicrm'),
(3, 'access deleted contacts', 'civicrm'),
(3, 'access inbox polling', 'nyss_civihooks'),
(3, 'access my cases and activities', 'civicrm'),
(3, 'access Report Criteria', 'civicrm'),
(3, 'access uploaded files', 'civicrm'),
(3, 'access user profiles', 'user'),
(3, 'add cases', 'civicrm'),
(3, 'add contacts', 'civicrm'),
(3, 'administer blocks', 'block'),
(3, 'administer CiviCase', 'civicrm'),
(3, 'administer CiviCRM', 'civicrm'),
(3, 'administer dedupe rules', 'civicrm'),
(3, 'administer permissions', 'user'),
(3, 'administer Reports', 'civicrm'),
(3, 'save Report Criteria', 'civicrm'),
(3, 'administer reserved groups', 'civicrm'),
(3, 'administer reserved tags', 'civicrm'),
(3, 'administer Tagsets', 'civicrm'),
(3, 'administer userprotect', 'userprotect'),
(3, 'administer users', 'user'),
(3, 'create users', 'administerusersbyrole'),
(3, 'delete activities', 'civicrm'),
(3, 'delete contacts', 'civicrm'),
(3, 'delete contacts permanently', 'nyss_civihooks'),
(3, 'delete in CiviCase', 'civicrm'),
(3, 'edit all contacts', 'civicrm'),
(3, 'edit groups', 'civicrm'),
(3, 'edit my contact', 'civicrm'),
(3, 'export print production files', 'nyss_civihooks'),
(3, 'import contacts', 'civicrm'),
(3, 'merge duplicate contacts', 'civicrm'),
(3, 'profile create', 'civicrm'),
(3, 'profile edit', 'civicrm'),
(3, 'profile listings', 'civicrm'),
(3, 'profile listings and forms', 'civicrm'),
(3, 'profile view', 'civicrm'),
(3, 'translate CiviCRM', 'civicrm'),
(3, 'use PHP for settings', ''),
(3, 'use text format 1', 'filter'),
(3, 'view all activities', 'civicrm'),
(3, 'view all contacts', 'civicrm'),
(3, 'view debug output', 'civicrm'),
(3, 'view my contact', 'civicrm'),
(3, 'view the administration theme', 'system'),
(4, 'access administration pages', 'system'),
(4, 'access all cases and activities', 'civicrm'),
(4, 'access all custom data', 'civicrm'),
(4, 'access CiviCRM', 'civicrm'),
(4, 'access CiviMail', 'civicrm'),
(4, 'access CiviReport', 'civicrm'),
(4, 'access Contact Dashboard', 'civicrm'),
(4, 'access deleted contacts', 'civicrm'),
(4, 'access inbox polling', 'civicrm'),
(4, 'access my cases and activities', 'civicrm'),
(4, 'access Report Criteria', 'civicrm'),
(4, 'access uploaded files', 'civicrm'),
(4, 'access user profiles', 'user'),
(4, 'access users overview', 'administerusersbyrole'),
(4, 'add cases', 'civicrm'),
(4, 'add contacts', 'civicrm'),
(4, 'administer CiviCase', 'civicrm'),
(4, 'administer CiviCRM', 'civicrm'),
(4, 'administer dedupe rules', 'civicrm'),
(4, 'administer district', 'nyss_civihooks'),
(4, 'administer private reports', 'civicrm'),
(4, 'administer Reports', 'civicrm'),
(4, 'administer reserved groups', 'civicrm'),
(4, 'administer reserved reports', 'civicrm'),
(4, 'administer reserved tags', 'civicrm'),
(4, 'approve mailings', 'civicrm'),
(4, 'assign Analytics User role', 'role_delegation'),
(4, 'assign Conference Services role', 'role_delegation'),
(4, 'assign Data Entry role', 'role_delegation'),
(4, 'assign Mailing Approver role', 'role_delegation'),
(4, 'assign Mailing Creator role', 'role_delegation'),
(4, 'assign Mailing Scheduler role', 'role_delegation'),
(4, 'assign Mailing Viewer role', 'role_delegation'),
(4, 'assign Manage Bluebird Inbox role', 'role_delegation'),
(4, 'assign Office Administrator role', 'role_delegation'),
(4, 'assign Office Manager role', 'role_delegation'),
(4, 'assign roles', 'roleassign'),
(4, 'assign SOS role', 'role_delegation'),
(4, 'assign Staff role', 'role_delegation'),
(4, 'assign Volunteer role', 'role_delegation'),
(4, 'cancel users with role 10', 'administerusersbyrole'),
(4, 'cancel users with role 11', 'administerusersbyrole'),
(4, 'cancel users with role 12', 'administerusersbyrole'),
(4, 'cancel users with role 13', 'administerusersbyrole'),
(4, 'cancel users with role 14', 'administerusersbyrole'),
(4, 'cancel users with role 15', 'administerusersbyrole'),
(4, 'cancel users with role 16', 'administerusersbyrole'),
(4, 'cancel users with role 17', 'administerusersbyrole'),
(4, 'cancel users with role 19', 'administerusersbyrole'),
(4, 'cancel users with role 2', 'administerusersbyrole'),
(4, 'cancel users with role 4', 'administerusersbyrole'),
(4, 'cancel users with role 5', 'administerusersbyrole'),
(4, 'cancel users with role 6', 'administerusersbyrole'),
(4, 'cancel users with role 8', 'administerusersbyrole'),
(4, 'cancel users with role 9', 'administerusersbyrole'),
(4, 'create mailings', 'civicrm'),
(4, 'delete activities', 'civicrm'),
(4, 'delete contacts', 'civicrm'),
(4, 'delete contacts permanently', 'nyss_civihooks'),
(4, 'delete in CiviCase', 'civicrm'),
(4, 'delete in CiviMail', 'civicrm'),
(4, 'edit all contacts', 'civicrm'),
(4, 'edit groups', 'civicrm'),
(4, 'edit inbound email basic information', 'civicrm'),
(4, 'edit inbound email basic information and content', 'civicrm'),
(4, 'edit message templates', 'civicrm'),
(4, 'edit my contact', 'civicrm'),
(4, 'edit users with role 10', 'administerusersbyrole'),
(4, 'edit users with role 11', 'administerusersbyrole'),
(4, 'edit users with role 12', 'administerusersbyrole'),
(4, 'edit users with role 13', 'administerusersbyrole'),
(4, 'edit users with role 14', 'administerusersbyrole'),
(4, 'edit users with role 15', 'administerusersbyrole'),
(4, 'edit users with role 16', 'administerusersbyrole'),
(4, 'edit users with role 17', 'administerusersbyrole'),
(4, 'edit users with role 19', 'administerusersbyrole'),
(4, 'edit users with role 2', 'administerusersbyrole'),
(4, 'edit users with role 4', 'administerusersbyrole'),
(4, 'edit users with role 5', 'administerusersbyrole'),
(4, 'edit users with role 6', 'administerusersbyrole'),
(4, 'edit users with role 8', 'administerusersbyrole'),
(4, 'edit users with role 9', 'administerusersbyrole'),
(4, 'export print production files', 'nyss_civihooks'),
(4, 'force merge duplicate contacts', 'civicrm'),
(4, 'import contacts', 'civicrm'),
(4, 'manage tags', 'civicrm'),
(4, 'merge duplicate contacts', 'civicrm'),
(4, 'profile create', 'civicrm'),
(4, 'profile edit', 'civicrm'),
(4, 'profile listings', 'civicrm'),
(4, 'profile listings and forms', 'civicrm'),
(4, 'profile view', 'civicrm'),
(4, 'save Report Criteria', 'civicrm'),
(4, 'schedule mailings', 'civicrm'),
(4, 'use text format 1', 'filter'),
(4, 'view all activities', 'civicrm'),
(4, 'view all contacts', 'civicrm'),
(4, 'view all notes', 'civicrm'),
(4, 'view my contact', 'civicrm'),
(4, 'view the administration theme', 'system'),
(5, 'access all cases and activities', 'civicrm'),
(5, 'access all custom data', 'civicrm'),
(5, 'access CiviCRM', 'civicrm'),
(5, 'access CiviReport', 'civicrm'),
(5, 'access my cases and activities', 'civicrm'),
(5, 'access Report Criteria', 'civicrm'),
(5, 'add cases', 'civicrm'),
(5, 'add contacts', 'civicrm'),
(5, 'administer Reports', 'civicrm'),
(5, 'save Report Criteria', 'civicrm'),
(5, 'edit all contacts', 'civicrm'),
(5, 'edit groups', 'civicrm'),
(5, 'edit my contact', 'civicrm'),
(5, 'profile create', 'civicrm'),
(5, 'profile edit', 'civicrm'),
(5, 'profile listings', 'civicrm'),
(5, 'profile view', 'civicrm'),
(5, 'use text format 1', 'filter'),
(5, 'view all activities', 'civicrm'),
(5, 'view all contacts', 'civicrm'),
(5, 'view my contact', 'civicrm'),
(6, 'access all custom data', 'civicrm'),
(6, 'access CiviCRM', 'civicrm'),
(6, 'access CiviReport', 'civicrm'),
(6, 'access Report Criteria', 'civicrm'),
(6, 'access uploaded files', 'civicrm'),
(6, 'add contacts', 'civicrm'),
(6, 'administer Reports', 'civicrm'),
(6, 'save Report Criteria', 'civicrm'),
(6, 'delete contacts', 'civicrm'),
(6, 'edit all contacts', 'civicrm'),
(6, 'edit groups', 'civicrm'),
(6, 'edit my contact', 'civicrm'),
(6, 'profile create', 'civicrm'),
(6, 'profile edit', 'civicrm'),
(6, 'profile listings', 'civicrm'),
(6, 'profile view', 'civicrm'),
(6, 'use text format 1', 'filter'),
(6, 'view all activities', 'civicrm'),
(6, 'view all contacts', 'civicrm'),
(6, 'view my contact', 'civicrm'),
(7, 'access all custom data', 'civicrm'),
(7, 'access CiviCRM', 'civicrm'),
(7, 'access CiviReport', 'civicrm'),
(7, 'access site in maintenance mode', 'system'),
(7, 'administer reserved groups', 'civicrm'),
(7, 'administer site configuration', 'system'),
(7, 'edit groups', 'civicrm'),
(7, 'export print production files', 'nyss_civihooks'),
(7, 'import contacts', 'civicrm'),
(7, 'import print production', 'nyss_civihooks'),
(7, 'profile listings', 'civicrm'),
(7, 'profile create', 'civicrm'),
(7, 'profile edit', 'civicrm'),
(7, 'profile view', 'civicrm'),
(7, 'use text format 1', 'filter'),
(7, 'view all contacts', 'civicrm'),
(7, 'view my contact', 'civicrm'),
(7, 'manage tags', 'civicrm'),
(8, 'access all custom data', 'civicrm'),
(8, 'access CiviCRM', 'civicrm'),
(8, 'access CiviReport', 'civicrm'),
(8, 'access Report Criteria', 'civicrm'),
(8, 'administer Reports', 'civicrm'),
(8, 'save Report Criteria', 'civicrm'),
(8, 'profile listings', 'civicrm'),
(8, 'profile create', 'civicrm'),
(8, 'profile edit', 'civicrm'),
(8, 'profile view', 'civicrm'),
(8, 'use text format 1', 'filter'),
(8, 'view all activities', 'civicrm'),
(8, 'view all contacts', 'civicrm'),
(8, 'view my contact', 'civicrm'),
(9, 'access administration pages', 'system'),
(9, 'access all cases and activities', 'civicrm'),
(9, 'access all custom data', 'civicrm'),
(9, 'access CiviCRM', 'civicrm'),
(9, 'access CiviReport', 'civicrm'),
(9, 'access Contact Dashboard', 'civicrm'),
(9, 'access deleted contacts', 'civicrm'),
(9, 'access inbox polling', 'civicrm'),
(9, 'access my cases and activities', 'civicrm'),
(9, 'access Report Criteria', 'civicrm'),
(9, 'access uploaded files', 'civicrm'),
(9, 'access user profiles', 'user'),
(9, 'access users overview', 'administerusersbyrole'),
(9, 'add cases', 'civicrm'),
(9, 'add contacts', 'civicrm'),
(9, 'administer district', 'nyss_civihooks'),
(9, 'administer Reports', 'civicrm'),
(9, 'assign Data Entry role', 'role_delegation'),
(9, 'assign Mailing Approver role', 'role_delegation'),
(9, 'assign Mailing Creator role', 'role_delegation'),
(9, 'assign Mailing Scheduler role', 'role_delegation'),
(9, 'assign Mailing Viewer role', 'role_delegation'),
(9, 'assign Manage Bluebird Inbox role', 'role_delegation'),
(9, 'assign Office Administrator role', 'role_delegation'),
(9, 'assign Office Manager role', 'role_delegation'),
(9, 'assign Staff role', 'role_delegation'),
(9, 'assign Volunteer role', 'role_delegation'),
(9, 'cancel users with role 10', 'administerusersbyrole'),
(9, 'cancel users with role 11', 'administerusersbyrole'),
(9, 'cancel users with role 12', 'administerusersbyrole'),
(9, 'cancel users with role 13', 'administerusersbyrole'),
(9, 'cancel users with role 14', 'administerusersbyrole'),
(9, 'cancel users with role 15', 'administerusersbyrole'),
(9, 'cancel users with role 16', 'administerusersbyrole'),
(9, 'cancel users with role 17', 'administerusersbyrole'),
(9, 'cancel users with role 19', 'administerusersbyrole'),
(9, 'cancel users with role 2', 'administerusersbyrole'),
(9, 'cancel users with role 9', 'administerusersbyrole'),
(9, 'delete activities', 'civicrm'),
(9, 'delete contacts', 'civicrm'),
(9, 'delete contacts permanently', 'nyss_civihooks'),
(9, 'delete in CiviCase', 'civicrm'),
(9, 'edit all contacts', 'civicrm'),
(9, 'edit groups', 'civicrm'),
(9, 'edit my contact', 'civicrm'),
(9, 'edit users with role 10', 'administerusersbyrole'),
(9, 'edit users with role 11', 'administerusersbyrole'),
(9, 'edit users with role 12', 'administerusersbyrole'),
(9, 'edit users with role 13', 'administerusersbyrole'),
(9, 'edit users with role 14', 'administerusersbyrole'),
(9, 'edit users with role 15', 'administerusersbyrole'),
(9, 'edit users with role 16', 'administerusersbyrole'),
(9, 'edit users with role 17', 'administerusersbyrole'),
(9, 'edit users with role 19', 'administerusersbyrole'),
(9, 'edit users with role 2', 'administerusersbyrole'),
(9, 'edit users with role 9', 'administerusersbyrole'),
(9, 'manage tags', 'civicrm'),
(9, 'merge duplicate contacts', 'civicrm'),
(9, 'profile create', 'civicrm'),
(9, 'profile edit', 'civicrm'),
(9, 'profile listings', 'civicrm'),
(9, 'profile listings and forms', 'civicrm'),
(9, 'profile view', 'civicrm'),
(9, 'save Report Criteria', 'civicrm'),
(9, 'use text format 1', 'filter'),
(9, 'view all activities', 'civicrm'),
(9, 'view all contacts', 'civicrm'),
(9, 'view my contact', 'civicrm'),
(9, 'view the administration theme', 'system'),
(9, 'edit message templates', 'civicrm'),
(10, 'access all cases and activities', 'civicrm'),
(10, 'access all custom data', 'civicrm'),
(10, 'access CiviCRM', 'civicrm'),
(10, 'access CiviReport', 'civicrm'),
(10, 'access Contact Dashboard', 'civicrm'),
(10, 'access deleted contacts', 'civicrm'),
(10, 'access inbox polling', 'nyss_civihooks'),
(10, 'access my cases and activities', 'civicrm'),
(10, 'access Report Criteria', 'civicrm'),
(10, 'access uploaded files', 'civicrm'),
(10, 'add cases', 'civicrm'),
(10, 'add contacts', 'civicrm'),
(10, 'administer Reports', 'civicrm'),
(10, 'save Report Criteria', 'civicrm'),
(10, 'delete activities', 'civicrm'),
(10, 'delete contacts', 'civicrm'),
(10, 'delete in CiviCase', 'civicrm'),
(10, 'edit all contacts', 'civicrm'),
(10, 'edit groups', 'civicrm'),
(10, 'edit my contact', 'civicrm'),
(10, 'manage tags', 'civicrm'),
(10, 'merge duplicate contacts', 'civicrm'),
(10, 'profile create', 'civicrm'),
(10, 'profile edit', 'civicrm'),
(10, 'profile listings', 'civicrm'),
(10, 'profile listings and forms', 'civicrm'),
(10, 'profile view', 'civicrm'),
(10, 'use text format 1', 'filter'),
(10, 'view all activities', 'civicrm'),
(10, 'view all contacts', 'civicrm'),
(10, 'view my contact', 'civicrm'),
(10, 'edit message templates', 'civicrm'),
(11, 'access all cases and activities', 'civicrm'),
(11, 'access all custom data', 'civicrm'),
(11, 'access CiviCRM', 'civicrm'),
(11, 'access CiviReport', 'civicrm'),
(11, 'access Contact Dashboard', 'civicrm'),
(11, 'access deleted contacts', 'civicrm'),
(11, 'access my cases and activities', 'civicrm'),
(11, 'access Report Criteria', 'civicrm'),
(11, 'access uploaded files', 'civicrm'),
(11, 'add cases', 'civicrm'),
(11, 'add contacts', 'civicrm'),
(11, 'administer Reports', 'civicrm'),
(11, 'save Report Criteria', 'civicrm'),
(11, 'delete activities', 'civicrm'),
(11, 'delete contacts', 'civicrm'),
(11, 'delete in CiviCase', 'civicrm'),
(11, 'edit all contacts', 'civicrm'),
(11, 'edit groups', 'civicrm'),
(11, 'edit my contact', 'civicrm'),
(11, 'profile create', 'civicrm'),
(11, 'profile edit', 'civicrm'),
(11, 'profile listings', 'civicrm'),
(11, 'profile view', 'civicrm'),
(11, 'use text format 1', 'filter'),
(11, 'view all activities', 'civicrm'),
(11, 'view all contacts', 'civicrm'),
(11, 'view my contact', 'civicrm'),
(12, 'access all custom data', 'civicrm'),
(12, 'access CiviCRM', 'civicrm'),
(12, 'access uploaded files', 'civicrm'),
(12, 'access CiviReport', 'civicrm'),
(12, 'add contacts', 'civicrm'),
(12, 'edit all contacts', 'civicrm'),
(12, 'edit my contact', 'civicrm'),
(12, 'profile create', 'civicrm'),
(12, 'profile edit', 'civicrm'),
(12, 'profile listings', 'civicrm'),
(12, 'profile listings and forms', 'civicrm'),
(12, 'profile view', 'civicrm'),
(12, 'use text format 1', 'filter'),
(12, 'view all activities', 'civicrm'),
(12, 'view all contacts', 'civicrm'),
(12, 'view my contact', 'civicrm'),
(13, 'access all custom data', 'civicrm'),
(13, 'access CiviCRM', 'civicrm'),
(13, 'access my cases and activities', 'civicrm'),
(13, 'access uploaded files', 'civicrm'),
(13, 'access CiviReport', 'civicrm'),
(13, 'add contacts', 'civicrm'),
(13, 'edit my contact', 'civicrm'),
(13, 'profile create', 'civicrm'),
(13, 'profile edit', 'civicrm'),
(13, 'profile listings', 'civicrm'),
(13, 'profile view', 'civicrm'),
(13, 'use text format 1', 'filter'),
(13, 'view all activities', 'civicrm'),
(13, 'view all contacts', 'civicrm'),
(13, 'view my contact', 'civicrm'),
(14, 'create mailings', 'civicrm'),
(14, 'delete in CiviMail', 'civicrm'),
(14, 'edit message templates', 'civicrm'),
(14, 'use text format 1', 'filter'),
(15, 'schedule mailings', 'civicrm'),
(15, 'delete in CiviMail', 'civicrm'),
(15, 'use text format 1', 'filter'),
(16, 'approve mailings', 'civicrm'),
(16, 'delete in CiviMail', 'civicrm'),
(16, 'use text format 1', 'filter'),
(18, 'access all custom data', 'civicrm'),
(18, 'access CiviCRM', 'civicrm'),
(18, 'access CiviReport', 'civicrm'),
(18, 'access site in maintenance mode', 'system'),
(18, 'administer reserved groups', 'civicrm'),
(18, 'administer site configuration', 'system'),
(18, 'edit groups', 'civicrm'),
(18, 'export print production files', 'nyss_civihooks'),
(18, 'import contacts', 'civicrm'),
(18, 'profile create', 'civicrm'),
(18, 'profile edit', 'civicrm'),
(18, 'profile listings', 'civicrm'),
(18, 'profile view', 'civicrm'),
(18, 'use text format 1', 'filter'),
(18, 'view all contacts', 'civicrm'),
(18, 'view my contact', 'civicrm'),
(19, 'access inbox polling', 'nyss_civihooks'),
(19, 'edit inbound email basic information', 'civicrm'),
(19, 'edit inbound email basic information and content', 'civicrm');
"
$execSql -q $instance -c "$sql" --drupal
## set role weights to 0 to defer to alpha order
sql="
UPDATE role
SET weight = 0;
"
$execSql -q $instance -c "$sql" --drupal
echo "finished resetting roles and permissions.";