Added CAM support to SCORM 2004 3rd Edition
[moodle.git] / lib / db / access.php
CommitLineData
bbbf2d40 1<?php
2//
3// Capability definitions for Moodle core.
4//
5// The capabilities are loaded into the database table when the module is
6// installed or updated. Whenever the capability definitions are updated,
7// the module version number should be bumped up.
8//
9// The system has four possible values for a capability:
10// CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
11//
12//
13// CAPABILITY NAMING CONVENTION
14//
15// It is important that capability names are unique. The naming convention
16// for capabilities that are specific to modules and blocks is as follows:
17// [mod/block]/<component_name>:<capabilityname>
18//
19// component_name should be the same as the directory name of the mod or block.
20//
21// Core moodle capabilities are defined thus:
22// moodle/<capabilityclass>:<capabilityname>
23//
24// Examples: mod/forum:viewpost
25// block/recent_activity:view
26// moodle/site:deleteuser
27//
28// The variable name for the capability definitions array follows the format
29// $<componenttype>_<component_name>_capabilities
30//
31// For the core capabilities, the variable is $moodle_capabilities.
32
33
34$moodle_capabilities = array(
eef868d1 35
bbbf2d40 36 'moodle/site:doanything' => array(
a6b02b65 37 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
bbbf2d40 38 'captype' => 'admin',
39 'contextlevel' => CONTEXT_SYSTEM
40 ),
eef868d1 41
bbbf2d40 42 'moodle/legacy:guest' => array(
43 'captype' => 'legacy',
44 'contextlevel' => CONTEXT_SYSTEM
45 ),
eef868d1 46
47
bbbf2d40 48 'moodle/legacy:student' => array(
21b6db6e 49 'riskbitmask' => RISK_SPAM,
bbbf2d40 50 'captype' => 'legacy',
51 'contextlevel' => CONTEXT_SYSTEM
52 ),
eef868d1 53
54
bbbf2d40 55 'moodle/legacy:teacher' => array(
21b6db6e 56 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
bbbf2d40 57 'captype' => 'legacy',
58 'contextlevel' => CONTEXT_SYSTEM
59 ),
eef868d1 60
61
bbbf2d40 62 'moodle/legacy:editingteacher' => array(
21b6db6e 63 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
bbbf2d40 64 'captype' => 'legacy',
65 'contextlevel' => CONTEXT_SYSTEM
66 ),
eef868d1 67
68
bbbf2d40 69 'moodle/legacy:coursecreator' => array(
21b6db6e 70 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
bbbf2d40 71 'captype' => 'legacy',
72 'contextlevel' => CONTEXT_SYSTEM
73 ),
eef868d1 74
75
bbbf2d40 76 'moodle/legacy:admin' => array(
a6b02b65 77 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
bbbf2d40 78 'captype' => 'legacy',
79 'contextlevel' => CONTEXT_SYSTEM
80 ),
eef868d1 81
82
bbbf2d40 83 'moodle/site:config' => array(
eef868d1 84
a6b02b65 85 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
21b6db6e 86
bbbf2d40 87 'captype' => 'write',
88 'contextlevel' => CONTEXT_SYSTEM,
89 'legacy' => array(
bbbf2d40 90 'admin' => CAP_ALLOW
91 )
92 ),
eef868d1 93
51792df0 94 'moodle/site:readallmessages' => array(
eef868d1 95
51792df0 96 'captype' => 'read',
97 'contextlevel' => CONTEXT_SYSTEM,
98 'legacy' => array(
51792df0 99 'admin' => CAP_ALLOW
100 )
101 ),
eef868d1 102
51792df0 103 'moodle/site:approvecourse' => array(
eef868d1 104
51792df0 105 'captype' => 'write',
106 'contextlevel' => CONTEXT_SYSTEM,
107 'legacy' => array(
51792df0 108 'admin' => CAP_ALLOW
109 )
110 ),
eef868d1 111
bbbf2d40 112 'moodle/site:import' => array(
eef868d1 113
21b6db6e 114 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
115
bbbf2d40 116 'captype' => 'write',
117 'contextlevel' => CONTEXT_SYSTEM,
118 'legacy' => array(
a028c291 119 'teacher' => CAP_ALLOW,
120 'editingteacher' => CAP_ALLOW,
121 'coursecreator' => CAP_ALLOW,
bbbf2d40 122 'admin' => CAP_ALLOW
123 )
124 ),
eef868d1 125
bbbf2d40 126 'moodle/site:backup' => array(
eef868d1 127
21b6db6e 128 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
129
bbbf2d40 130 'captype' => 'write',
131 'contextlevel' => CONTEXT_SYSTEM,
132 'legacy' => array(
7246585a 133 'editingteacher' => CAP_ALLOW,
134 'coursecreator' => CAP_ALLOW,
bbbf2d40 135 'admin' => CAP_ALLOW
136 )
137 ),
eef868d1 138
bbbf2d40 139 'moodle/site:restore' => array(
eef868d1 140
21b6db6e 141 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
142
bbbf2d40 143 'captype' => 'write',
144 'contextlevel' => CONTEXT_SYSTEM,
145 'legacy' => array(
7246585a 146 'editingteacher' => CAP_ALLOW,
147 'coursecreator' => CAP_ALLOW,
bbbf2d40 148 'admin' => CAP_ALLOW
149 )
150 ),
eef868d1 151
bbbf2d40 152 'moodle/site:manageblocks' => array(
eef868d1 153
21b6db6e 154 'riskbitmask' => RISK_SPAM | RISK_XSS,
155
bbbf2d40 156 'captype' => 'write',
157 'contextlevel' => CONTEXT_SYSTEM,
158 'legacy' => array(
73b73d21 159 'editingteacher' => CAP_ALLOW,
160 'coursecreator' => CAP_ALLOW,
bbbf2d40 161 'admin' => CAP_ALLOW
162 )
163 ),
eef868d1 164
27950688 165 'moodle/site:accessallgroups' => array(
eef868d1 166
27950688 167 'captype' => 'read',
168 'contextlevel' => CONTEXT_SYSTEM,
169 'legacy' => array(
27950688 170 'teacher' => CAP_ALLOW,
171 'editingteacher' => CAP_ALLOW,
172 'coursecreator' => CAP_ALLOW,
173 'admin' => CAP_ALLOW
174 )
175 ),
eef868d1 176
53d7785b 177 'moodle/site:viewfullnames' => array(
eef868d1 178
53d7785b 179 'captype' => 'read',
180 'contextlevel' => CONTEXT_SYSTEM,
181 'legacy' => array(
53d7785b 182 'teacher' => CAP_ALLOW,
183 'editingteacher' => CAP_ALLOW,
184 'coursecreator' => CAP_ALLOW,
185 'admin' => CAP_ALLOW
186 )
187 ),
eef868d1 188
840c1c31 189 'moodle/site:viewparticipants' => array(
eef868d1 190
840c1c31 191 'captype' => 'read',
192 'contextlevel' => CONTEXT_SYSTEM,
193 'legacy' => array(
840c1c31 194 'editingteacher' => CAP_ALLOW,
195 'coursecreator' => CAP_ALLOW,
196 'admin' => CAP_ALLOW
197 )
198 ),
eef868d1 199
a028c291 200 'moodle/site:viewreports' => array(
eef868d1 201
21b6db6e 202 'riskbitmask' => RISK_PERSONAL,
203
a028c291 204 'captype' => 'read',
77d4953e 205 'contextlevel' => CONTEXT_SYSTEM,
a028c291 206 'legacy' => array(
a028c291 207 'teacher' => CAP_ALLOW,
208 'editingteacher' => CAP_ALLOW,
209 'coursecreator' => CAP_ALLOW,
210 'admin' => CAP_ALLOW
211 )
212 ),
eef868d1 213
7d8a3cb0 214 'moodle/site:trustcontent' => array(
eef868d1 215
21b6db6e 216 'riskbitmask' => RISK_XSS,
217
7d8a3cb0 218 'captype' => 'write',
219 'contextlevel' => CONTEXT_SYSTEM,
220 'legacy' => array(
7d8a3cb0 221 'editingteacher' => CAP_ALLOW,
222 'coursecreator' => CAP_ALLOW,
223 'admin' => CAP_ALLOW
224 )
225 ),
eef868d1 226
6df3c7df 227 'moodle/site:uploadusers' => array(
eef868d1 228
21b6db6e 229 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
230
bbbf2d40 231 'captype' => 'write',
232 'contextlevel' => CONTEXT_SYSTEM,
233 'legacy' => array(
bbbf2d40 234 'admin' => CAP_ALLOW
235 )
236 ),
eef868d1 237
6df3c7df 238
239 'moodle/user:create' => array(
240
241 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
eef868d1 242
bbbf2d40 243 'captype' => 'write',
244 'contextlevel' => CONTEXT_SYSTEM,
245 'legacy' => array(
bbbf2d40 246 'admin' => CAP_ALLOW
247 )
248 ),
eef868d1 249
6df3c7df 250 'moodle/user:delete' => array(
cc891abe 251
252 'captype' => 'write',
253 'contextlevel' => CONTEXT_SYSTEM,
254 'legacy' => array(
cc891abe 255 'admin' => CAP_ALLOW
256 )
257 ),
258
6df3c7df 259 'moodle/user:update' => array(
cc891abe 260
261 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
21b6db6e 262
bbbf2d40 263 'captype' => 'write',
264 'contextlevel' => CONTEXT_SYSTEM,
265 'legacy' => array(
bbbf2d40 266 'admin' => CAP_ALLOW
267 )
268 ),
eef868d1 269
bbbf2d40 270 'moodle/user:viewdetails' => array(
eef868d1 271
e58eca72 272 'captype' => 'read',
bbbf2d40 273 'contextlevel' => CONTEXT_SYSTEM,
274 'legacy' => array(
bbbf2d40 275 'admin' => CAP_ALLOW
276 )
277 ),
e58eca72 278
279 'moodle/user:viewhiddendetails' => array(
eef868d1 280
21b6db6e 281 'riskbitmask' => RISK_PERSONAL,
282
e58eca72 283 'captype' => 'read',
284 'contextlevel' => CONTEXT_SYSTEM,
285 'legacy' => array(
e58eca72 286 'teacher' => CAP_ALLOW,
287 'editingteacher' => CAP_ALLOW,
288 'coursecreator' => CAP_ALLOW,
289 'admin' => CAP_ALLOW
290 )
291 ),
eef868d1 292
6c95827f 293 'moodle/user:viewusergrades' => array(
294 'captype' => 'write',
295 'contextlevel' => CONTEXT_COURSE,
296 'legacy' => array(
6c95827f 297 'student' => CAP_ALLOW,
298 'teacher' => CAP_ALLOW,
299 'editingteacher' => CAP_ALLOW,
300 'coursecreator' => CAP_ALLOW,
301 'admin' => CAP_ALLOW
302 )
303 ),
304
305 'moodle/user:loginas' => array(
306
307 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
308
309 'captype' => 'write',
310 'contextlevel' => CONTEXT_COURSE,
311 'legacy' => array(
6c95827f 312 'admin' => CAP_ALLOW
313 )
314 ),
315
bbbf2d40 316 'moodle/role:assign' => array(
eef868d1 317
bbbf2d40 318 'captype' => 'write',
319 'contextlevel' => CONTEXT_SYSTEM,
320 'legacy' => array(
861fdcaa 321 'editingteacher' => CAP_ALLOW,
322 'coursecreator' => CAP_ALLOW,
68c52526 323 'admin' => CAP_ALLOW
324 )
325 ),
eef868d1 326
68c52526 327 'moodle/role:override' => array(
eef868d1 328
68c52526 329 'captype' => 'write',
330 'contextlevel' => CONTEXT_SYSTEM,
331 'legacy' => array(
bbbf2d40 332 'admin' => CAP_ALLOW
333 )
334 ),
eef868d1 335
bbbf2d40 336 'moodle/role:manage' => array(
eef868d1 337
bbbf2d40 338 'captype' => 'write',
339 'contextlevel' => CONTEXT_SYSTEM,
340 'legacy' => array(
bbbf2d40 341 'admin' => CAP_ALLOW
342 )
343 ),
f43ce1ad 344
345 'moodle/role:unassignself' => array(
346 'captype' => 'write',
347 'contextlevel' => CONTEXT_SYSTEM,
348 'legacy' => array(
2d5a4f25 349 'student' => (empty($CFG->allowunenrol)) ? CAP_INHERIT : CAP_ALLOW,
f43ce1ad 350 'teacher' => CAP_ALLOW,
351 'editingteacher' => CAP_ALLOW,
352 'coursecreator' => CAP_ALLOW,
353 'admin' => CAP_ALLOW
354 )
355 ),
99f9cb51 356
357 'moodle/role:viewhiddenassigns' => array(
358 'captype' => 'read',
359 'contextlevel' => CONTEXT_SYSTEM,
360 'legacy' => array(
99f9cb51 361 'teacher' => CAP_ALLOW,
362 'editingteacher' => CAP_ALLOW,
363 'coursecreator' => CAP_ALLOW,
364 'admin' => CAP_ALLOW
365 )
366 ),
eef868d1 367
20dd4cf5 368 'moodle/role:switchroles' => array(
369 'riskbitmask' => RISK_XSS,
370 'captype' => 'read',
371 'contextlevel' => CONTEXT_SYSTEM,
372 'legacy' => array(
20dd4cf5 373 'editingteacher' => CAP_ALLOW,
20dd4cf5 374 'admin' => CAP_ALLOW
375 )
376 ),
377
bbbf2d40 378 'moodle/category:create' => array(
eef868d1 379
bbbf2d40 380 'captype' => 'write',
381 'contextlevel' => CONTEXT_COURSECAT,
382 'legacy' => array(
bbbf2d40 383 'admin' => CAP_ALLOW
384 )
385 ),
eef868d1 386
bbbf2d40 387 'moodle/category:delete' => array(
eef868d1 388
bbbf2d40 389 'captype' => 'write',
390 'contextlevel' => CONTEXT_COURSECAT,
391 'legacy' => array(
bbbf2d40 392 'admin' => CAP_ALLOW
393 )
394 ),
eef868d1 395
bbbf2d40 396 'moodle/category:update' => array(
eef868d1 397
bbbf2d40 398 'captype' => 'write',
399 'contextlevel' => CONTEXT_COURSECAT,
400 'legacy' => array(
bbbf2d40 401 'admin' => CAP_ALLOW
402 )
403 ),
eef868d1 404
bbbf2d40 405 'moodle/category:visibility' => array(
eef868d1 406
bbbf2d40 407 'captype' => 'write',
408 'contextlevel' => CONTEXT_COURSECAT,
409 'legacy' => array(
bbbf2d40 410 'admin' => CAP_ALLOW
411 )
412 ),
eef868d1 413
bbbf2d40 414 'moodle/course:create' => array(
eef868d1 415
21b6db6e 416 'riskbitmask' => RISK_XSS,
417
bbbf2d40 418 'captype' => 'write',
419 'contextlevel' => CONTEXT_COURSE,
420 'legacy' => array(
4473252d 421 'coursecreator' => CAP_ALLOW,
bbbf2d40 422 'admin' => CAP_ALLOW
423 )
424 ),
eef868d1 425
bbbf2d40 426 'moodle/course:delete' => array(
eef868d1 427
bbbf2d40 428 'captype' => 'write',
429 'contextlevel' => CONTEXT_COURSE,
430 'legacy' => array(
bbbf2d40 431 'admin' => CAP_ALLOW
432 )
433 ),
eef868d1 434
bbbf2d40 435 'moodle/course:update' => array(
eef868d1 436
21b6db6e 437 'riskbitmask' => RISK_XSS,
438
bbbf2d40 439 'captype' => 'write',
440 'contextlevel' => CONTEXT_COURSE,
441 'legacy' => array(
bbbf2d40 442 'editingteacher' => CAP_ALLOW,
443 'coursecreator' => CAP_ALLOW,
444 'admin' => CAP_ALLOW
445 )
446 ),
eef868d1 447
bbbf2d40 448 'moodle/course:view' => array(
eef868d1 449
bbbf2d40 450 'captype' => 'read',
451 'contextlevel' => CONTEXT_COURSE,
452 'legacy' => array(
b0f55230 453 'guest' => CAP_ALLOW,
bbbf2d40 454 'student' => CAP_ALLOW,
455 'teacher' => CAP_ALLOW,
456 'editingteacher' => CAP_ALLOW,
457 'coursecreator' => CAP_ALLOW,
458 'admin' => CAP_ALLOW
459 )
460 ),
eef868d1 461
77c645df 462 'moodle/course:bulkmessaging' => array(
463
464 'riskbitmask' => RISK_SPAM,
465
466 'captype' => 'write',
467 'contextlevel' => CONTEXT_COURSE,
468 'legacy' => array(
77c645df 469 'teacher' => CAP_ALLOW,
470 'editingteacher' => CAP_ALLOW,
471 'coursecreator' => CAP_ALLOW,
472 'admin' => CAP_ALLOW
473 )
474 ),
475
1c45e42e 476 'moodle/course:viewhiddenuserfields' => array(
eef868d1 477
21b6db6e 478 'riskbitmask' => RISK_PERSONAL,
479
1c45e42e 480 'captype' => 'read',
481 'contextlevel' => CONTEXT_COURSE,
482 'legacy' => array(
1c45e42e 483 'teacher' => CAP_ALLOW,
484 'editingteacher' => CAP_ALLOW,
485 'coursecreator' => CAP_ALLOW,
486 'admin' => CAP_ALLOW
487 )
488 ),
eef868d1 489
1c45e42e 490 'moodle/course:viewhiddencourses' => array(
eef868d1 491
1c45e42e 492 'captype' => 'read',
493 'contextlevel' => CONTEXT_COURSE,
494 'legacy' => array(
1c45e42e 495 'coursecreator' => CAP_ALLOW,
496 'admin' => CAP_ALLOW
497 )
498 ),
eef868d1 499
bbbf2d40 500 'moodle/course:visibility' => array(
eef868d1 501
bbbf2d40 502 'captype' => 'write',
503 'contextlevel' => CONTEXT_COURSE,
504 'legacy' => array(
bbbf2d40 505 'coursecreator' => CAP_ALLOW,
506 'admin' => CAP_ALLOW
507 )
508 ),
eef868d1 509
a028c291 510 'moodle/course:managefiles' => array(
eef868d1 511
21b6db6e 512 'riskbitmask' => RISK_XSS,
513
a028c291 514 'captype' => 'write',
515 'contextlevel' => CONTEXT_COURSE,
516 'legacy' => array(
a028c291 517 'editingteacher' => CAP_ALLOW,
518 'coursecreator' => CAP_ALLOW,
519 'admin' => CAP_ALLOW
520 )
521 ),
eef868d1 522
bbbf2d40 523 'moodle/course:manageactivities' => array(
eef868d1 524
21b6db6e 525 'riskbitmask' => RISK_XSS,
526
bbbf2d40 527 'captype' => 'write',
528 'contextlevel' => CONTEXT_COURSE,
529 'legacy' => array(
bbbf2d40 530 'editingteacher' => CAP_ALLOW,
531 'coursecreator' => CAP_ALLOW,
532 'admin' => CAP_ALLOW
533 )
534 ),
eef868d1 535
b79da3ac 536 'moodle/course:managemetacourse' => array(
eef868d1 537
4b7aaf40 538 'captype' => 'write',
539 'contextlevel' => CONTEXT_COURSE,
540 'legacy' => array(
4b7aaf40 541 'editingteacher' => CAP_ALLOW,
542 'coursecreator' => CAP_ALLOW,
543 'admin' => CAP_ALLOW
544 )
545 ),
eef868d1 546
bbbf2d40 547 'moodle/course:activityvisibility' => array(
eef868d1 548
bbbf2d40 549 'captype' => 'write',
550 'contextlevel' => CONTEXT_COURSE,
551 'legacy' => array(
bbbf2d40 552 'editingteacher' => CAP_ALLOW,
553 'coursecreator' => CAP_ALLOW,
554 'admin' => CAP_ALLOW
555 )
556 ),
eef868d1 557
bbbf2d40 558 'moodle/course:viewhiddenactivities' => array(
eef868d1 559
bbbf2d40 560 'captype' => 'write',
561 'contextlevel' => CONTEXT_COURSE,
562 'legacy' => array(
bbbf2d40 563 'teacher' => CAP_ALLOW,
564 'editingteacher' => CAP_ALLOW,
565 'coursecreator' => CAP_ALLOW,
566 'admin' => CAP_ALLOW
567 )
568 ),
eef868d1 569
bbbf2d40 570 'moodle/course:viewparticipants' => array(
eef868d1 571
bbbf2d40 572 'captype' => 'read',
573 'contextlevel' => CONTEXT_COURSE,
574 'legacy' => array(
bbbf2d40 575 'student' => CAP_ALLOW,
576 'teacher' => CAP_ALLOW,
577 'editingteacher' => CAP_ALLOW,
578 'coursecreator' => CAP_ALLOW,
579 'admin' => CAP_ALLOW
580 )
581 ),
eef868d1 582
bbbf2d40 583 'moodle/course:viewscales' => array(
eef868d1 584
bbbf2d40 585 'captype' => 'read',
586 'contextlevel' => CONTEXT_COURSE,
587 'legacy' => array(
bbbf2d40 588 'student' => CAP_ALLOW,
589 'teacher' => CAP_ALLOW,
590 'editingteacher' => CAP_ALLOW,
591 'coursecreator' => CAP_ALLOW,
592 'admin' => CAP_ALLOW
593 )
594 ),
eef868d1 595
bbbf2d40 596 'moodle/course:managescales' => array(
eef868d1 597
bbbf2d40 598 'captype' => 'write',
599 'contextlevel' => CONTEXT_COURSE,
600 'legacy' => array(
bbbf2d40 601 'editingteacher' => CAP_ALLOW,
602 'coursecreator' => CAP_ALLOW,
603 'admin' => CAP_ALLOW
604 )
605 ),
eef868d1 606
bbbf2d40 607 'moodle/course:managegroups' => array(
608
609 'captype' => 'write',
610 'contextlevel' => CONTEXT_COURSE,
a028c291 611 'legacy' => array(
a028c291 612 'editingteacher' => CAP_ALLOW,
613 'coursecreator' => CAP_ALLOW,
614 'admin' => CAP_ALLOW
615 )
616 ),
eef868d1 617
a028c291 618 'moodle/course:reset' => array(
619
620 'captype' => 'write',
621 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 622 'legacy' => array(
bbbf2d40 623 'editingteacher' => CAP_ALLOW,
624 'coursecreator' => CAP_ALLOW,
625 'admin' => CAP_ALLOW
626 )
627 ),
eef868d1 628
bbbf2d40 629 'moodle/blog:view' => array(
630
631 'captype' => 'read',
632 'contextlevel' => CONTEXT_SYSTEM,
633 'legacy' => array(
00adf177 634 'guest' => CAP_ALLOW,
bbbf2d40 635 'student' => CAP_ALLOW,
636 'teacher' => CAP_ALLOW,
637 'editingteacher' => CAP_ALLOW,
638 'coursecreator' => CAP_ALLOW,
639 'admin' => CAP_ALLOW
640 )
641 ),
eef868d1 642
bbbf2d40 643 'moodle/blog:create' => array(
644
21b6db6e 645 'riskbitmask' => RISK_SPAM,
646
bbbf2d40 647 'captype' => 'write',
648 'contextlevel' => CONTEXT_SYSTEM,
649 'legacy' => array(
bbbf2d40 650 'student' => CAP_ALLOW,
651 'teacher' => CAP_ALLOW,
652 'editingteacher' => CAP_ALLOW,
653 'coursecreator' => CAP_ALLOW,
654 'admin' => CAP_ALLOW
655 )
656 ),
eef868d1 657
bbbf2d40 658 'moodle/blog:manageofficialtags' => array(
659
21b6db6e 660 'riskbitmask' => RISK_SPAM,
661
bbbf2d40 662 'captype' => 'write',
663 'contextlevel' => CONTEXT_SYSTEM,
664 'legacy' => array(
bbbf2d40 665 'admin' => CAP_ALLOW
666 )
667 ),
eef868d1 668
bbbf2d40 669 'moodle/blog:managepersonaltags' => array(
670
21b6db6e 671 'riskbitmask' => RISK_SPAM,
672
bbbf2d40 673 'captype' => 'write',
674 'contextlevel' => CONTEXT_SYSTEM,
675 'legacy' => array(
bbbf2d40 676 'student' => CAP_ALLOW,
677 'teacher' => CAP_ALLOW,
678 'editingteacher' => CAP_ALLOW,
679 'coursecreator' => CAP_ALLOW,
680 'admin' => CAP_ALLOW
681 )
682 ),
eef868d1 683
bbbf2d40 684 'moodle/blog:manageentries' => array(
685
21b6db6e 686 'riskbitmask' => RISK_SPAM,
687
bbbf2d40 688 'captype' => 'write',
689 'contextlevel' => CONTEXT_SYSTEM,
690 'legacy' => array(
bbbf2d40 691 'teacher' => CAP_ALLOW,
692 'editingteacher' => CAP_ALLOW,
693 'coursecreator' => CAP_ALLOW,
694 'admin' => CAP_ALLOW
695 )
696 ),
eef868d1 697
bbbf2d40 698 'moodle/calendar:manageownentries' => array(
699
21b6db6e 700 'riskbitmask' => RISK_SPAM,
701
bbbf2d40 702 'captype' => 'write',
703 'contextlevel' => CONTEXT_SYSTEM,
704 'legacy' => array(
bbbf2d40 705 'student' => CAP_ALLOW,
706 'teacher' => CAP_ALLOW,
707 'editingteacher' => CAP_ALLOW,
708 'coursecreator' => CAP_ALLOW,
709 'admin' => CAP_ALLOW
710 )
711 ),
eef868d1 712
bbbf2d40 713 'moodle/calendar:manageentries' => array(
714
21b6db6e 715 'riskbitmask' => RISK_SPAM,
716
bbbf2d40 717 'captype' => 'write',
718 'contextlevel' => CONTEXT_SYSTEM,
719 'legacy' => array(
bbbf2d40 720 'teacher' => CAP_ALLOW,
721 'editingteacher' => CAP_ALLOW,
722 'coursecreator' => CAP_ALLOW,
723 'admin' => CAP_ALLOW
724 )
77d4953e 725 ),
eef868d1 726
727 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 728 // since the next level up is site. These are more for the parent role
729 'moodle/user:readuserposts' => array(
730 'captype' => 'read',
4b10f08b 731 'contextlevel' => CONTEXT_USER,
77d4953e 732 'legacy' => array(
77d4953e 733 'student' => CAP_ALLOW,
734 'teacher' => CAP_ALLOW,
735 'editingteacher' => CAP_ALLOW,
736 'coursecreator' => CAP_ALLOW,
737 'admin' => CAP_ALLOW
738 )
739 ),
eef868d1 740
77d4953e 741 'moodle/user:readuserblogs' => array(
742 'captype' => 'read',
4b10f08b 743 'contextlevel' => CONTEXT_USER,
77d4953e 744 'legacy' => array(
77d4953e 745 'student' => CAP_ALLOW,
746 'teacher' => CAP_ALLOW,
747 'editingteacher' => CAP_ALLOW,
748 'coursecreator' => CAP_ALLOW,
749 'admin' => CAP_ALLOW
750 )
751 ),
eef868d1 752
77d4953e 753 'moodle/user:viewuseractivitiesreport' => array(
754 'captype' => 'read',
4b10f08b 755 'contextlevel' => CONTEXT_USER,
77d4953e 756 'legacy' => array(
77d4953e 757 'teacher' => CAP_ALLOW,
758 'editingteacher' => CAP_ALLOW,
759 'coursecreator' => CAP_ALLOW,
760 'admin' => CAP_ALLOW
761 )
945f88ca 762 ),
eef868d1 763
ec7a8b79 764 'moodle/user:editprofile' => array(
21b6db6e 765
766 'riskbitmask' => RISK_SPAM,
767
ec7a8b79 768 'captype' => 'read',
4b10f08b 769 'contextlevel' => CONTEXT_USER,
ec7a8b79 770 'legacy' => array(
ec7a8b79 771 'admin' => CAP_ALLOW
772 )
773 ),
eef868d1 774
945f88ca 775 'moodle/question:import' => array(
21b6db6e 776
777 'riskbitmask' => RISK_XSS,
778
945f88ca 779 'captype' => 'write',
780 'contextlevel' => CONTEXT_COURSE,
781 'legacy' => array(
945f88ca 782 'editingteacher' => CAP_ALLOW,
783 'coursecreator' => CAP_ALLOW,
784 'admin' => CAP_ALLOW
785 )
786 ),
eef868d1 787
945f88ca 788 'moodle/question:export' => array(
789 'captype' => 'read',
790 'contextlevel' => CONTEXT_COURSE,
791 'legacy' => array(
945f88ca 792 'editingteacher' => CAP_ALLOW,
793 'coursecreator' => CAP_ALLOW,
794 'admin' => CAP_ALLOW
795 )
796 ),
eef868d1 797
f43ce1ad 798 'moodle/question:managecategory' => array(
945f88ca 799 'captype' => 'write',
800 'contextlevel' => CONTEXT_COURSE,
801 'legacy' => array(
945f88ca 802 'editingteacher' => CAP_ALLOW,
803 'coursecreator' => CAP_ALLOW,
804 'admin' => CAP_ALLOW
805 )
806 ),
eef868d1 807
945f88ca 808 'moodle/question:manage' => array(
21b6db6e 809
810 'riskbitmask' => RISK_XSS,
811
945f88ca 812 'captype' => 'write',
813 'contextlevel' => CONTEXT_COURSE,
814 'legacy' => array(
945f88ca 815 'editingteacher' => CAP_ALLOW,
816 'coursecreator' => CAP_ALLOW,
817 'admin' => CAP_ALLOW
818 )
7191a1fa 819 ),
820
821 'moodle/site:doclinks' => array(
822 'captype' => 'read',
823 'contextlevel' => CONTEXT_SYSTEM,
824 'legacy' => array(
7191a1fa 825 'teacher' => CAP_ALLOW,
826 'editingteacher' => CAP_ALLOW,
827 'coursecreator' => CAP_ALLOW,
828 'admin' => CAP_ALLOW
829 )
3924b988 830 ),
eef868d1 831
3924b988 832 'moodle/course:sectionvisibility' => array(
833 'captype' => 'write',
834 'contextlevel' => CONTEXT_COURSE,
835 'legacy' => array(
3924b988 836 'editingteacher' => CAP_ALLOW,
837 'coursecreator' => CAP_ALLOW,
838 'admin' => CAP_ALLOW
839 )
840 ),
eef868d1 841
dc558690 842 'moodle/course:useremail' => array(
843 'captype' => 'write',
844 'contextlevel' => CONTEXT_COURSE,
845 'legacy' => array(
dc558690 846 'editingteacher' => CAP_ALLOW,
dc558690 847 'admin' => CAP_ALLOW
848 )
849 ),
eef868d1 850
3924b988 851 'moodle/course:viewhiddensections' => array(
852 'captype' => 'write',
853 'contextlevel' => CONTEXT_COURSE,
854 'legacy' => array(
3924b988 855 'editingteacher' => CAP_ALLOW,
856 'coursecreator' => CAP_ALLOW,
857 'admin' => CAP_ALLOW
858 )
859 ),
eef868d1 860
3924b988 861 'moodle/course:setcurrentsection' => array(
862 'captype' => 'write',
863 'contextlevel' => CONTEXT_COURSE,
864 'legacy' => array(
3924b988 865 'editingteacher' => CAP_ALLOW,
866 'coursecreator' => CAP_ALLOW,
867 'admin' => CAP_ALLOW
868 )
869 ),
eef868d1 870
3924b988 871 'moodle/course:viewcoursegrades' => array(
872 'captype' => 'read',
873 'contextlevel' => CONTEXT_COURSE,
874 'legacy' => array(
3924b988 875 'teacher' => CAP_ALLOW,
876 'editingteacher' => CAP_ALLOW,
877 'coursecreator' => CAP_ALLOW,
878 'admin' => CAP_ALLOW
879 )
880 ),
eef868d1 881
3924b988 882 'moodle/course:managegrades' => array(
883 'captype' => 'write',
884 'contextlevel' => CONTEXT_COURSE,
885 'legacy' => array(
3924b988 886 'editingteacher' => CAP_ALLOW,
887 'coursecreator' => CAP_ALLOW,
888 'admin' => CAP_ALLOW
889 )
77d4953e 890 )
f43ce1ad 891
bbbf2d40 892);
893
894?>