Merge branch 'MDL-60352-master' of git://github.com/andrewnicols/moodle
[moodle.git] / lib / db / access.php
CommitLineData
117bd748 1<?php
5b4a78e2 2// This file is part of Moodle - http://moodle.org/
bbbf2d40 3//
5b4a78e2
PS
4// Moodle is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
bbbf2d40 8//
5b4a78e2
PS
9// Moodle is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
bbbf2d40 13//
5b4a78e2
PS
14// You should have received a copy of the GNU General Public License
15// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16
17/**
18 * Capability definitions for Moodle core.
19 *
20 * The capabilities are loaded into the database table when the module is
21 * installed or updated. Whenever the capability definitions are updated,
22 * the module version number should be bumped up.
23 *
24 * The system has four possible values for a capability:
25 * CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
26 *
27 *
28 * CAPABILITY NAMING CONVENTION
29 *
30 * It is important that capability names are unique. The naming convention
31 * for capabilities that are specific to modules and blocks is as follows:
32 * [mod/block]/<plugin_name>:<capabilityname>
33 *
34 * component_name should be the same as the directory name of the mod or block.
35 *
36 * Core moodle capabilities are defined thus:
37 * moodle/<capabilityclass>:<capabilityname>
38 *
39 * Examples: mod/forum:viewpost
40 * block/recent_activity:view
41 * moodle/site:deleteuser
42 *
43 * The variable name for the capability definitions array is $capabilities
44 *
39b90b51
EL
45 * For more information, take a look to the documentation available:
46 * - Access API: {@link http://docs.moodle.org/dev/Access_API}
47 * - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}
48 *
49 * @package core_access
50 * @category access
51 * @copyright 2006 onwards Martin Dougiamas http://dougiamas.com
52 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
5b4a78e2 53 */
bbbf2d40 54
5b4a78e2 55defined('MOODLE_INTERNAL') || die();
bbbf2d40 56
0ac940b3 57$capabilities = array(
bbbf2d40 58 'moodle/site:config' => array(
eef868d1 59
f432bebf 60 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
21b6db6e 61
bbbf2d40 62 'captype' => 'write',
63 'contextlevel' => CONTEXT_SYSTEM,
31c93303 64 'archetypes' => array(
bbbf2d40 65 )
66 ),
2a7c540c
DW
67 'moodle/site:configview' => array(
68 'captype' => 'read',
69 'contextlevel' => CONTEXT_SYSTEM,
70 'archetypes' => array(
71 'manager' => CAP_ALLOW,
b1eb88a4 72 'coursecreator' => CAP_ALLOW,
2a7c540c
DW
73 )
74 ),
eef868d1 75
51792df0 76 'moodle/site:readallmessages' => array(
eef868d1 77
bcdb0f19 78 'riskbitmask' => RISK_PERSONAL,
79
51792df0 80 'captype' => 'read',
81 'contextlevel' => CONTEXT_SYSTEM,
31c93303 82 'archetypes' => array(
4f0c2d00 83 'manager' => CAP_ALLOW,
4b7ae3c4 84 'editingteacher' => CAP_ALLOW
51792df0 85 )
86 ),
f7c0d84b 87
343ba16c
SL
88 'moodle/site:manageallmessaging' => array(
89
90 'riskbitmask' => RISK_PERSONAL,
91
92 'captype' => 'write',
93 'contextlevel' => CONTEXT_SYSTEM,
94 'archetypes' => array(
95 'manager' => CAP_ALLOW
96 )
97 ),
98
45823085
MN
99 'moodle/site:deleteanymessage' => array(
100
101 'riskbitmask' => RISK_DATALOSS,
102
103 'captype' => 'write',
104 'contextlevel' => CONTEXT_SYSTEM,
105 'archetypes' => array(
106 'manager' => CAP_ALLOW
107 )
108 ),
109
576ad290 110 'moodle/site:sendmessage' => array(
111
3a0c6cca 112 'riskbitmask' => RISK_SPAM,
576ad290 113
114 'captype' => 'write',
115 'contextlevel' => CONTEXT_SYSTEM,
31c93303 116 'archetypes' => array(
4f0c2d00 117 'manager' => CAP_ALLOW,
576ad290 118 'user' => CAP_ALLOW
119 )
f7c0d84b 120 ),
eef868d1 121
45823085
MN
122 'moodle/site:deleteownmessage' => array(
123
124 'captype' => 'write',
125 'contextlevel' => CONTEXT_SYSTEM,
126 'archetypes' => array(
127 'user' => CAP_ALLOW
128 )
129 ),
130
51792df0 131 'moodle/site:approvecourse' => array(
eef868d1 132
bcdb0f19 133 'riskbitmask' => RISK_XSS,
134
51792df0 135 'captype' => 'write',
136 'contextlevel' => CONTEXT_SYSTEM,
31c93303 137 'archetypes' => array(
4f0c2d00 138 'manager' => CAP_ALLOW
51792df0 139 )
140 ),
eef868d1 141
d2940003 142 'moodle/backup:backupcourse' => array(
eef868d1 143
21b6db6e 144 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
145
bbbf2d40 146 'captype' => 'write',
f432bebf 147 'contextlevel' => CONTEXT_COURSE,
31c93303 148 'archetypes' => array(
7246585a 149 'editingteacher' => CAP_ALLOW,
4f0c2d00 150 'manager' => CAP_ALLOW
d2940003
EL
151 ),
152
153 'clonepermissionsfrom' => 'moodle/site:backup'
bbbf2d40 154 ),
eef868d1 155
57ca97b3
EL
156 'moodle/backup:backupsection' => array(
157
158 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
159
160 'captype' => 'write',
161 'contextlevel' => CONTEXT_COURSE,
31c93303 162 'archetypes' => array(
57ca97b3
EL
163 'editingteacher' => CAP_ALLOW,
164 'manager' => CAP_ALLOW
165 ),
166
167 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
168 ),
169
170 'moodle/backup:backupactivity' => array(
171
172 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
173
174 'captype' => 'write',
175 'contextlevel' => CONTEXT_MODULE,
31c93303 176 'archetypes' => array(
57ca97b3
EL
177 'editingteacher' => CAP_ALLOW,
178 'manager' => CAP_ALLOW
179 ),
180
181 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
182 ),
183
184 'moodle/backup:backuptargethub' => array(
185
186 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
187
188 'captype' => 'write',
189 'contextlevel' => CONTEXT_COURSE,
31c93303 190 'archetypes' => array(
57ca97b3
EL
191 'editingteacher' => CAP_ALLOW,
192 'manager' => CAP_ALLOW
193 ),
194
195 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
196 ),
197
198 'moodle/backup:backuptargetimport' => array(
199
200 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
201
202 'captype' => 'write',
203 'contextlevel' => CONTEXT_COURSE,
31c93303 204 'archetypes' => array(
57ca97b3
EL
205 'editingteacher' => CAP_ALLOW,
206 'manager' => CAP_ALLOW
207 ),
208
209 'clonepermissionsfrom' => 'moodle/backup:backupcourse'
210 ),
211
2fdde5d1 212 'moodle/backup:downloadfile' => array(
172dd12c 213
214 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
215
216 'captype' => 'write',
217 'contextlevel' => CONTEXT_COURSE,
31c93303 218 'archetypes' => array(
172dd12c 219 'editingteacher' => CAP_ALLOW,
4f0c2d00 220 'manager' => CAP_ALLOW
172dd12c 221 ),
222
2fdde5d1 223 'clonepermissionsfrom' => 'moodle/site:backupdownload'
172dd12c 224 ),
225
57ca97b3
EL
226 'moodle/backup:configure' => array(
227
228 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
229
230 'captype' => 'write',
231 'contextlevel' => CONTEXT_COURSE,
31c93303 232 'archetypes' => array(
57ca97b3
EL
233 'editingteacher' => CAP_ALLOW,
234 'manager' => CAP_ALLOW
235 )
236 ),
237
2fdde5d1 238 'moodle/backup:userinfo' => array(
172dd12c 239
2fdde5d1 240 'riskbitmask' => RISK_PERSONAL,
172dd12c 241
2fdde5d1 242 'captype' => 'read',
172dd12c 243 'contextlevel' => CONTEXT_COURSE,
31c93303 244 'archetypes' => array(
4f0c2d00 245 'manager' => CAP_ALLOW
2fdde5d1 246 )
172dd12c 247 ),
248
57ca97b3
EL
249 'moodle/backup:anonymise' => array(
250
251 'riskbitmask' => RISK_PERSONAL,
252
253 'captype' => 'read',
254 'contextlevel' => CONTEXT_COURSE,
31c93303 255 'archetypes' => array(
57ca97b3
EL
256 'manager' => CAP_ALLOW
257 )
258 ),
259
2fdde5d1 260 'moodle/restore:restorecourse' => array(
f2a0da6c 261
2fdde5d1 262 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
f2a0da6c 263
2fdde5d1 264 'captype' => 'write',
f2a0da6c 265 'contextlevel' => CONTEXT_COURSE,
31c93303 266 'archetypes' => array(
2fdde5d1 267 'editingteacher' => CAP_ALLOW,
4f0c2d00 268 'manager' => CAP_ALLOW
2fdde5d1
EL
269 ),
270
271 'clonepermissionsfrom' => 'moodle/site:restore'
f2a0da6c
EL
272 ),
273
57ca97b3
EL
274 'moodle/restore:restoresection' => array(
275
276 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
277
278 'captype' => 'write',
279 'contextlevel' => CONTEXT_COURSE,
31c93303 280 'archetypes' => array(
57ca97b3
EL
281 'editingteacher' => CAP_ALLOW,
282 'manager' => CAP_ALLOW
283 ),
284
285 'clonepermissionsfrom' => 'moodle/restore:restorecourse'
286 ),
287
288 'moodle/restore:restoreactivity' => array(
289
290 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
291
292 'captype' => 'write',
7efd488e 293 'contextlevel' => CONTEXT_COURSE,
31c93303 294 'archetypes' => array(
57ca97b3
EL
295 'editingteacher' => CAP_ALLOW,
296 'manager' => CAP_ALLOW
297 ),
298
299 'clonepermissionsfrom' => 'moodle/restore:restorecourse'
300 ),
301
bac233d3
SH
302 'moodle/restore:viewautomatedfilearea' => array(
303
304 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
305
306 'captype' => 'write',
307 'contextlevel' => CONTEXT_COURSE,
308 ),
309
57ca97b3
EL
310 'moodle/restore:restoretargethub' => array(
311
312 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
313
314 'captype' => 'write',
315 'contextlevel' => CONTEXT_COURSE,
31c93303 316 'archetypes' => array(
57ca97b3
EL
317 'editingteacher' => CAP_ALLOW,
318 'manager' => CAP_ALLOW
319 ),
320
321 'clonepermissionsfrom' => 'moodle/restore:restorecourse'
322 ),
323
157aa3a2 324 'moodle/restore:restoretargetimport' => array(
eef868d1 325
21b6db6e 326 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
327
bbbf2d40 328 'captype' => 'write',
f432bebf 329 'contextlevel' => CONTEXT_COURSE,
31c93303 330 'archetypes' => array(
7246585a 331 'editingteacher' => CAP_ALLOW,
4f0c2d00 332 'manager' => CAP_ALLOW
d2940003
EL
333 ),
334
157aa3a2 335 'clonepermissionsfrom' => 'moodle/site:import'
bbbf2d40 336 ),
eef868d1 337
157aa3a2 338 'moodle/restore:uploadfile' => array(
5e934890 339
157aa3a2 340 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
5e934890
EL
341
342 'captype' => 'write',
157aa3a2 343 'contextlevel' => CONTEXT_COURSE,
31c93303 344 'archetypes' => array(
157aa3a2 345 'editingteacher' => CAP_ALLOW,
4f0c2d00 346 'manager' => CAP_ALLOW
157aa3a2
EL
347 ),
348
349 'clonepermissionsfrom' => 'moodle/site:backupupload'
5e934890
EL
350 ),
351
57ca97b3 352 'moodle/restore:configure' => array(
f6459d12 353
57ca97b3 354 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
f6459d12
EL
355
356 'captype' => 'write',
357 'contextlevel' => CONTEXT_COURSE,
31c93303 358 'archetypes' => array(
57ca97b3 359 'editingteacher' => CAP_ALLOW,
4f0c2d00 360 'manager' => CAP_ALLOW
f6459d12
EL
361 )
362 ),
363
57ca97b3 364 'moodle/restore:rolldates' => array(
157aa3a2
EL
365
366 'captype' => 'write',
57ca97b3 367 'contextlevel' => CONTEXT_COURSE,
31c93303 368 'archetypes' => array(
57ca97b3 369 'coursecreator' => CAP_ALLOW,
4f0c2d00 370 'manager' => CAP_ALLOW
157aa3a2
EL
371 )
372 ),
373
57ca97b3
EL
374 'moodle/restore:userinfo' => array(
375
376 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
982e45af 377
378 'captype' => 'write',
379 'contextlevel' => CONTEXT_COURSE,
31c93303 380 'archetypes' => array(
57ca97b3
EL
381 'manager' => CAP_ALLOW
382 )
383 ),
384
385 'moodle/restore:createuser' => array(
386
387 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
388
389 'captype' => 'write',
390 'contextlevel' => CONTEXT_SYSTEM,
31c93303 391 'archetypes' => array(
4f0c2d00 392 'manager' => CAP_ALLOW
982e45af 393 )
394 ),
395
bbbf2d40 396 'moodle/site:manageblocks' => array(
eef868d1 397
21b6db6e 398 'riskbitmask' => RISK_SPAM | RISK_XSS,
399
bbbf2d40 400 'captype' => 'write',
f432bebf 401 'contextlevel' => CONTEXT_BLOCK,
31c93303 402 'archetypes' => array(
73b73d21 403 'editingteacher' => CAP_ALLOW,
4f0c2d00 404 'manager' => CAP_ALLOW
bbbf2d40 405 )
406 ),
eef868d1 407
27950688 408 'moodle/site:accessallgroups' => array(
eef868d1 409
27950688 410 'captype' => 'read',
f432bebf 411 'contextlevel' => CONTEXT_COURSE,
31c93303 412 'archetypes' => array(
27950688 413 'editingteacher' => CAP_ALLOW,
4f0c2d00 414 'manager' => CAP_ALLOW
27950688 415 )
416 ),
eef868d1 417
53d7785b 418 'moodle/site:viewfullnames' => array(
eef868d1 419
53d7785b 420 'captype' => 'read',
f432bebf 421 'contextlevel' => CONTEXT_COURSE,
31c93303 422 'archetypes' => array(
53d7785b 423 'teacher' => CAP_ALLOW,
424 'editingteacher' => CAP_ALLOW,
4f0c2d00 425 'manager' => CAP_ALLOW
53d7785b 426 )
427 ),
eef868d1 428
5c60a847 429 // In reports that give lists of users, extra information about each user's
430 // identity (the fields configured in site option showuseridentity) will be
431 // displayed to users who have this capability.
432 'moodle/site:viewuseridentity' => array(
433
434 'captype' => 'read',
435 'contextlevel' => CONTEXT_COURSE,
436 'archetypes' => array(
437 'teacher' => CAP_ALLOW,
438 'editingteacher' => CAP_ALLOW,
439 'manager' => CAP_ALLOW
440 )
441 ),
442
a028c291 443 'moodle/site:viewreports' => array(
eef868d1 444
21b6db6e 445 'riskbitmask' => RISK_PERSONAL,
446
a028c291 447 'captype' => 'read',
f432bebf 448 'contextlevel' => CONTEXT_COURSE,
31c93303 449 'archetypes' => array(
a028c291 450 'teacher' => CAP_ALLOW,
451 'editingteacher' => CAP_ALLOW,
4f0c2d00 452 'manager' => CAP_ALLOW
a028c291 453 )
454 ),
eef868d1 455
7d8a3cb0 456 'moodle/site:trustcontent' => array(
eef868d1 457
21b6db6e 458 'riskbitmask' => RISK_XSS,
459
7d8a3cb0 460 'captype' => 'write',
f432bebf 461 'contextlevel' => CONTEXT_COURSE,
31c93303 462 'archetypes' => array(
7d8a3cb0 463 'editingteacher' => CAP_ALLOW,
4f0c2d00 464 'manager' => CAP_ALLOW
7d8a3cb0 465 )
466 ),
eef868d1 467
6df3c7df 468 'moodle/site:uploadusers' => array(
eef868d1 469
21b6db6e 470 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
471
bbbf2d40 472 'captype' => 'write',
473 'contextlevel' => CONTEXT_SYSTEM,
31c93303 474 'archetypes' => array(
4f0c2d00 475 'manager' => CAP_ALLOW
bbbf2d40 476 )
477 ),
eef868d1 478
94211250 479 // Permission to manage filter setting overrides in subcontexts.
480 'moodle/filter:manage' => array(
481
482 'captype' => 'write',
483 'contextlevel' => CONTEXT_COURSE,
31c93303 484 'archetypes' => array(
94211250 485 'editingteacher' => CAP_ALLOW,
4f0c2d00 486 'manager' => CAP_ALLOW,
94211250 487 )
488 ),
6df3c7df 489
490 'moodle/user:create' => array(
491
492 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
eef868d1 493
bbbf2d40 494 'captype' => 'write',
495 'contextlevel' => CONTEXT_SYSTEM,
31c93303 496 'archetypes' => array(
4f0c2d00 497 'manager' => CAP_ALLOW
bbbf2d40 498 )
499 ),
eef868d1 500
6df3c7df 501 'moodle/user:delete' => array(
cc891abe 502
9c064d03 503 'riskbitmask' => RISK_PERSONAL | RISK_DATALOSS,
bcdb0f19 504
cc891abe 505 'captype' => 'write',
506 'contextlevel' => CONTEXT_SYSTEM,
31c93303 507 'archetypes' => array(
4f0c2d00 508 'manager' => CAP_ALLOW
cc891abe 509 )
510 ),
511
6df3c7df 512 'moodle/user:update' => array(
cc891abe 513
514 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
21b6db6e 515
bbbf2d40 516 'captype' => 'write',
517 'contextlevel' => CONTEXT_SYSTEM,
31c93303 518 'archetypes' => array(
4f0c2d00 519 'manager' => CAP_ALLOW
bbbf2d40 520 )
521 ),
eef868d1 522
bbbf2d40 523 'moodle/user:viewdetails' => array(
eef868d1 524
e58eca72 525 'captype' => 'read',
f432bebf 526 'contextlevel' => CONTEXT_COURSE,
31c93303 527 'archetypes' => array(
22ae509e 528 'guest' => CAP_ALLOW,
529 'student' => CAP_ALLOW,
530 'teacher' => CAP_ALLOW,
531 'editingteacher' => CAP_ALLOW,
4f0c2d00 532 'manager' => CAP_ALLOW
bbbf2d40 533 )
534 ),
e58eca72 535
6d153e67 536 'moodle/user:viewalldetails' => array(
537 'riskbitmask' => RISK_PERSONAL,
538 'captype' => 'read',
539 'contextlevel' => CONTEXT_USER,
540 'archetypes' => array(
541 'manager' => CAP_ALLOW
542 ),
543 'clonepermissionsfrom' => 'moodle/user:update'
544 ),
545
9d9361e8
DNA
546 'moodle/user:viewlastip' => array(
547 'riskbitmask' => RISK_PERSONAL,
548 'captype' => 'read',
549 'contextlevel' => CONTEXT_USER,
550 'archetypes' => array(
551 'manager' => CAP_ALLOW
552 ),
553 'clonepermissionsfrom' => 'moodle/user:update'
554 ),
555
e58eca72 556 'moodle/user:viewhiddendetails' => array(
eef868d1 557
21b6db6e 558 'riskbitmask' => RISK_PERSONAL,
559
e58eca72 560 'captype' => 'read',
f432bebf 561 'contextlevel' => CONTEXT_COURSE,
31c93303 562 'archetypes' => array(
e58eca72 563 'teacher' => CAP_ALLOW,
564 'editingteacher' => CAP_ALLOW,
4f0c2d00 565 'manager' => CAP_ALLOW
e58eca72 566 )
567 ),
eef868d1 568
6c95827f 569 'moodle/user:loginas' => array(
570
571 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
572
573 'captype' => 'write',
574 'contextlevel' => CONTEXT_COURSE,
31c93303 575 'archetypes' => array(
4f0c2d00 576 'manager' => CAP_ALLOW
6c95827f 577 )
578 ),
579
03d9401e
MD
580 // can the user manage the system default profile page?
581 'moodle/user:managesyspages' => array(
582
583 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
584
585 'captype' => 'write',
586 'contextlevel' => CONTEXT_SYSTEM,
31c93303 587 'archetypes' => array(
03d9401e
MD
588 'manager' => CAP_ALLOW
589 )
590 ),
591
592 // can the user manage another user's profile page?
593 'moodle/user:manageblocks' => array(
594
595 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
596
597 'captype' => 'write',
598 'contextlevel' => CONTEXT_USER
599 ),
600
601 // can the user manage their own profile page?
602 'moodle/user:manageownblocks' => array(
603
604 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
605
606 'captype' => 'write',
607 'contextlevel' => CONTEXT_SYSTEM,
31c93303 608 'archetypes' => array(
e4f413b4
MD
609 'user' => CAP_ALLOW
610 )
611 ),
612
613 // can the user manage their own files?
614 'moodle/user:manageownfiles' => array(
615
616 'riskbitmap' => RISK_SPAM | RISK_PERSONAL,
617
618 'captype' => 'write',
619 'contextlevel' => CONTEXT_SYSTEM,
620 'archetypes' => array(
621 'user' => CAP_ALLOW
03d9401e
MD
622 )
623 ),
624
380c122f
FM
625 // Can the user ignore the setting userquota?
626 // The permissions are cloned from ignorefilesizelimits as it was partly used for that purpose.
627 'moodle/user:ignoreuserquota' => array(
628 'riskbitmap' => RISK_SPAM,
629 'captype' => 'write',
630 'contextlevel' => CONTEXT_SYSTEM,
631 'clonepermissionsfrom' => 'moodle/course:ignorefilesizelimits'
632 ),
633
03d9401e
MD
634 // can the user manage the system default dashboard page?
635 'moodle/my:configsyspages' => array(
636
637 'riskbitmap' => RISK_SPAM | RISK_PERSONAL | RISK_CONFIG,
638
639 'captype' => 'write',
640 'contextlevel' => CONTEXT_SYSTEM,
31c93303 641 'archetypes' => array(
03d9401e
MD
642 'manager' => CAP_ALLOW
643 )
644 ),
645
bbbf2d40 646 'moodle/role:assign' => array(
eef868d1 647
3a0c6cca 648 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
649
bbbf2d40 650 'captype' => 'write',
f432bebf 651 'contextlevel' => CONTEXT_COURSE,
31c93303 652 'archetypes' => array(
861fdcaa 653 'editingteacher' => CAP_ALLOW,
4f0c2d00 654 'manager' => CAP_ALLOW
68c52526 655 )
656 ),
eef868d1 657
01a2ce80
PS
658 'moodle/role:review' => array(
659
660 'riskbitmask' => RISK_PERSONAL,
661
662 'captype' => 'read',
663 'contextlevel' => CONTEXT_COURSE,
31c93303 664 'archetypes' => array(
01a2ce80
PS
665 'teacher' => CAP_ALLOW,
666 'editingteacher' => CAP_ALLOW,
4f0c2d00 667 'manager' => CAP_ALLOW
01a2ce80
PS
668 )
669 ),
670
68c52526 671 'moodle/role:override' => array(
eef868d1 672
bcdb0f19 673 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
674
68c52526 675 'captype' => 'write',
f432bebf 676 'contextlevel' => CONTEXT_COURSE,
31c93303 677 'archetypes' => array(
4f0c2d00 678 'manager' => CAP_ALLOW
bbbf2d40 679 )
680 ),
eef868d1 681
3a0c6cca 682 'moodle/role:safeoverride' => array(
683
684 'riskbitmask' => RISK_SPAM,
685
686 'captype' => 'write',
f432bebf 687 'contextlevel' => CONTEXT_COURSE,
31c93303 688 'archetypes' => array(
3a0c6cca 689 'editingteacher' => CAP_ALLOW
690 )
691 ),
692
bbbf2d40 693 'moodle/role:manage' => array(
eef868d1 694
bcdb0f19 695 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
696
bbbf2d40 697 'captype' => 'write',
698 'contextlevel' => CONTEXT_SYSTEM,
31c93303 699 'archetypes' => array(
4f0c2d00 700 'manager' => CAP_ALLOW
bbbf2d40 701 )
702 ),
f43ce1ad 703
20dd4cf5 704 'moodle/role:switchroles' => array(
bcdb0f19 705
3a0c6cca 706 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
bcdb0f19 707
20dd4cf5 708 'captype' => 'read',
f432bebf 709 'contextlevel' => CONTEXT_COURSE,
31c93303 710 'archetypes' => array(
20dd4cf5 711 'editingteacher' => CAP_ALLOW,
4f0c2d00 712 'manager' => CAP_ALLOW
20dd4cf5 713 )
714 ),
715
8ed5dd63 716 // Create, update and delete course categories. (Deleting a course category
717 // does not let you delete the courses it contains, unless you also have
718 // moodle/course: delete.) Creating and deleting requires this permission in
719 // the parent category.
720 'moodle/category:manage' => array(
eef868d1 721
89a792ab 722 'riskbitmask' => RISK_XSS,
723
bbbf2d40 724 'captype' => 'write',
725 'contextlevel' => CONTEXT_COURSECAT,
31c93303 726 'archetypes' => array(
4f0c2d00 727 'manager' => CAP_ALLOW
8ed5dd63 728 ),
729 'clonepermissionsfrom' => 'moodle/category:update'
bbbf2d40 730 ),
eef868d1 731
8ed5dd63 732 'moodle/category:viewhiddencategories' => array(
eef868d1 733
8ed5dd63 734 'captype' => 'read',
bbbf2d40 735 'contextlevel' => CONTEXT_COURSECAT,
31c93303 736 'archetypes' => array(
8ed5dd63 737 'coursecreator' => CAP_ALLOW,
4f0c2d00 738 'manager' => CAP_ALLOW
8ed5dd63 739 ),
740 'clonepermissionsfrom' => 'moodle/category:visibility'
bbbf2d40 741 ),
eef868d1 742
3f791403
PS
743 // create, delete, move cohorts in system and course categories,
744 // (cohorts with component !== null can be only moved)
745 'moodle/cohort:manage' => array(
746
747 'captype' => 'write',
748 'contextlevel' => CONTEXT_COURSECAT,
31c93303 749 'archetypes' => array(
3f791403
PS
750 'manager' => CAP_ALLOW
751 )
752 ),
753
754 // add and remove cohort members (only for cohorts where component !== null)
755 'moodle/cohort:assign' => array(
756
757 'captype' => 'write',
758 'contextlevel' => CONTEXT_COURSECAT,
31c93303 759 'archetypes' => array(
3f791403
PS
760 'manager' => CAP_ALLOW
761 )
762 ),
763
80f98467 764 // View visible and hidden cohorts defined in the current context.
3f791403
PS
765 'moodle/cohort:view' => array(
766
767 'captype' => 'read',
768 'contextlevel' => CONTEXT_COURSE,
31c93303 769 'archetypes' => array(
3f791403
PS
770 'editingteacher' => CAP_ALLOW,
771 'manager' => CAP_ALLOW
772 )
773 ),
774
bbbf2d40 775 'moodle/course:create' => array(
eef868d1 776
21b6db6e 777 'riskbitmask' => RISK_XSS,
778
bbbf2d40 779 'captype' => 'write',
5e992f56 780 'contextlevel' => CONTEXT_COURSECAT,
31c93303 781 'archetypes' => array(
4473252d 782 'coursecreator' => CAP_ALLOW,
4f0c2d00 783 'manager' => CAP_ALLOW
bbbf2d40 784 )
785 ),
eef868d1 786
e452210a 787 'moodle/course:request' => array(
788 'captype' => 'write',
789 'contextlevel' => CONTEXT_SYSTEM,
31c93303 790 'archetypes' => array(
e452210a 791 'user' => CAP_ALLOW,
792 )
793 ),
794
bbbf2d40 795 'moodle/course:delete' => array(
eef868d1 796
3a0c6cca 797 'riskbitmask' => RISK_DATALOSS,
798
bbbf2d40 799 'captype' => 'write',
800 'contextlevel' => CONTEXT_COURSE,
31c93303 801 'archetypes' => array(
4f0c2d00 802 'manager' => CAP_ALLOW
bbbf2d40 803 )
804 ),
eef868d1 805
bbbf2d40 806 'moodle/course:update' => array(
eef868d1 807
21b6db6e 808 'riskbitmask' => RISK_XSS,
809
bbbf2d40 810 'captype' => 'write',
811 'contextlevel' => CONTEXT_COURSE,
31c93303 812 'archetypes' => array(
bbbf2d40 813 'editingteacher' => CAP_ALLOW,
4f0c2d00 814 'manager' => CAP_ALLOW
bbbf2d40 815 )
816 ),
eef868d1 817
df997f84 818 'moodle/course:view' => array(
eef868d1 819
bbbf2d40 820 'captype' => 'read',
821 'contextlevel' => CONTEXT_COURSE,
31c93303 822 'archetypes' => array(
df997f84 823 'manager' => CAP_ALLOW,
bbbf2d40 824 )
825 ),
eef868d1 826
df997f84
PS
827 /* review course enrolments - no group restrictions, it is really full access to all participants info*/
828 'moodle/course:enrolreview' => array(
829
830 'riskbitmask' => RISK_PERSONAL,
4f0c2d00
PS
831
832 'captype' => 'read',
833 'contextlevel' => CONTEXT_COURSE,
31c93303 834 'archetypes' => array(
df997f84
PS
835 'editingteacher' => CAP_ALLOW,
836 'manager' => CAP_ALLOW,
837 )
838 ),
839
840 /* add, remove, hide enrol instances in courses */
841 'moodle/course:enrolconfig' => array(
842
843 'riskbitmask' => RISK_PERSONAL,
844
845 'captype' => 'write',
846 'contextlevel' => CONTEXT_COURSE,
847 'archetypes' => array(
848 'editingteacher' => CAP_ALLOW,
4f0c2d00
PS
849 'manager' => CAP_ALLOW,
850 )
851 ),
852
288e7b09
EM
853 'moodle/course:reviewotherusers' => array(
854
855 'captype' => 'read',
856 'contextlevel' => CONTEXT_COURSE,
857 'archetypes' => array(
858 'editingteacher' => CAP_ALLOW,
859 'manager' => CAP_ALLOW,
860 ),
861 'clonepermissionsfrom' => 'moodle/role:assign'
862 ),
863
77c645df 864 'moodle/course:bulkmessaging' => array(
865
866 'riskbitmask' => RISK_SPAM,
867
868 'captype' => 'write',
869 'contextlevel' => CONTEXT_COURSE,
31c93303 870 'archetypes' => array(
77c645df 871 'teacher' => CAP_ALLOW,
872 'editingteacher' => CAP_ALLOW,
4f0c2d00 873 'manager' => CAP_ALLOW
77c645df 874 )
875 ),
876
1c45e42e 877 'moodle/course:viewhiddenuserfields' => array(
eef868d1 878
21b6db6e 879 'riskbitmask' => RISK_PERSONAL,
4e781c7b 880
881 'captype' => 'read',
882 'contextlevel' => CONTEXT_COURSE,
31c93303 883 'archetypes' => array(
4e781c7b 884 'teacher' => CAP_ALLOW,
885 'editingteacher' => CAP_ALLOW,
4f0c2d00 886 'manager' => CAP_ALLOW
4e781c7b 887 )
888 ),
889
1c45e42e 890 'moodle/course:viewhiddencourses' => array(
eef868d1 891
1c45e42e 892 'captype' => 'read',
893 'contextlevel' => CONTEXT_COURSE,
31c93303 894 'archetypes' => array(
2f5ab42b 895 'coursecreator' => CAP_ALLOW,
896 'teacher' => CAP_ALLOW,
897 'editingteacher' => CAP_ALLOW,
4f0c2d00 898 'manager' => CAP_ALLOW
1c45e42e 899 )
900 ),
eef868d1 901
bbbf2d40 902 'moodle/course:visibility' => array(
eef868d1 903
bbbf2d40 904 'captype' => 'write',
905 'contextlevel' => CONTEXT_COURSE,
31c93303 906 'archetypes' => array(
df997f84 907 'editingteacher' => CAP_ALLOW,
4f0c2d00 908 'manager' => CAP_ALLOW
bbbf2d40 909 )
910 ),
eef868d1 911
a028c291 912 'moodle/course:managefiles' => array(
eef868d1 913
21b6db6e 914 'riskbitmask' => RISK_XSS,
915
a028c291 916 'captype' => 'write',
917 'contextlevel' => CONTEXT_COURSE,
31c93303 918 'archetypes' => array(
a028c291 919 'editingteacher' => CAP_ALLOW,
4f0c2d00 920 'manager' => CAP_ALLOW
a028c291 921 )
922 ),
eef868d1 923
6a36b852
J
924 'moodle/course:ignoreavailabilityrestrictions' => array(
925 'captype' => 'read',
926 'contextlevel' => CONTEXT_MODULE,
927 'archetypes' => array(
928 'manager' => CAP_ALLOW,
929 'coursecreator' => CAP_ALLOW,
930 'editingteacher' => CAP_ALLOW,
931 'teacher' => CAP_ALLOW,
932 ),
933 'clonepermissionsfrom' => 'moodle/course:viewhiddenactivities'
934 ),
935
8ac95c27
AD
936 'moodle/course:ignorefilesizelimits' => array(
937
938 'captype' => 'write',
939 'contextlevel' => CONTEXT_COURSE,
940 'archetypes' => array(
941 )
942 ),
943
bbbf2d40 944 'moodle/course:manageactivities' => array(
eef868d1 945
21b6db6e 946 'riskbitmask' => RISK_XSS,
947
bbbf2d40 948 'captype' => 'write',
af189935 949 'contextlevel' => CONTEXT_MODULE,
31c93303 950 'archetypes' => array(
bbbf2d40 951 'editingteacher' => CAP_ALLOW,
4f0c2d00 952 'manager' => CAP_ALLOW
bbbf2d40 953 )
954 ),
eef868d1 955
bbbf2d40 956 'moodle/course:activityvisibility' => array(
eef868d1 957
bbbf2d40 958 'captype' => 'write',
af189935 959 'contextlevel' => CONTEXT_MODULE,
31c93303 960 'archetypes' => array(
bbbf2d40 961 'editingteacher' => CAP_ALLOW,
4f0c2d00 962 'manager' => CAP_ALLOW
bbbf2d40 963 )
964 ),
eef868d1 965
bbbf2d40 966 'moodle/course:viewhiddenactivities' => array(
eef868d1 967
bbbf2d40 968 'captype' => 'write',
af189935 969 'contextlevel' => CONTEXT_MODULE,
31c93303 970 'archetypes' => array(
bbbf2d40 971 'teacher' => CAP_ALLOW,
972 'editingteacher' => CAP_ALLOW,
4f0c2d00 973 'manager' => CAP_ALLOW
bbbf2d40 974 )
975 ),
eef868d1 976
bbbf2d40 977 'moodle/course:viewparticipants' => array(
eef868d1 978
bbbf2d40 979 'captype' => 'read',
980 'contextlevel' => CONTEXT_COURSE,
31c93303 981 'archetypes' => array(
bbbf2d40 982 'student' => CAP_ALLOW,
983 'teacher' => CAP_ALLOW,
984 'editingteacher' => CAP_ALLOW,
4f0c2d00 985 'manager' => CAP_ALLOW
165088f6 986 )
987 ),
f7c0d84b 988
989 'moodle/course:changefullname' => array(
990
cd7f72c0 991 'riskbitmask' => RISK_XSS,
992
f7c0d84b 993 'captype' => 'write',
994 'contextlevel' => CONTEXT_COURSE,
31c93303 995 'archetypes' => array(
f7c0d84b 996 'editingteacher' => CAP_ALLOW,
4f0c2d00 997 'manager' => CAP_ALLOW
5e99b9d7 998 ),
999 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 1000 ),
1001
1002 'moodle/course:changeshortname' => array(
1003
cd7f72c0 1004 'riskbitmask' => RISK_XSS,
1005
f7c0d84b 1006 'captype' => 'write',
1007 'contextlevel' => CONTEXT_COURSE,
31c93303 1008 'archetypes' => array(
f7c0d84b 1009 'editingteacher' => CAP_ALLOW,
4f0c2d00 1010 'manager' => CAP_ALLOW
5e99b9d7 1011 ),
1012 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 1013 ),
1014
502336f2
AH
1015 'moodle/course:renameroles' => array(
1016 'captype' => 'write',
1017 'contextlevel' => CONTEXT_COURSE,
1018 'archetypes' => array(
1019 'editingteacher' => CAP_ALLOW,
1020 'manager' => CAP_ALLOW
1021 ),
1022 'clonepermissionsfrom' => 'moodle/course:update'
1023 ),
1024
f7c0d84b 1025 'moodle/course:changeidnumber' => array(
1026
cd7f72c0 1027 'riskbitmask' => RISK_XSS,
1028
f7c0d84b 1029 'captype' => 'write',
1030 'contextlevel' => CONTEXT_COURSE,
31c93303 1031 'archetypes' => array(
f7c0d84b 1032 'editingteacher' => CAP_ALLOW,
4f0c2d00 1033 'manager' => CAP_ALLOW
5e99b9d7 1034 ),
1035 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 1036 ),
50569ba3 1037 'moodle/course:changecategory' => array(
1038 'riskbitmask' => RISK_XSS,
1039
1040 'captype' => 'write',
1041 'contextlevel' => CONTEXT_COURSE,
31c93303 1042 'archetypes' => array(
50569ba3 1043 'editingteacher' => CAP_ALLOW,
4f0c2d00 1044 'manager' => CAP_ALLOW
50569ba3 1045 ),
1046 'clonepermissionsfrom' => 'moodle/course:update'
1047 ),
1048
1049 'moodle/course:changesummary' => array(
1050 'riskbitmask' => RISK_XSS,
1051
1052 'captype' => 'write',
1053 'contextlevel' => CONTEXT_COURSE,
31c93303 1054 'archetypes' => array(
50569ba3 1055 'editingteacher' => CAP_ALLOW,
4f0c2d00 1056 'manager' => CAP_ALLOW
50569ba3 1057 ),
1058 'clonepermissionsfrom' => 'moodle/course:update'
1059 ),
1060
f7c0d84b 1061
165088f6 1062 'moodle/site:viewparticipants' => array(
1063
1064 'captype' => 'read',
1065 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1066 'archetypes' => array(
4f0c2d00 1067 'manager' => CAP_ALLOW
bbbf2d40 1068 )
1069 ),
eef868d1 1070
b61924d4 1071 'moodle/course:isincompletionreports' => array(
1072 'captype' => 'read',
1073 'contextlevel' => CONTEXT_COURSE,
1074 'archetypes' => array(
1075 'student' => CAP_ALLOW,
1076 ),
1077 ),
1078
bbbf2d40 1079 'moodle/course:viewscales' => array(
eef868d1 1080
bbbf2d40 1081 'captype' => 'read',
1082 'contextlevel' => CONTEXT_COURSE,
31c93303 1083 'archetypes' => array(
bbbf2d40 1084 'student' => CAP_ALLOW,
1085 'teacher' => CAP_ALLOW,
1086 'editingteacher' => CAP_ALLOW,
4f0c2d00 1087 'manager' => CAP_ALLOW
bbbf2d40 1088 )
1089 ),
eef868d1 1090
bbbf2d40 1091 'moodle/course:managescales' => array(
eef868d1 1092
bbbf2d40 1093 'captype' => 'write',
1094 'contextlevel' => CONTEXT_COURSE,
31c93303 1095 'archetypes' => array(
bbbf2d40 1096 'editingteacher' => CAP_ALLOW,
4f0c2d00 1097 'manager' => CAP_ALLOW
bbbf2d40 1098 )
1099 ),
eef868d1 1100
bbbf2d40 1101 'moodle/course:managegroups' => array(
1102
1103 'captype' => 'write',
1104 'contextlevel' => CONTEXT_COURSE,
31c93303 1105 'archetypes' => array(
a028c291 1106 'editingteacher' => CAP_ALLOW,
4f0c2d00 1107 'manager' => CAP_ALLOW
a028c291 1108 )
1109 ),
eef868d1 1110
a028c291 1111 'moodle/course:reset' => array(
1112
3a0c6cca 1113 'riskbitmask' => RISK_DATALOSS,
1114
a028c291 1115 'captype' => 'write',
1116 'contextlevel' => CONTEXT_COURSE,
31c93303 1117 'archetypes' => array(
bbbf2d40 1118 'editingteacher' => CAP_ALLOW,
4f0c2d00 1119 'manager' => CAP_ALLOW
bbbf2d40 1120 )
1121 ),
eef868d1 1122
38c1dd19
RT
1123 'moodle/course:viewsuspendedusers' => array(
1124
1125 'captype' => 'read',
1126 'contextlevel' => CONTEXT_SYSTEM,
1127 'archetypes' => array(
1128 'editingteacher' => CAP_ALLOW,
1129 'manager' => CAP_ALLOW
1130 )
1131 ),
1132
0d1e5456
MG
1133 'moodle/course:tag' => array(
1134 'riskbitmask' => RISK_SPAM,
1135 'captype' => 'write',
1136 'contextlevel' => CONTEXT_COURSE,
1137 'archetypes' => array(
1138 'manager' => CAP_ALLOW,
1139 'editingteacher' => CAP_ALLOW,
1140 ),
1141 'clonepermissionsfrom' => 'moodle/course:update'
1142 ),
1143
bbbf2d40 1144 'moodle/blog:view' => array(
1145
1146 'captype' => 'read',
05de723b 1147 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1148 'archetypes' => array(
05de723b
NC
1149 'guest' => CAP_ALLOW,
1150 'user' => CAP_ALLOW,
1151 'student' => CAP_ALLOW,
1152 'teacher' => CAP_ALLOW,
1153 'editingteacher' => CAP_ALLOW,
4f0c2d00 1154 'manager' => CAP_ALLOW
05de723b
NC
1155 )
1156 ),
1157
1158 'moodle/blog:search' => array(
1159 'captype' => 'read',
1160 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1161 'archetypes' => array(
00adf177 1162 'guest' => CAP_ALLOW,
c785d40a 1163 'user' => CAP_ALLOW,
bbbf2d40 1164 'student' => CAP_ALLOW,
1165 'teacher' => CAP_ALLOW,
1166 'editingteacher' => CAP_ALLOW,
4f0c2d00 1167 'manager' => CAP_ALLOW
bbbf2d40 1168 )
1169 ),
eef868d1 1170
05de723b
NC
1171 'moodle/blog:viewdrafts' => array(
1172
1173 'riskbitmask' => RISK_PERSONAL,
1174 'captype' => 'read',
1175 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1176 'archetypes' => array(
4f0c2d00 1177 'manager' => CAP_ALLOW
05de723b
NC
1178 )
1179 ),
1180
5a8ab2e9 1181 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 1182
21b6db6e 1183 'riskbitmask' => RISK_SPAM,
1184
bbbf2d40 1185 'captype' => 'write',
1186 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1187 'archetypes' => array(
c785d40a 1188 'user' => CAP_ALLOW,
4f0c2d00 1189 'manager' => CAP_ALLOW
bbbf2d40 1190 )
1191 ),
eef868d1 1192
bbbf2d40 1193 'moodle/blog:manageentries' => array(
1194
21b6db6e 1195 'riskbitmask' => RISK_SPAM,
1196
bbbf2d40 1197 'captype' => 'write',
05de723b 1198 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1199 'archetypes' => array(
bbbf2d40 1200 'teacher' => CAP_ALLOW,
1201 'editingteacher' => CAP_ALLOW,
4f0c2d00 1202 'manager' => CAP_ALLOW
bbbf2d40 1203 )
1204 ),
05de723b 1205
cae83708 1206 'moodle/blog:manageexternal' => array(
1207
1208 'riskbitmask' => RISK_SPAM,
1209
1210 'captype' => 'write',
296f6c99 1211 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1212 'archetypes' => array(
cae83708 1213 'student' => CAP_ALLOW,
1214 'user' => CAP_ALLOW,
1215 'teacher' => CAP_ALLOW,
1216 'editingteacher' => CAP_ALLOW,
4f0c2d00 1217 'manager' => CAP_ALLOW
cae83708 1218 )
1219 ),
1220
5a8ab2e9 1221 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 1222
21b6db6e 1223 'riskbitmask' => RISK_SPAM,
1224
bbbf2d40 1225 'captype' => 'write',
f432bebf 1226 'contextlevel' => CONTEXT_COURSE,
31c93303 1227 'archetypes' => array(
c785d40a 1228 'user' => CAP_ALLOW,
4f0c2d00 1229 'manager' => CAP_ALLOW
bbbf2d40 1230 )
1231 ),
eef868d1 1232
f63d2922 1233 'moodle/calendar:managegroupentries' => array(
1234
1235 'riskbitmask' => RISK_SPAM,
1236
1237 'captype' => 'write',
f432bebf 1238 'contextlevel' => CONTEXT_COURSE,
31c93303 1239 'archetypes' => array(
f63d2922 1240 'teacher' => CAP_ALLOW,
1241 'editingteacher' => CAP_ALLOW,
4f0c2d00 1242 'manager' => CAP_ALLOW
f63d2922 1243 )
1244 ),
1245
bbbf2d40 1246 'moodle/calendar:manageentries' => array(
1247
21b6db6e 1248 'riskbitmask' => RISK_SPAM,
1249
bbbf2d40 1250 'captype' => 'write',
f432bebf 1251 'contextlevel' => CONTEXT_COURSE,
31c93303 1252 'archetypes' => array(
bbbf2d40 1253 'teacher' => CAP_ALLOW,
1254 'editingteacher' => CAP_ALLOW,
4f0c2d00 1255 'manager' => CAP_ALLOW
bbbf2d40 1256 )
77d4953e 1257 ),
a044c05d 1258
1259 'moodle/user:editprofile' => array(
1260
3a0c6cca 1261 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
a044c05d 1262
1263 'captype' => 'write',
1264 'contextlevel' => CONTEXT_USER,
31c93303 1265 'archetypes' => array(
4f0c2d00 1266 'manager' => CAP_ALLOW
a044c05d 1267 )
1268 ),
eef868d1 1269
a5b8be62 1270 'moodle/user:editownprofile' => array(
1cb3da36 1271
3a0c6cca 1272 'riskbitmask' => RISK_SPAM,
1273
a5b8be62 1274 'captype' => 'write',
1275 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1276 'archetypes' => array(
1cb3da36 1277 'guest' => CAP_PROHIBIT,
1278 'user' => CAP_ALLOW,
4f0c2d00 1279 'manager' => CAP_ALLOW
a5b8be62 1280 )
1cb3da36 1281 ),
1282
a5b8be62 1283 'moodle/user:changeownpassword' => array(
1cb3da36 1284
a5b8be62 1285 'captype' => 'write',
1286 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1287 'archetypes' => array(
1cb3da36 1288 'guest' => CAP_PROHIBIT,
1289 'user' => CAP_ALLOW,
4f0c2d00 1290 'manager' => CAP_ALLOW
a5b8be62 1291 )
1cb3da36 1292 ),
1293
eef868d1 1294 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 1295 // since the next level up is site. These are more for the parent role
1296 'moodle/user:readuserposts' => array(
bcdb0f19 1297
77d4953e 1298 'captype' => 'read',
4b10f08b 1299 'contextlevel' => CONTEXT_USER,
31c93303 1300 'archetypes' => array(
77d4953e 1301 'student' => CAP_ALLOW,
1302 'teacher' => CAP_ALLOW,
1303 'editingteacher' => CAP_ALLOW,
4f0c2d00 1304 'manager' => CAP_ALLOW
77d4953e 1305 )
1306 ),
eef868d1 1307
77d4953e 1308 'moodle/user:readuserblogs' => array(
bcdb0f19 1309
77d4953e 1310 'captype' => 'read',
4b10f08b 1311 'contextlevel' => CONTEXT_USER,
31c93303 1312 'archetypes' => array(
77d4953e 1313 'student' => CAP_ALLOW,
1314 'teacher' => CAP_ALLOW,
1315 'editingteacher' => CAP_ALLOW,
4f0c2d00 1316 'manager' => CAP_ALLOW
77d4953e 1317 )
1318 ),
eef868d1 1319
3c7da16d 1320 // designed for parent role - not used in legacy roles
77d4953e 1321 'moodle/user:viewuseractivitiesreport' => array(
3c7da16d 1322 'riskbitmask' => RISK_PERSONAL,
bcdb0f19 1323
77d4953e 1324 'captype' => 'read',
4b10f08b 1325 'contextlevel' => CONTEXT_USER,
31c93303 1326 'archetypes' => array(
77d4953e 1327 )
945f88ca 1328 ),
4e781c7b 1329
3b120e46 1330 //capabilities designed for the new message system configuration
1331 'moodle/user:editmessageprofile' => array(
f7c0d84b 1332
3b120e46 1333 'riskbitmask' => RISK_SPAM,
f7c0d84b 1334
3b120e46 1335 'captype' => 'write',
1336 'contextlevel' => CONTEXT_USER,
31c93303 1337 'archetypes' => array(
4f0c2d00 1338 'manager' => CAP_ALLOW
3b120e46 1339 )
1340 ),
f7c0d84b 1341
1342 'moodle/user:editownmessageprofile' => array(
1343
1344 'captype' => 'write',
1345 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1346 'archetypes' => array(
3b120e46 1347 'guest' => CAP_PROHIBIT,
1348 'user' => CAP_ALLOW,
4f0c2d00 1349 'manager' => CAP_ALLOW
f7c0d84b 1350 )
3b120e46 1351 ),
eef868d1 1352
271e6dec 1353 'moodle/question:managecategory' => array(
14d701d6 1354 'riskbitmask' => RISK_SPAM | RISK_XSS,
945f88ca 1355 'captype' => 'write',
1356 'contextlevel' => CONTEXT_COURSE,
31c93303 1357 'archetypes' => array(
945f88ca 1358 'editingteacher' => CAP_ALLOW,
4f0c2d00 1359 'manager' => CAP_ALLOW
945f88ca 1360 )
a5b8be62 1361 ),
1362
271e6dec 1363 //new in moodle 1.9
1364 'moodle/question:add' => array(
14d701d6 1365 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1366 'captype' => 'write',
1367 'contextlevel' => CONTEXT_COURSE,
31c93303 1368 'archetypes' => array(
271e6dec 1369 'editingteacher' => CAP_ALLOW,
4f0c2d00 1370 'manager' => CAP_ALLOW
271e6dec 1371 ),
1372 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1373 ),
271e6dec 1374 'moodle/question:editmine' => array(
14d701d6 1375 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1376 'captype' => 'write',
1377 'contextlevel' => CONTEXT_COURSE,
31c93303 1378 'archetypes' => array(
271e6dec 1379 'editingteacher' => CAP_ALLOW,
4f0c2d00 1380 'manager' => CAP_ALLOW
271e6dec 1381 ),
a5b8be62 1382 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1383 ),
1384 'moodle/question:editall' => array(
14d701d6 1385 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 1386 'captype' => 'write',
1387 'contextlevel' => CONTEXT_COURSE,
31c93303 1388 'archetypes' => array(
271e6dec 1389 'editingteacher' => CAP_ALLOW,
4f0c2d00 1390 'manager' => CAP_ALLOW
271e6dec 1391 ),
a5b8be62 1392 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1393 ),
1394 'moodle/question:viewmine' => array(
945f88ca 1395 'captype' => 'read',
1396 'contextlevel' => CONTEXT_COURSE,
31c93303 1397 'archetypes' => array(
945f88ca 1398 'editingteacher' => CAP_ALLOW,
4f0c2d00 1399 'manager' => CAP_ALLOW
271e6dec 1400 ),
a5b8be62 1401 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1402 ),
271e6dec 1403 'moodle/question:viewall' => array(
1404 'captype' => 'read',
1405 'contextlevel' => CONTEXT_COURSE,
31c93303 1406 'archetypes' => array(
271e6dec 1407 'editingteacher' => CAP_ALLOW,
4f0c2d00 1408 'manager' => CAP_ALLOW
271e6dec 1409 ),
a5b8be62 1410 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1411 ),
1412 'moodle/question:usemine' => array(
1413 'captype' => 'read',
1414 'contextlevel' => CONTEXT_COURSE,
31c93303 1415 'archetypes' => array(
271e6dec 1416 'editingteacher' => CAP_ALLOW,
4f0c2d00 1417 'manager' => CAP_ALLOW
271e6dec 1418 ),
a5b8be62 1419 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1420 ),
1421 'moodle/question:useall' => array(
1422 'captype' => 'read',
1423 'contextlevel' => CONTEXT_COURSE,
31c93303 1424 'archetypes' => array(
271e6dec 1425 'editingteacher' => CAP_ALLOW,
4f0c2d00 1426 'manager' => CAP_ALLOW
271e6dec 1427 ),
a5b8be62 1428 'clonepermissionsfrom' => 'moodle/question:manage'
1429 ),
271e6dec 1430 'moodle/question:movemine' => array(
945f88ca 1431 'captype' => 'write',
1432 'contextlevel' => CONTEXT_COURSE,
31c93303 1433 'archetypes' => array(
945f88ca 1434 'editingteacher' => CAP_ALLOW,
4f0c2d00 1435 'manager' => CAP_ALLOW
271e6dec 1436 ),
a5b8be62 1437 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1438 ),
271e6dec 1439 'moodle/question:moveall' => array(
945f88ca 1440 'captype' => 'write',
1441 'contextlevel' => CONTEXT_COURSE,
31c93303 1442 'archetypes' => array(
945f88ca 1443 'editingteacher' => CAP_ALLOW,
4f0c2d00 1444 'manager' => CAP_ALLOW
271e6dec 1445 ),
a5b8be62 1446 'clonepermissionsfrom' => 'moodle/question:manage'
7191a1fa 1447 ),
271e6dec 1448 //END new in moodle 1.9
a5b8be62 1449
0eb6b04a 1450 // Configure the installed question types.
1451 'moodle/question:config' => array(
0eb6b04a 1452 'riskbitmask' => RISK_CONFIG,
0eb6b04a 1453 'captype' => 'write',
1454 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1455 'archetypes' => array(
4f0c2d00 1456 'manager' => CAP_ALLOW
0eb6b04a 1457 )
1458 ),
1459
62e76c67 1460 // While attempting questions, the ability to flag particular questions for later reference.
1461 'moodle/question:flag' => array(
1462 'captype' => 'write',
1463 'contextlevel' => CONTEXT_COURSE,
31c93303 1464 'archetypes' => array(
62e76c67 1465 'student' => CAP_ALLOW,
1466 'teacher' => CAP_ALLOW,
1467 'editingteacher' => CAP_ALLOW,
4f0c2d00 1468 'manager' => CAP_ALLOW
62e76c67 1469 )
1470 ),
bcdb0f19 1471
62e76c67 1472 'moodle/site:doclinks' => array(
7191a1fa 1473 'captype' => 'read',
1474 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1475 'archetypes' => array(
7191a1fa 1476 'teacher' => CAP_ALLOW,
1477 'editingteacher' => CAP_ALLOW,
4f0c2d00 1478 'manager' => CAP_ALLOW
7191a1fa 1479 )
3924b988 1480 ),
eef868d1 1481
3924b988 1482 'moodle/course:sectionvisibility' => array(
bcdb0f19 1483
3924b988 1484 'captype' => 'write',
1485 'contextlevel' => CONTEXT_COURSE,
31c93303 1486 'archetypes' => array(
3924b988 1487 'editingteacher' => CAP_ALLOW,
4f0c2d00 1488 'manager' => CAP_ALLOW
3924b988 1489 )
1490 ),
eef868d1 1491
dc558690 1492 'moodle/course:useremail' => array(
bcdb0f19 1493
dc558690 1494 'captype' => 'write',
1495 'contextlevel' => CONTEXT_COURSE,
31c93303 1496 'archetypes' => array(
dc558690 1497 'editingteacher' => CAP_ALLOW,
4f0c2d00 1498 'manager' => CAP_ALLOW
dc558690 1499 )
1500 ),
eef868d1 1501
3924b988 1502 'moodle/course:viewhiddensections' => array(
bcdb0f19 1503
3924b988 1504 'captype' => 'write',
1505 'contextlevel' => CONTEXT_COURSE,
31c93303 1506 'archetypes' => array(
3924b988 1507 'editingteacher' => CAP_ALLOW,
4f0c2d00 1508 'manager' => CAP_ALLOW
3924b988 1509 )
1510 ),
eef868d1 1511
3924b988 1512 'moodle/course:setcurrentsection' => array(
bcdb0f19 1513
3924b988 1514 'captype' => 'write',
1515 'contextlevel' => CONTEXT_COURSE,
31c93303 1516 'archetypes' => array(
3924b988 1517 'editingteacher' => CAP_ALLOW,
4f0c2d00 1518 'manager' => CAP_ALLOW
3924b988 1519 )
1520 ),
eef868d1 1521
ad778c84
FM
1522 'moodle/course:movesections' => array(
1523
1524 'captype' => 'write',
1525 'contextlevel' => CONTEXT_COURSE,
1526 'archetypes' => array(
1527 'editingteacher' => CAP_ALLOW,
1528 'manager' => CAP_ALLOW
1529 ),
1530 'clonepermissionsfrom' => 'moodle/course:update'
1531 ),
1532
dd45888a 1533 'moodle/site:mnetlogintoremote' => array(
bc4c9800 1534
3924b988 1535 'captype' => 'read',
dd45888a 1536 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1537 'archetypes' => array(
3924b988 1538 )
1539 ),
eef868d1 1540
dd45888a 1541 'moodle/grade:viewall' => array(
bcdb0f19 1542 'riskbitmask' => RISK_PERSONAL,
dd45888a 1543 'captype' => 'read',
eecf76df 1544 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
31c93303 1545 'archetypes' => array(
dd45888a 1546 'teacher' => CAP_ALLOW,
3924b988 1547 'editingteacher' => CAP_ALLOW,
4f0c2d00 1548 'manager' => CAP_ALLOW
dd45888a 1549 ),
1550 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
f509ce06 1551 ),
f43ce1ad 1552
dd45888a 1553 'moodle/grade:view' => array(
f509ce06 1554 'captype' => 'read',
eecf76df 1555 'contextlevel' => CONTEXT_COURSE,
31c93303 1556 'archetypes' => array(
dd45888a 1557 'student' => CAP_ALLOW
f509ce06 1558 )
ca9ffa18 1559 ),
dd45888a 1560
1561 'moodle/grade:viewhidden' => array(
ca9ffa18 1562 'riskbitmask' => RISK_PERSONAL,
1563 'captype' => 'read',
eecf76df 1564 'contextlevel' => CONTEXT_COURSE,
31c93303 1565 'archetypes' => array(
0371f8e5 1566 'teacher' => CAP_ALLOW,
1567 'editingteacher' => CAP_ALLOW,
4f0c2d00 1568 'manager' => CAP_ALLOW
dd45888a 1569 ),
1570 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
ca9ffa18 1571 ),
dd45888a 1572
1573 'moodle/grade:import' => array(
3a0c6cca 1574 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1575 'captype' => 'write',
ca9ffa18 1576 'contextlevel' => CONTEXT_COURSE,
31c93303 1577 'archetypes' => array(
ca9ffa18 1578 'editingteacher' => CAP_ALLOW,
4f0c2d00 1579 'manager' => CAP_ALLOW
dd45888a 1580 ),
1581 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1582 ),
dd45888a 1583
1584 'moodle/grade:export' => array(
ca9ffa18 1585 'riskbitmask' => RISK_PERSONAL,
1586 'captype' => 'read',
1587 'contextlevel' => CONTEXT_COURSE,
31c93303 1588 'archetypes' => array(
ca9ffa18 1589 'teacher' => CAP_ALLOW,
1590 'editingteacher' => CAP_ALLOW,
4f0c2d00 1591 'manager' => CAP_ALLOW
dd45888a 1592 ),
1593 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1594 ),
dd45888a 1595
1596 'moodle/grade:manage' => array(
3a0c6cca 1597 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1598 'captype' => 'write',
1599 'contextlevel' => CONTEXT_COURSE,
31c93303 1600 'archetypes' => array(
dd45888a 1601 'editingteacher' => CAP_ALLOW,
4f0c2d00 1602 'manager' => CAP_ALLOW
dd45888a 1603 ),
1604 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1605 ),
dd45888a 1606
a5b8be62 1607 'moodle/grade:edit' => array(
1608 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
04259694 1609 'captype' => 'write',
1610 'contextlevel' => CONTEXT_COURSE,
31c93303 1611 'archetypes' => array(
04259694 1612 'editingteacher' => CAP_ALLOW,
4f0c2d00 1613 'manager' => CAP_ALLOW
04259694 1614 ),
1615 'clonepermissionsfrom' => 'moodle/course:managegrades'
1616 ),
1617
86e9ccfd
DM
1618 // ability to define advanced grading forms in activities either from scratch
1619 // or from a shared template
f25a5a32
DM
1620 'moodle/grade:managegradingforms' => array(
1621 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
1622 'captype' => 'write',
553af5fd 1623 'contextlevel' => CONTEXT_COURSE,
f25a5a32
DM
1624 'archetypes' => array(
1625 'editingteacher' => CAP_ALLOW,
1626 'manager' => CAP_ALLOW
1627 ),
1628 'clonepermissionsfrom' => 'moodle/course:managegrades'
04259694 1629 ),
1630
86e9ccfd
DM
1631 // ability to save a grading form as a new shared template and eventually edit
1632 // and remove own templates (templates originally shared by that user)
553af5fd 1633 'moodle/grade:sharegradingforms' => array(
86e9ccfd
DM
1634 'riskbitmask' => RISK_XSS,
1635 'captype' => 'write',
1636 'contextlevel' => CONTEXT_SYSTEM,
1637 'archetypes' => array(
1638 'manager' => CAP_ALLOW
1639 ),
1640 ),
1641
1642 // ability to edit and remove any shared template, even those originally shared
1643 // by other users
1644 'moodle/grade:managesharedforms' => array(
1645 'riskbitmask' => RISK_XSS,
553af5fd
DM
1646 'captype' => 'write',
1647 'contextlevel' => CONTEXT_SYSTEM,
1648 'archetypes' => array(
1649 'manager' => CAP_ALLOW
1650 ),
1651 ),
1652
a5b8be62 1653 'moodle/grade:manageoutcomes' => array(
284abb09 1654 'captype' => 'write',
1655 'contextlevel' => CONTEXT_COURSE,
31c93303 1656 'archetypes' => array(
284abb09 1657 'editingteacher' => CAP_ALLOW,
4f0c2d00 1658 'manager' => CAP_ALLOW
284abb09 1659 ),
1660 'clonepermissionsfrom' => 'moodle/course:managegrades'
1661 ),
1662
1663 'moodle/grade:manageletters' => array(
ca9ffa18 1664 'captype' => 'write',
1665 'contextlevel' => CONTEXT_COURSE,
31c93303 1666 'archetypes' => array(
ca9ffa18 1667 'editingteacher' => CAP_ALLOW,
4f0c2d00 1668 'manager' => CAP_ALLOW
a5b8be62 1669 ),
1670 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1671 ),
dd45888a 1672
a5b8be62 1673 'moodle/grade:hide' => array(
ca9ffa18 1674 'captype' => 'write',
1675 'contextlevel' => CONTEXT_COURSE,
31c93303 1676 'archetypes' => array(
ca9ffa18 1677 'editingteacher' => CAP_ALLOW,
4f0c2d00 1678 'manager' => CAP_ALLOW
ca9ffa18 1679 )
1680 ),
dd45888a 1681
a5b8be62 1682 'moodle/grade:lock' => array(
dd45888a 1683 'captype' => 'write',
ca9ffa18 1684 'contextlevel' => CONTEXT_COURSE,
31c93303 1685 'archetypes' => array(
ca9ffa18 1686 'editingteacher' => CAP_ALLOW,
4f0c2d00 1687 'manager' => CAP_ALLOW
ca9ffa18 1688 )
1689 ),
dd45888a 1690
a5b8be62 1691 'moodle/grade:unlock' => array(
ca9ffa18 1692 'captype' => 'write',
1693 'contextlevel' => CONTEXT_COURSE,
31c93303 1694 'archetypes' => array(
ca9ffa18 1695 'editingteacher' => CAP_ALLOW,
4f0c2d00 1696 'manager' => CAP_ALLOW
ca9ffa18 1697 )
282c1695 1698 ),
dd45888a 1699
1700 'moodle/my:manageblocks' => array(
282c1695 1701 'captype' => 'write',
1702 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1703 'archetypes' => array(
282c1695 1704 'user' => CAP_ALLOW
1705 )
eca3af25 1706 ),
dd45888a 1707
eca3af25 1708 'moodle/notes:view' => array(
1709 'captype' => 'read',
f432bebf 1710 'contextlevel' => CONTEXT_COURSE,
31c93303 1711 'archetypes' => array(
eca3af25 1712 'teacher' => CAP_ALLOW,
1713 'editingteacher' => CAP_ALLOW,
4f0c2d00 1714 'manager' => CAP_ALLOW
eca3af25 1715 )
1716 ),
1717
1718 'moodle/notes:manage' => array(
3a0c6cca 1719 'riskbitmask' => RISK_SPAM,
1720
eca3af25 1721 'captype' => 'write',
f432bebf 1722 'contextlevel' => CONTEXT_COURSE,
31c93303 1723 'archetypes' => array(
eca3af25 1724 'teacher' => CAP_ALLOW,
1725 'editingteacher' => CAP_ALLOW,
4f0c2d00 1726 'manager' => CAP_ALLOW
eca3af25 1727 )
dd45888a 1728 ),
79642064 1729
1730 'moodle/tag:manage' => array(
3a0c6cca 1731 'riskbitmask' => RISK_SPAM,
1732
79642064 1733 'captype' => 'write',
1734 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1735 'archetypes' => array(
4f0c2d00 1736 'manager' => CAP_ALLOW
79642064 1737 )
705789bd 1738 ),
1739
705789bd 1740 'moodle/tag:edit' => array(
3a0c6cca 1741 'riskbitmask' => RISK_SPAM,
1742
705789bd 1743 'captype' => 'write',
1744 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1745 'archetypes' => array(
dd8a0a39 1746 'manager' => CAP_ALLOW
98b5789d 1747 )
1748 ),
a5b8be62 1749
7dd764b8
JG
1750 'moodle/tag:flag' => array(
1751 'riskbitmask' => RISK_SPAM,
1752
1753 'captype' => 'write',
1754 'contextlevel' => CONTEXT_SYSTEM,
1755 'archetypes' => array(
7dd764b8
JG
1756 'user' => CAP_ALLOW
1757 )
1758 ),
1759
98b5789d 1760 'moodle/tag:editblocks' => array(
1761 'captype' => 'write',
1762 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1763 'archetypes' => array(
705789bd 1764 'teacher' => CAP_ALLOW,
1765 'editingteacher' => CAP_ALLOW,
4f0c2d00 1766 'manager' => CAP_ALLOW
705789bd 1767 )
7e874772 1768 ),
1769
1770 'moodle/block:view' => array(
1771 'captype' => 'read',
1772 'contextlevel' => CONTEXT_BLOCK,
31c93303 1773 'archetypes' => array(
7e874772 1774 'guest' => CAP_ALLOW,
25a7d980 1775 'user' => CAP_ALLOW,
1776 'student' => CAP_ALLOW,
1777 'teacher' => CAP_ALLOW,
1778 'editingteacher' => CAP_ALLOW,
7e874772 1779 )
8512f577 1780 ),
1781
d14edf06 1782 'moodle/block:edit' => array(
1783 'riskbitmask' => RISK_SPAM | RISK_XSS,
1784
1785 'captype' => 'write',
1786 'contextlevel' => CONTEXT_BLOCK,
31c93303 1787 'archetypes' => array(
d14edf06 1788 'editingteacher' => CAP_ALLOW,
586e7976 1789 'manager' => CAP_ALLOW
d14edf06 1790 )
1791 ),
1792
8512f577 1793 'moodle/portfolio:export' => array(
1794 'captype' => 'read',
1795 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1796 'archetypes' => array(
8512f577 1797 'user' => CAP_ALLOW,
1798 'student' => CAP_ALLOW,
1799 'teacher' => CAP_ALLOW,
1800 'editingteacher' => CAP_ALLOW,
8512f577 1801 )
1bcb7eb5 1802 ),
1803 'moodle/comment:view' => array(
1bcb7eb5 1804 'captype' => 'read',
ad0ae261 1805 'contextlevel' => CONTEXT_COURSE,
31c93303 1806 'archetypes' => array(
b3da2877
SH
1807 'frontpage' => CAP_ALLOW,
1808 'guest' => CAP_ALLOW,
1bcb7eb5 1809 'user' => CAP_ALLOW,
1810 'student' => CAP_ALLOW,
1811 'teacher' => CAP_ALLOW,
1812 'editingteacher' => CAP_ALLOW,
4f0c2d00 1813 'manager' => CAP_ALLOW
1bcb7eb5 1814 )
1815 ),
1816 'moodle/comment:post' => array(
1817
1818 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
1819 'captype' => 'write',
ad0ae261 1820 'contextlevel' => CONTEXT_COURSE,
31c93303 1821 'archetypes' => array(
1bcb7eb5 1822 'user' => CAP_ALLOW,
1823 'student' => CAP_ALLOW,
1824 'teacher' => CAP_ALLOW,
1825 'editingteacher' => CAP_ALLOW,
4f0c2d00 1826 'manager' => CAP_ALLOW
1bcb7eb5 1827 )
1828 ),
1829 'moodle/comment:delete' => array(
1830
1831 'riskbitmask' => RISK_DATALOSS,
1832 'captype' => 'write',
ad0ae261 1833 'contextlevel' => CONTEXT_COURSE,
31c93303 1834 'archetypes' => array(
1bcb7eb5 1835 'editingteacher' => CAP_ALLOW,
4f0c2d00 1836 'manager' => CAP_ALLOW
1bcb7eb5 1837 )
5eacbd4b 1838 ),
1839 'moodle/webservice:createtoken' => array(
1840
52dd27bf 1841 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS,
5eacbd4b 1842 'captype' => 'write',
1843 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1844 'archetypes' => array(
4f0c2d00 1845 'manager' => CAP_ALLOW
5eacbd4b 1846 )
a09aeee4 1847 ),
ad2ae6e3
JO
1848 'moodle/webservice:managealltokens' => array(
1849
1850 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_PERSONAL,
1851 'captype' => 'write',
1852 'contextlevel' => CONTEXT_SYSTEM,
1853 'archetypes' => array()
1854 ),
13ea96c4
DC
1855 'moodle/webservice:createmobiletoken' => array(
1856
f2eac756 1857 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
13ea96c4
DC
1858 'captype' => 'write',
1859 'contextlevel' => CONTEXT_SYSTEM,
1860 'archetypes' => array(
1861 'user' => CAP_ALLOW
1862 )
1863 ),
19fae119 1864 'moodle/rating:view' => array(
ad0ae261 1865
a09aeee4 1866 'captype' => 'read',
ad0ae261 1867 'contextlevel' => CONTEXT_COURSE,
31c93303 1868 'archetypes' => array(
ad0ae261 1869 'user' => CAP_ALLOW,
e116a818
AD
1870 'student' => CAP_ALLOW,
1871 'teacher' => CAP_ALLOW,
1872 'editingteacher' => CAP_ALLOW,
4f0c2d00 1873 'manager' => CAP_ALLOW
a09aeee4
AD
1874 )
1875 ),
6595a568 1876 'moodle/rating:viewany' => array(
ad0ae261 1877
6595a568
MD
1878 'riskbitmask' => RISK_PERSONAL,
1879 'captype' => 'read',
ad0ae261 1880 'contextlevel' => CONTEXT_COURSE,
31c93303 1881 'archetypes' => array(
ad0ae261 1882 'user' => CAP_ALLOW,
6595a568
MD
1883 'student' => CAP_ALLOW,
1884 'teacher' => CAP_ALLOW,
1885 'editingteacher' => CAP_ALLOW,
1886 'manager' => CAP_ALLOW
1887 )
1888 ),
19fae119 1889 'moodle/rating:viewall' => array(
ad0ae261 1890
a09aeee4
AD
1891 'riskbitmask' => RISK_PERSONAL,
1892 'captype' => 'read',
ad0ae261 1893 'contextlevel' => CONTEXT_COURSE,
31c93303 1894 'archetypes' => array(
ad0ae261 1895 'user' => CAP_ALLOW,
6595a568 1896 'student' => CAP_ALLOW,
e116a818
AD
1897 'teacher' => CAP_ALLOW,
1898 'editingteacher' => CAP_ALLOW,
4f0c2d00 1899 'manager' => CAP_ALLOW
a09aeee4
AD
1900 )
1901 ),
19fae119 1902 'moodle/rating:rate' => array(
ad0ae261 1903
a09aeee4 1904 'captype' => 'write',
ad0ae261 1905 'contextlevel' => CONTEXT_COURSE,
31c93303 1906 'archetypes' => array(
ad0ae261 1907 'user' => CAP_ALLOW,
6595a568 1908 'student' => CAP_ALLOW,
e116a818
AD
1909 'teacher' => CAP_ALLOW,
1910 'editingteacher' => CAP_ALLOW,
4f0c2d00 1911 'manager' => CAP_ALLOW
a09aeee4 1912 )
07ab0c80 1913 ),
1914 'moodle/course:publish' => array(
1915
07ab0c80 1916 'captype' => 'write',
ad0ae261 1917 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
07ab0c80 1918 'contextlevel' => CONTEXT_SYSTEM,
31c93303 1919 'archetypes' => array(
07ab0c80 1920 'manager' => CAP_ALLOW
1921 )
2be4d090
MD
1922 ),
1923 'moodle/course:markcomplete' => array(
1924 'captype' => 'write',
1925 'contextlevel' => CONTEXT_COURSE,
31c93303 1926 'archetypes' => array(
2be4d090
MD
1927 'teacher' => CAP_ALLOW,
1928 'editingteacher' => CAP_ALLOW,
2be4d090
MD
1929 'manager' => CAP_ALLOW
1930 )
755f96f8 1931 ),
1932 'moodle/community:add' => array(
1933 'captype' => 'write',
1934 'contextlevel' => CONTEXT_SYSTEM,
1935 'archetypes' => array(
1936 'manager' => CAP_ALLOW,
1937 'teacher' => CAP_ALLOW,
17957b8f 1938 'editingteacher' => CAP_ALLOW,
755f96f8 1939 )
1940 ),
1941 'moodle/community:download' => array(
1942 'captype' => 'write',
1943 'contextlevel' => CONTEXT_SYSTEM,
1944 'archetypes' => array(
1945 'manager' => CAP_ALLOW,
17957b8f 1946 'editingteacher' => CAP_ALLOW,
755f96f8 1947 )
27806552
YB
1948 ),
1949
1950 // Badges.
1951 'moodle/badges:manageglobalsettings' => array(
1952 'riskbitmask' => RISK_DATALOSS | RISK_CONFIG,
1953 'captype' => 'write',
1954 'contextlevel' => CONTEXT_SYSTEM,
1955 'archetypes' => array(
1956 'manager' => CAP_ALLOW,
27806552
YB
1957 )
1958 ),
1959
1960 // View available badges without earning them.
1961 'moodle/badges:viewbadges' => array(
1962 'captype' => 'read',
3e9f4c7b 1963 'contextlevel' => CONTEXT_COURSE,
27806552 1964 'archetypes' => array(
27806552 1965 'user' => CAP_ALLOW,
27806552
YB
1966 )
1967 ),
1968
1969 // Manage badges on own private badges page.
1970 'moodle/badges:manageownbadges' => array(
3e9f4c7b 1971 'riskbitmap' => RISK_SPAM,
27806552 1972 'captype' => 'write',
3e9f4c7b 1973 'contextlevel' => CONTEXT_USER,
27806552
YB
1974 'archetypes' => array(
1975 'user' => CAP_ALLOW
1976 )
1977 ),
1978
1979 // View public badges in other users' profiles.
1980 'moodle/badges:viewotherbadges' => array(
1981 'riskbitmap' => RISK_PERSONAL,
1982 'captype' => 'read',
1983 'contextlevel' => CONTEXT_USER,
1984 'archetypes' => array(
1985 'user' => CAP_ALLOW
1986 )
1987 ),
1988
1989 // Earn badge.
1990 'moodle/badges:earnbadge' => array(
1991 'captype' => 'write',
3e9f4c7b 1992 'contextlevel' => CONTEXT_COURSE,
27806552
YB
1993 'archetypes' => array(
1994 'user' => CAP_ALLOW,
27806552
YB
1995 )
1996 ),
1997
1998 // Create/duplicate badges.
1999 'moodle/badges:createbadge' => array(
3e9f4c7b 2000 'riskbitmask' => RISK_SPAM,
27806552 2001 'captype' => 'write',
3e9f4c7b 2002 'contextlevel' => CONTEXT_COURSE,
27806552
YB
2003 'archetypes' => array(
2004 'manager' => CAP_ALLOW,
27806552 2005 'editingteacher' => CAP_ALLOW,
27806552
YB
2006 )
2007 ),
2008
2009 // Delete badges.
2010 'moodle/badges:deletebadge' => array(
3e9f4c7b 2011 'riskbitmask' => RISK_DATALOSS,
27806552 2012 'captype' => 'write',
3e9f4c7b 2013 'contextlevel' => CONTEXT_COURSE,
27806552
YB
2014 'archetypes' => array(
2015 'manager' => CAP_ALLOW,
27806552 2016 'editingteacher' => CAP_ALLOW,
27806552
YB
2017 )
2018 ),
2019
2020 // Set up/edit badge details.
2021 'moodle/badges:configuredetails' => array(
3e9f4c7b 2022 'riskbitmask' => RISK_SPAM,
27806552 2023 'captype' => 'write',
3e9f4c7b 2024 'contextlevel' => CONTEXT_COURSE,
27806552
YB
2025 'archetypes' => array(
2026 'manager' => CAP_ALLOW,
27806552 2027 'editingteacher' => CAP_ALLOW,
27806552
YB
2028 )
2029 ),
2030
2031 // Set up/edit criteria of earning a badge.
2032 'moodle/badges:configurecriteria' => array(
0b6ba27a 2033 'riskbitmask' => RISK_XSS,
27806552 2034 'captype' => 'write',
3e9f4c7b 2035 'contextlevel' => CONTEXT_COURSE,
27806552
YB
2036 'archetypes' => array(
2037 'manager' => CAP_ALLOW,
27806552 2038 'editingteacher' => CAP_ALLOW,
27806552
YB
2039 )
2040 ),
2041
2042 // Configure badge messages.
2043 'moodle/badges:configuremessages' => array(
3e9f4c7b 2044 'riskbitmask' => RISK_SPAM,
27806552 2045 'captype' => 'write',
3e9f4c7b 2046 'contextlevel' => CONTEXT_COURSE,
27806552
YB
2047 'archetypes' => array(
2048 'manager' => CAP_ALLOW,
27806552 2049 'editingteacher' => CAP_ALLOW,
27806552
YB
2050 )
2051 ),
2052
2053 // Award badge to a user.
2054 'moodle/badges:awardbadge' => array(
2055 'riskbitmask' => RISK_SPAM,
2056 'captype' => 'write',
3e9f4c7b 2057 'contextlevel' => CONTEXT_COURSE,
27806552
YB
2058 'archetypes' => array(
2059 'manager' => CAP_ALLOW,
27806552
YB
2060 'teacher' => CAP_ALLOW,
2061 'editingteacher' => CAP_ALLOW,
27806552 2062 )
b7374fac
MD
2063 ),
2064
2065 // Revoke badge from a user.
2066 'moodle/badges:revokebadge' => array(
2067 'riskbitmask' => RISK_SPAM,
2068 'captype' => 'write',
2069 'contextlevel' => CONTEXT_COURSE,
2070 'archetypes' => array(
2071 'manager' => CAP_ALLOW,
2072 'teacher' => CAP_ALLOW,
2073 'editingteacher' => CAP_ALLOW,
2074 )
27806552
YB
2075 ),
2076
2077 // View users who earned a specific badge without being able to award a badge.
2078 'moodle/badges:viewawarded' => array(
2079 'riskbitmask' => RISK_PERSONAL,
2080 'captype' => 'read',
3e9f4c7b 2081 'contextlevel' => CONTEXT_COURSE,
27806552
YB
2082 'archetypes' => array(
2083 'manager' => CAP_ALLOW,
2084 'teacher' => CAP_ALLOW,
2085 'editingteacher' => CAP_ALLOW,
2086 )
c484af5a
BK
2087 ),
2088
2089 'moodle/site:forcelanguage' => array(
2090 'captype' => 'read',
2091 'contextlevel' => CONTEXT_SYSTEM,
2092 'archetypes' => array(
2093 )
69d66020
DM
2094 ),
2095
2096 // Perform site-wide search queries through the search API.
2097 'moodle/search:query' => array(
2098 'captype' => 'read',
2099 'contextlevel' => CONTEXT_SYSTEM,
2100 'archetypes' => array(
2101 'guest' => CAP_ALLOW,
2102 'user' => CAP_ALLOW,
2103 'student' => CAP_ALLOW,
2104 'teacher' => CAP_ALLOW,
2105 'editingteacher' => CAP_ALLOW,
2106 'manager' => CAP_ALLOW
2107 )
b90e2205
FM
2108 ),
2109
2110 // Competencies.
2111 'moodle/competency:competencymanage' => array(
2112 'captype' => 'write',
2113 'contextlevel' => CONTEXT_COURSECAT,
2114 'archetypes' => array(
2115 'manager' => CAP_ALLOW
2116 )
2117 ),
2118 'moodle/competency:competencyview' => array(
2119 'captype' => 'read',
2120 'contextlevel' => CONTEXT_COURSECAT,
2121 'archetypes' => array(
2122 'user' => CAP_ALLOW
2123 ),
b90e2205
FM
2124 ),
2125 'moodle/competency:competencygrade' => array(
2126 'captype' => 'write',
2127 'contextlevel' => CONTEXT_COURSE, // And CONTEXT_USER.
2128 'archetypes' => array(
2129 'editingteacher' => CAP_ALLOW,
2130 'teacher' => CAP_ALLOW,
2131 'manager' => CAP_ALLOW
2132 ),
2133 ),
2134 // Course competencies.
2135 'moodle/competency:coursecompetencymanage' => array(
2136 'captype' => 'write',
2137 'contextlevel' => CONTEXT_COURSE,
2138 'archetypes' => array(
2139 'editingteacher' => CAP_ALLOW,
2140 'manager' => CAP_ALLOW
2141 ),
b90e2205
FM
2142 ),
2143 'moodle/competency:coursecompetencyconfigure' => array(
2144 'captype' => 'write',
2145 'contextlevel' => CONTEXT_MODULE,
2146 'archetypes' => array(
2147 'manager' => CAP_ALLOW
2148 ),
b90e2205
FM
2149 ),
2150 'moodle/competency:coursecompetencygradable' => array(
2151 'captype' => 'read',
2152 'contextlevel' => CONTEXT_COURSE,
2153 'archetypes' => array(
2154 'student' => CAP_ALLOW
2155 ),
2156 'clonepermissionsfrom' => 'moodle/course:isincompletionreports'
2157 ),
2158 'moodle/competency:coursecompetencyview' => array(
2159 'captype' => 'read',
2160 'contextlevel' => CONTEXT_COURSE,
2161 'archetypes' => array(
2162 'user' => CAP_ALLOW
2163 ),
b90e2205 2164 ),
1e99f31e
FM
2165 // Evidence.
2166 'moodle/competency:evidencedelete' => array(
2167 'captype' => 'write',
2168 'contextlevel' => CONTEXT_USER,
2169 'archetypes' => array(
2170 ),
2171 'clonepermissionsfrom' => 'moodle/site:config'
2172 ),
b90e2205
FM
2173 // User plans.
2174 'moodle/competency:planmanage' => array(
2175 'captype' => 'write',
2176 'contextlevel' => CONTEXT_USER,
2177 'archetypes' => array(
f1a9fcd9 2178 'manager' => CAP_ALLOW
b90e2205 2179 ),
b90e2205
FM
2180 ),
2181 'moodle/competency:planmanagedraft' => array(
2182 'captype' => 'write',
2183 'contextlevel' => CONTEXT_USER,
2184 'archetypes' => array(
f1a9fcd9 2185 'manager' => CAP_ALLOW
b90e2205 2186 ),
b90e2205
FM
2187 ),
2188 'moodle/competency:planmanageown' => array(
2189 'captype' => 'write',
2190 'contextlevel' => CONTEXT_USER,
2191 'archetypes' => array(
2192 ),
b90e2205
FM
2193 ),
2194 'moodle/competency:planmanageowndraft' => array(
2195 'captype' => 'write',
2196 'contextlevel' => CONTEXT_USER,
2197 'archetypes' => array(
2198 ),
b90e2205
FM
2199 ),
2200 'moodle/competency:planview' => array(
2201 'captype' => 'read',
2202 'contextlevel' => CONTEXT_USER,
2203 'archetypes' => array(
f1a9fcd9 2204 'manager' => CAP_ALLOW
b90e2205 2205 ),
b90e2205
FM
2206 ),
2207 'moodle/competency:planviewdraft' => array(
2208 'captype' => 'read',
2209 'contextlevel' => CONTEXT_USER,
2210 'archetypes' => array(
f1a9fcd9 2211 'manager' => CAP_ALLOW
b90e2205 2212 ),
b90e2205
FM
2213 ),
2214 'moodle/competency:planviewown' => array(
2215 'captype' => 'read',
2216 'contextlevel' => CONTEXT_USER,
2217 'archetypes' => array(
2218 'user' => CAP_ALLOW
2219 ),
b90e2205
FM
2220 ),
2221 'moodle/competency:planviewowndraft' => array(
2222 'captype' => 'read',
2223 'contextlevel' => CONTEXT_USER,
2224 'archetypes' => array(
2225 ),
b90e2205
FM
2226 ),
2227 'moodle/competency:planrequestreview' => array(
2228 'captype' => 'write',
2229 'contextlevel' => CONTEXT_USER,
2230 'archetypes' => array(
f1a9fcd9 2231 'manager' => CAP_ALLOW
b90e2205
FM
2232 )
2233 ),
2234 'moodle/competency:planrequestreviewown' => array(
2235 'captype' => 'write',
2236 'contextlevel' => CONTEXT_USER,
2237 'archetypes' => array(
2238 'user' => CAP_ALLOW
2239 )
2240 ),
2241 'moodle/competency:planreview' => array(
2242 'captype' => 'write',
2243 'contextlevel' => CONTEXT_USER,
2244 'archetypes' => array(
f1a9fcd9 2245 'manager' => CAP_ALLOW
b90e2205 2246 ),
b90e2205
FM
2247 ),
2248 'moodle/competency:plancomment' => array(
2249 'captype' => 'write',
2250 'contextlevel' => CONTEXT_USER,
2251 'archetypes' => array(
f1a9fcd9 2252 'manager' => CAP_ALLOW
b90e2205 2253 ),
b90e2205
FM
2254 ),
2255 'moodle/competency:plancommentown' => array(
2256 'captype' => 'write',
2257 'contextlevel' => CONTEXT_USER,
2258 'archetypes' => array(
2259 'user' => CAP_ALLOW
2260 ),
2261 ),
2262 // User competencies.
2263 'moodle/competency:usercompetencyview' => array(
2264 'captype' => 'read',
2265 'contextlevel' => CONTEXT_USER, // And CONTEXT_COURSE.
2266 'archetypes' => array(
f1a9fcd9 2267 'manager' => CAP_ALLOW,
b90e2205
FM
2268 'editingteacher' => CAP_ALLOW,
2269 'teacher' => CAP_ALLOW
2270 )
2271 ),
2272 'moodle/competency:usercompetencyrequestreview' => array(
2273 'captype' => 'write',
2274 'contextlevel' => CONTEXT_USER,
2275 'archetypes' => array(
f1a9fcd9 2276 'manager' => CAP_ALLOW
b90e2205
FM
2277 )
2278 ),
2279 'moodle/competency:usercompetencyrequestreviewown' => array(
2280 'captype' => 'write',
2281 'contextlevel' => CONTEXT_USER,
2282 'archetypes' => array(
2283 'user' => CAP_ALLOW
2284 )
2285 ),
2286 'moodle/competency:usercompetencyreview' => array(
2287 'captype' => 'write',
2288 'contextlevel' => CONTEXT_USER,
2289 'archetypes' => array(
f1a9fcd9 2290 'manager' => CAP_ALLOW
b90e2205 2291 ),
b90e2205
FM
2292 ),
2293 'moodle/competency:usercompetencycomment' => array(
2294 'captype' => 'write',
2295 'contextlevel' => CONTEXT_USER,
2296 'archetypes' => array(
f1a9fcd9 2297 'manager' => CAP_ALLOW
b90e2205 2298 ),
b90e2205
FM
2299 ),
2300 'moodle/competency:usercompetencycommentown' => array(
2301 'captype' => 'write',
2302 'contextlevel' => CONTEXT_USER,
2303 'archetypes' => array(
2304 'user' => CAP_ALLOW
2305 ),
2306 ),
2307 // Template.
2308 'moodle/competency:templatemanage' => array(
2309 'captype' => 'write',
2310 'contextlevel' => CONTEXT_COURSECAT,
2311 'archetypes' => array(
f1a9fcd9 2312 'manager' => CAP_ALLOW
b90e2205 2313 ),
40fcb365
DM
2314 ),
2315 'moodle/analytics:listinsights' => array(
2316 'riskbitmask' => RISK_PERSONAL,
2317 'captype' => 'read',
2318 'contextlevel' => CONTEXT_COURSE,
2319 'archetypes' => array(
2320 'teacher' => CAP_ALLOW,
2321 'editingteacher' => CAP_ALLOW,
2322 'manager' => CAP_ALLOW
2323 )
2324 ),
2325 'moodle/analytics:managemodels' => array(
2326 'riskbitmask' => RISK_CONFIG,
2327 'captype' => 'write',
2328 'contextlevel' => CONTEXT_SYSTEM,
2329 'archetypes' => array(
2330 'manager' => CAP_ALLOW
2331 ),
b90e2205
FM
2332 ),
2333 'moodle/competency:templateview' => array(
2334 'captype' => 'read',
2335 'contextlevel' => CONTEXT_COURSECAT,
2336 'archetypes' => array(
f1a9fcd9 2337 'manager' => CAP_ALLOW
b90e2205 2338 ),
b90e2205
FM
2339 ),
2340 // User evidence.
2341 'moodle/competency:userevidencemanage' => array(
2342 'captype' => 'write',
2343 'contextlevel' => CONTEXT_USER,
2344 'archetypes' => array(
f1a9fcd9 2345 'manager' => CAP_ALLOW
b90e2205 2346 ),
b90e2205
FM
2347 ),
2348 'moodle/competency:userevidencemanageown' => array(
2349 'captype' => 'write',
2350 'contextlevel' => CONTEXT_USER,
2351 'archetypes' => array(
2352 'user' => CAP_ALLOW
2353 ),
b90e2205
FM
2354 ),
2355 'moodle/competency:userevidenceview' => array(
2356 'captype' => 'read',
2357 'contextlevel' => CONTEXT_USER,
2358 'archetypes' => array(
f1a9fcd9 2359 'manager' => CAP_ALLOW
b90e2205 2360 ),
b90e2205 2361 ),
59c66f92
MD
2362 'moodle/site:maintenanceaccess' => array(
2363 'captype' => 'write',
2364 'contextlevel' => CONTEXT_SYSTEM,
2365 'archetypes' => array(
2366 )
2367 ),
69d66020 2368
bbbf2d40 2369);