"MDL-18723, role required to display search box should be viewparticipants, merged...
[moodle.git] / lib / db / access.php
CommitLineData
14d701d6 1<?php // $Id$
bbbf2d40 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(
bcdb0f19 37
f432bebf 38 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
bcdb0f19 39
bbbf2d40 40 'captype' => 'admin',
41 'contextlevel' => CONTEXT_SYSTEM
42 ),
eef868d1 43
bbbf2d40 44 'moodle/legacy:guest' => array(
bcdb0f19 45
bbbf2d40 46 'captype' => 'legacy',
47 'contextlevel' => CONTEXT_SYSTEM
48 ),
eef868d1 49
c785d40a 50 'moodle/legacy:user' => array(
51
52 'captype' => 'legacy',
53 'contextlevel' => CONTEXT_SYSTEM
54 ),
eef868d1 55
bbbf2d40 56 'moodle/legacy:student' => array(
bcdb0f19 57
21b6db6e 58 'riskbitmask' => RISK_SPAM,
bcdb0f19 59
bbbf2d40 60 'captype' => 'legacy',
61 'contextlevel' => CONTEXT_SYSTEM
62 ),
eef868d1 63
64
bbbf2d40 65 'moodle/legacy:teacher' => array(
bcdb0f19 66
21b6db6e 67 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
bcdb0f19 68
bbbf2d40 69 'captype' => 'legacy',
70 'contextlevel' => CONTEXT_SYSTEM
71 ),
eef868d1 72
73
bbbf2d40 74 'moodle/legacy:editingteacher' => array(
bcdb0f19 75
21b6db6e 76 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
bcdb0f19 77
bbbf2d40 78 'captype' => 'legacy',
79 'contextlevel' => CONTEXT_SYSTEM
80 ),
eef868d1 81
82
bbbf2d40 83 'moodle/legacy:coursecreator' => array(
bcdb0f19 84
21b6db6e 85 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
bcdb0f19 86
bbbf2d40 87 'captype' => 'legacy',
88 'contextlevel' => CONTEXT_SYSTEM
89 ),
eef868d1 90
91
bbbf2d40 92 'moodle/legacy:admin' => array(
bcdb0f19 93
f432bebf 94 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
bcdb0f19 95
bbbf2d40 96 'captype' => 'legacy',
97 'contextlevel' => CONTEXT_SYSTEM
98 ),
eef868d1 99
100
bbbf2d40 101 'moodle/site:config' => array(
eef868d1 102
f432bebf 103 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
21b6db6e 104
bbbf2d40 105 'captype' => 'write',
106 'contextlevel' => CONTEXT_SYSTEM,
107 'legacy' => array(
bbbf2d40 108 'admin' => CAP_ALLOW
109 )
110 ),
eef868d1 111
51792df0 112 'moodle/site:readallmessages' => array(
eef868d1 113
bcdb0f19 114 'riskbitmask' => RISK_PERSONAL,
115
51792df0 116 'captype' => 'read',
117 'contextlevel' => CONTEXT_SYSTEM,
118 'legacy' => array(
4b7ae3c4 119 'admin' => CAP_ALLOW,
120 'editingteacher' => CAP_ALLOW
51792df0 121 )
122 ),
f7c0d84b 123
576ad290 124 'moodle/site:sendmessage' => array(
125
3a0c6cca 126 'riskbitmask' => RISK_SPAM,
576ad290 127
128 'captype' => 'write',
129 'contextlevel' => CONTEXT_SYSTEM,
130 'legacy' => array(
131 'admin' => CAP_ALLOW,
132 'user' => CAP_ALLOW
133 )
f7c0d84b 134 ),
eef868d1 135
51792df0 136 'moodle/site:approvecourse' => array(
eef868d1 137
bcdb0f19 138 'riskbitmask' => RISK_XSS,
139
51792df0 140 'captype' => 'write',
141 'contextlevel' => CONTEXT_SYSTEM,
142 'legacy' => array(
51792df0 143 'admin' => CAP_ALLOW
144 )
145 ),
eef868d1 146
bbbf2d40 147 'moodle/site:import' => array(
eef868d1 148
21b6db6e 149 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
150
bbbf2d40 151 'captype' => 'write',
f432bebf 152 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 153 'legacy' => array(
a028c291 154 'editingteacher' => CAP_ALLOW,
bbbf2d40 155 'admin' => CAP_ALLOW
156 )
157 ),
eef868d1 158
bbbf2d40 159 'moodle/site:backup' => array(
eef868d1 160
21b6db6e 161 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
162
bbbf2d40 163 'captype' => 'write',
f432bebf 164 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 165 'legacy' => array(
7246585a 166 'editingteacher' => CAP_ALLOW,
bbbf2d40 167 'admin' => CAP_ALLOW
168 )
169 ),
eef868d1 170
172dd12c 171 'moodle/site:backupdownload' => array(
172
173 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
174
175 'captype' => 'write',
176 'contextlevel' => CONTEXT_COURSE,
177 'legacy' => array(
178 'editingteacher' => CAP_ALLOW,
179 'admin' => CAP_ALLOW
180 ),
181
182 'clonepermissionsfrom' => 'moodle/site:backup'
183 ),
184
185 'moodle/site:backupupload' => array(
186
187 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
188
189 'captype' => 'write',
190 'contextlevel' => CONTEXT_COURSE,
191 'legacy' => array(
192 'editingteacher' => CAP_ALLOW,
193 'admin' => CAP_ALLOW
194 ),
195
196 'clonepermissionsfrom' => 'moodle/site:restore'
197 ),
198
bbbf2d40 199 'moodle/site:restore' => array(
eef868d1 200
21b6db6e 201 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
202
bbbf2d40 203 'captype' => 'write',
f432bebf 204 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 205 'legacy' => array(
7246585a 206 'editingteacher' => CAP_ALLOW,
bbbf2d40 207 'admin' => CAP_ALLOW
208 )
209 ),
eef868d1 210
bbbf2d40 211 'moodle/site:manageblocks' => array(
eef868d1 212
21b6db6e 213 'riskbitmask' => RISK_SPAM | RISK_XSS,
214
bbbf2d40 215 'captype' => 'write',
f432bebf 216 'contextlevel' => CONTEXT_BLOCK,
bbbf2d40 217 'legacy' => array(
73b73d21 218 'editingteacher' => CAP_ALLOW,
bbbf2d40 219 'admin' => CAP_ALLOW
220 )
221 ),
eef868d1 222
27950688 223 'moodle/site:accessallgroups' => array(
eef868d1 224
27950688 225 'captype' => 'read',
f432bebf 226 'contextlevel' => CONTEXT_COURSE,
27950688 227 'legacy' => array(
27950688 228 'teacher' => CAP_ALLOW,
229 'editingteacher' => CAP_ALLOW,
27950688 230 'admin' => CAP_ALLOW
231 )
232 ),
eef868d1 233
53d7785b 234 'moodle/site:viewfullnames' => array(
eef868d1 235
53d7785b 236 'captype' => 'read',
f432bebf 237 'contextlevel' => CONTEXT_COURSE,
53d7785b 238 'legacy' => array(
53d7785b 239 'teacher' => CAP_ALLOW,
240 'editingteacher' => CAP_ALLOW,
53d7785b 241 'admin' => CAP_ALLOW
242 )
243 ),
eef868d1 244
a028c291 245 'moodle/site:viewreports' => array(
eef868d1 246
21b6db6e 247 'riskbitmask' => RISK_PERSONAL,
248
a028c291 249 'captype' => 'read',
f432bebf 250 'contextlevel' => CONTEXT_COURSE,
a028c291 251 'legacy' => array(
a028c291 252 'teacher' => CAP_ALLOW,
253 'editingteacher' => CAP_ALLOW,
a028c291 254 'admin' => CAP_ALLOW
255 )
256 ),
eef868d1 257
7d8a3cb0 258 'moodle/site:trustcontent' => array(
eef868d1 259
21b6db6e 260 'riskbitmask' => RISK_XSS,
261
7d8a3cb0 262 'captype' => 'write',
f432bebf 263 'contextlevel' => CONTEXT_COURSE,
7d8a3cb0 264 'legacy' => array(
7d8a3cb0 265 'editingteacher' => CAP_ALLOW,
7d8a3cb0 266 'admin' => CAP_ALLOW
267 )
268 ),
eef868d1 269
6df3c7df 270 'moodle/site:uploadusers' => array(
eef868d1 271
21b6db6e 272 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
273
bbbf2d40 274 'captype' => 'write',
275 'contextlevel' => CONTEXT_SYSTEM,
276 'legacy' => array(
bbbf2d40 277 'admin' => CAP_ALLOW
278 )
279 ),
eef868d1 280
2a55410b 281 'moodle/site:langeditmaster' => array(
282
283 'riskbitmask' => RISK_CONFIG | RISK_XSS,
284
285 'captype' => 'write',
286 'contextlevel' => CONTEXT_SYSTEM,
287 'legacy' => array(
288 'admin' => CAP_PREVENT
289 )
290 ),
291
292 'moodle/site:langeditlocal' => array(
293
294 'riskbitmask' => RISK_CONFIG | RISK_XSS,
295
296 'captype' => 'write',
297 'contextlevel' => CONTEXT_SYSTEM,
298 'legacy' => array(
299 'admin' => CAP_ALLOW
300 )
301 ),
302
94211250 303 // Permission to manage filter setting overrides in subcontexts.
304 'moodle/filter:manage' => array(
305
306 'captype' => 'write',
307 'contextlevel' => CONTEXT_COURSE,
308 'legacy' => array(
309 'editingteacher' => CAP_ALLOW,
310 'coursecreator' => CAP_ALLOW,
311 'admin' => CAP_ALLOW,
312 )
313 ),
6df3c7df 314
315 'moodle/user:create' => array(
316
317 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
eef868d1 318
bbbf2d40 319 'captype' => 'write',
320 'contextlevel' => CONTEXT_SYSTEM,
321 'legacy' => array(
bbbf2d40 322 'admin' => CAP_ALLOW
323 )
324 ),
eef868d1 325
6df3c7df 326 'moodle/user:delete' => array(
cc891abe 327
3a0c6cca 328 'riskbitmask' => RISK_PERSONAL, RISK_DATALOSS,
bcdb0f19 329
cc891abe 330 'captype' => 'write',
331 'contextlevel' => CONTEXT_SYSTEM,
332 'legacy' => array(
cc891abe 333 'admin' => CAP_ALLOW
334 )
335 ),
336
6df3c7df 337 'moodle/user:update' => array(
cc891abe 338
339 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
21b6db6e 340
bbbf2d40 341 'captype' => 'write',
342 'contextlevel' => CONTEXT_SYSTEM,
343 'legacy' => array(
bbbf2d40 344 'admin' => CAP_ALLOW
345 )
346 ),
eef868d1 347
bbbf2d40 348 'moodle/user:viewdetails' => array(
eef868d1 349
e58eca72 350 'captype' => 'read',
f432bebf 351 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 352 'legacy' => array(
22ae509e 353 'guest' => CAP_ALLOW,
354 'student' => CAP_ALLOW,
355 'teacher' => CAP_ALLOW,
356 'editingteacher' => CAP_ALLOW,
bbbf2d40 357 'admin' => CAP_ALLOW
358 )
359 ),
e58eca72 360
361 'moodle/user:viewhiddendetails' => array(
eef868d1 362
21b6db6e 363 'riskbitmask' => RISK_PERSONAL,
364
e58eca72 365 'captype' => 'read',
f432bebf 366 'contextlevel' => CONTEXT_COURSE,
e58eca72 367 'legacy' => array(
e58eca72 368 'teacher' => CAP_ALLOW,
369 'editingteacher' => CAP_ALLOW,
e58eca72 370 'admin' => CAP_ALLOW
371 )
372 ),
eef868d1 373
6c95827f 374 'moodle/user:loginas' => array(
375
376 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG,
377
378 'captype' => 'write',
379 'contextlevel' => CONTEXT_COURSE,
380 'legacy' => array(
6c95827f 381 'admin' => CAP_ALLOW
382 )
383 ),
384
bbbf2d40 385 'moodle/role:assign' => array(
eef868d1 386
3a0c6cca 387 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
388
bbbf2d40 389 'captype' => 'write',
f432bebf 390 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 391 'legacy' => array(
861fdcaa 392 'editingteacher' => CAP_ALLOW,
68c52526 393 'admin' => CAP_ALLOW
394 )
395 ),
eef868d1 396
68c52526 397 'moodle/role:override' => array(
eef868d1 398
bcdb0f19 399 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
400
68c52526 401 'captype' => 'write',
f432bebf 402 'contextlevel' => CONTEXT_COURSE,
68c52526 403 'legacy' => array(
bbbf2d40 404 'admin' => CAP_ALLOW
405 )
406 ),
eef868d1 407
3a0c6cca 408 'moodle/role:safeoverride' => array(
409
410 'riskbitmask' => RISK_SPAM,
411
412 'captype' => 'write',
f432bebf 413 'contextlevel' => CONTEXT_COURSE,
3a0c6cca 414 'legacy' => array(
415 'editingteacher' => CAP_ALLOW
416 )
417 ),
418
bbbf2d40 419 'moodle/role:manage' => array(
eef868d1 420
bcdb0f19 421 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS,
422
bbbf2d40 423 'captype' => 'write',
424 'contextlevel' => CONTEXT_SYSTEM,
425 'legacy' => array(
bbbf2d40 426 'admin' => CAP_ALLOW
427 )
428 ),
f43ce1ad 429
430 'moodle/role:unassignself' => array(
bcdb0f19 431
f43ce1ad 432 'captype' => 'write',
f432bebf 433 'contextlevel' => CONTEXT_COURSE,
f43ce1ad 434 'legacy' => array(
2d5a4f25 435 'student' => (empty($CFG->allowunenrol)) ? CAP_INHERIT : CAP_ALLOW,
f43ce1ad 436 'teacher' => CAP_ALLOW,
437 'editingteacher' => CAP_ALLOW,
438 'coursecreator' => CAP_ALLOW,
439 'admin' => CAP_ALLOW
440 )
441 ),
99f9cb51 442
443 'moodle/role:viewhiddenassigns' => array(
bcdb0f19 444
99f9cb51 445 'captype' => 'read',
f432bebf 446 'contextlevel' => CONTEXT_COURSE,
99f9cb51 447 'legacy' => array(
99f9cb51 448 'teacher' => CAP_ALLOW,
449 'editingteacher' => CAP_ALLOW,
99f9cb51 450 'admin' => CAP_ALLOW
451 )
452 ),
eef868d1 453
20dd4cf5 454 'moodle/role:switchroles' => array(
bcdb0f19 455
3a0c6cca 456 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
bcdb0f19 457
20dd4cf5 458 'captype' => 'read',
f432bebf 459 'contextlevel' => CONTEXT_COURSE,
20dd4cf5 460 'legacy' => array(
20dd4cf5 461 'editingteacher' => CAP_ALLOW,
20dd4cf5 462 'admin' => CAP_ALLOW
463 )
464 ),
465
8ed5dd63 466 // Create, update and delete course categories. (Deleting a course category
467 // does not let you delete the courses it contains, unless you also have
468 // moodle/course: delete.) Creating and deleting requires this permission in
469 // the parent category.
470 'moodle/category:manage' => array(
eef868d1 471
89a792ab 472 'riskbitmask' => RISK_XSS,
473
bbbf2d40 474 'captype' => 'write',
475 'contextlevel' => CONTEXT_COURSECAT,
476 'legacy' => array(
bbbf2d40 477 'admin' => CAP_ALLOW
8ed5dd63 478 ),
479 'clonepermissionsfrom' => 'moodle/category:update'
bbbf2d40 480 ),
eef868d1 481
8ed5dd63 482 'moodle/category:viewhiddencategories' => array(
eef868d1 483
8ed5dd63 484 'captype' => 'read',
bbbf2d40 485 'contextlevel' => CONTEXT_COURSECAT,
486 'legacy' => array(
8ed5dd63 487 'coursecreator' => CAP_ALLOW,
bbbf2d40 488 'admin' => CAP_ALLOW
8ed5dd63 489 ),
490 'clonepermissionsfrom' => 'moodle/category:visibility'
bbbf2d40 491 ),
eef868d1 492
bbbf2d40 493 'moodle/course:create' => array(
eef868d1 494
21b6db6e 495 'riskbitmask' => RISK_XSS,
496
bbbf2d40 497 'captype' => 'write',
5e992f56 498 'contextlevel' => CONTEXT_COURSECAT,
bbbf2d40 499 'legacy' => array(
4473252d 500 'coursecreator' => CAP_ALLOW,
bbbf2d40 501 'admin' => CAP_ALLOW
502 )
503 ),
eef868d1 504
e452210a 505 'moodle/course:request' => array(
506 'captype' => 'write',
507 'contextlevel' => CONTEXT_SYSTEM,
508 'legacy' => array(
509 'user' => CAP_ALLOW,
510 )
511 ),
512
bbbf2d40 513 'moodle/course:delete' => array(
eef868d1 514
3a0c6cca 515 'riskbitmask' => RISK_DATALOSS,
516
bbbf2d40 517 'captype' => 'write',
518 'contextlevel' => CONTEXT_COURSE,
519 'legacy' => array(
9136a60c 520 'editingteacher' => CAP_ALLOW,
bbbf2d40 521 'admin' => CAP_ALLOW
522 )
523 ),
eef868d1 524
bbbf2d40 525 'moodle/course:update' => array(
eef868d1 526
21b6db6e 527 'riskbitmask' => RISK_XSS,
528
bbbf2d40 529 'captype' => 'write',
530 'contextlevel' => CONTEXT_COURSE,
531 'legacy' => array(
bbbf2d40 532 'editingteacher' => CAP_ALLOW,
bbbf2d40 533 'admin' => CAP_ALLOW
534 )
535 ),
eef868d1 536
bbbf2d40 537 'moodle/course:view' => array(
eef868d1 538
bbbf2d40 539 'captype' => 'read',
540 'contextlevel' => CONTEXT_COURSE,
541 'legacy' => array(
b0f55230 542 'guest' => CAP_ALLOW,
bbbf2d40 543 'student' => CAP_ALLOW,
544 'teacher' => CAP_ALLOW,
72cf2e39 545 'editingteacher' => CAP_ALLOW
bbbf2d40 546 )
547 ),
eef868d1 548
77c645df 549 'moodle/course:bulkmessaging' => array(
550
551 'riskbitmask' => RISK_SPAM,
552
553 'captype' => 'write',
554 'contextlevel' => CONTEXT_COURSE,
555 'legacy' => array(
77c645df 556 'teacher' => CAP_ALLOW,
557 'editingteacher' => CAP_ALLOW,
77c645df 558 'admin' => CAP_ALLOW
559 )
560 ),
561
1c45e42e 562 'moodle/course:viewhiddenuserfields' => array(
eef868d1 563
21b6db6e 564 'riskbitmask' => RISK_PERSONAL,
4e781c7b 565
566 'captype' => 'read',
567 'contextlevel' => CONTEXT_COURSE,
568 'legacy' => array(
569 'teacher' => CAP_ALLOW,
570 'editingteacher' => CAP_ALLOW,
571 'admin' => CAP_ALLOW
572 )
573 ),
574
1c45e42e 575 'moodle/course:viewhiddencourses' => array(
eef868d1 576
1c45e42e 577 'captype' => 'read',
578 'contextlevel' => CONTEXT_COURSE,
579 'legacy' => array(
2f5ab42b 580 'coursecreator' => CAP_ALLOW,
581 'teacher' => CAP_ALLOW,
582 'editingteacher' => CAP_ALLOW,
a5b8be62 583 'admin' => CAP_ALLOW
1c45e42e 584 )
585 ),
eef868d1 586
bbbf2d40 587 'moodle/course:visibility' => array(
eef868d1 588
bbbf2d40 589 'captype' => 'write',
590 'contextlevel' => CONTEXT_COURSE,
591 'legacy' => array(
bbbf2d40 592 'admin' => CAP_ALLOW
593 )
594 ),
eef868d1 595
a028c291 596 'moodle/course:managefiles' => array(
eef868d1 597
21b6db6e 598 'riskbitmask' => RISK_XSS,
599
a028c291 600 'captype' => 'write',
601 'contextlevel' => CONTEXT_COURSE,
602 'legacy' => array(
a028c291 603 'editingteacher' => CAP_ALLOW,
a028c291 604 'admin' => CAP_ALLOW
605 )
606 ),
eef868d1 607
bbbf2d40 608 'moodle/course:manageactivities' => array(
eef868d1 609
21b6db6e 610 'riskbitmask' => RISK_XSS,
611
bbbf2d40 612 'captype' => 'write',
613 'contextlevel' => CONTEXT_COURSE,
614 'legacy' => array(
bbbf2d40 615 'editingteacher' => CAP_ALLOW,
bbbf2d40 616 'admin' => CAP_ALLOW
617 )
618 ),
eef868d1 619
b79da3ac 620 'moodle/course:managemetacourse' => array(
eef868d1 621
3a0c6cca 622 'riskbitmask' => RISK_XSS | RISK_PERSONAL,
623
4b7aaf40 624 'captype' => 'write',
625 'contextlevel' => CONTEXT_COURSE,
626 'legacy' => array(
4b7aaf40 627 'editingteacher' => CAP_ALLOW,
4b7aaf40 628 'admin' => CAP_ALLOW
629 )
630 ),
eef868d1 631
bbbf2d40 632 'moodle/course:activityvisibility' => array(
eef868d1 633
bbbf2d40 634 'captype' => 'write',
635 'contextlevel' => CONTEXT_COURSE,
636 'legacy' => array(
bbbf2d40 637 'editingteacher' => CAP_ALLOW,
bbbf2d40 638 'admin' => CAP_ALLOW
639 )
640 ),
eef868d1 641
bbbf2d40 642 'moodle/course:viewhiddenactivities' => array(
eef868d1 643
bbbf2d40 644 'captype' => 'write',
645 'contextlevel' => CONTEXT_COURSE,
646 'legacy' => array(
bbbf2d40 647 'teacher' => CAP_ALLOW,
648 'editingteacher' => CAP_ALLOW,
bbbf2d40 649 'admin' => CAP_ALLOW
650 )
651 ),
eef868d1 652
bbbf2d40 653 'moodle/course:viewparticipants' => array(
eef868d1 654
bbbf2d40 655 'captype' => 'read',
656 'contextlevel' => CONTEXT_COURSE,
657 'legacy' => array(
bbbf2d40 658 'student' => CAP_ALLOW,
659 'teacher' => CAP_ALLOW,
660 'editingteacher' => CAP_ALLOW,
bbbf2d40 661 'admin' => CAP_ALLOW
165088f6 662 )
663 ),
f7c0d84b 664
665 'moodle/course:changefullname' => array(
666
cd7f72c0 667 'riskbitmask' => RISK_XSS,
668
f7c0d84b 669 'captype' => 'write',
670 'contextlevel' => CONTEXT_COURSE,
671 'legacy' => array(
672 'editingteacher' => CAP_ALLOW,
673 'admin' => CAP_ALLOW
5e99b9d7 674 ),
675 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 676 ),
677
678 'moodle/course:changeshortname' => array(
679
cd7f72c0 680 'riskbitmask' => RISK_XSS,
681
f7c0d84b 682 'captype' => 'write',
683 'contextlevel' => CONTEXT_COURSE,
684 'legacy' => array(
685 'editingteacher' => CAP_ALLOW,
686 'admin' => CAP_ALLOW
5e99b9d7 687 ),
688 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 689 ),
690
691 'moodle/course:changeidnumber' => array(
692
cd7f72c0 693 'riskbitmask' => RISK_XSS,
694
f7c0d84b 695 'captype' => 'write',
696 'contextlevel' => CONTEXT_COURSE,
697 'legacy' => array(
698 'editingteacher' => CAP_ALLOW,
699 'admin' => CAP_ALLOW
5e99b9d7 700 ),
701 'clonepermissionsfrom' => 'moodle/course:update'
f7c0d84b 702 ),
703
165088f6 704 'moodle/site:viewparticipants' => array(
705
706 'captype' => 'read',
707 'contextlevel' => CONTEXT_SYSTEM,
708 'legacy' => array(
709 'admin' => CAP_ALLOW
bbbf2d40 710 )
711 ),
eef868d1 712
d27c5d33 713 'moodle/site:usewebservices' => array(
714 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS,
715 'captype' => 'write',
716 'contextlevel' => CONTEXT_SYSTEM,
717 'legacy' => array()
718 ),
719
bbbf2d40 720 'moodle/course:viewscales' => array(
eef868d1 721
bbbf2d40 722 'captype' => 'read',
723 'contextlevel' => CONTEXT_COURSE,
724 'legacy' => array(
bbbf2d40 725 'student' => CAP_ALLOW,
726 'teacher' => CAP_ALLOW,
727 'editingteacher' => CAP_ALLOW,
bbbf2d40 728 'admin' => CAP_ALLOW
729 )
730 ),
eef868d1 731
bbbf2d40 732 'moodle/course:managescales' => array(
eef868d1 733
bbbf2d40 734 'captype' => 'write',
735 'contextlevel' => CONTEXT_COURSE,
736 'legacy' => array(
bbbf2d40 737 'editingteacher' => CAP_ALLOW,
bbbf2d40 738 'admin' => CAP_ALLOW
739 )
740 ),
eef868d1 741
bbbf2d40 742 'moodle/course:managegroups' => array(
743
744 'captype' => 'write',
745 'contextlevel' => CONTEXT_COURSE,
a028c291 746 'legacy' => array(
a028c291 747 'editingteacher' => CAP_ALLOW,
a028c291 748 'admin' => CAP_ALLOW
749 )
750 ),
eef868d1 751
a028c291 752 'moodle/course:reset' => array(
753
3a0c6cca 754 'riskbitmask' => RISK_DATALOSS,
755
a028c291 756 'captype' => 'write',
757 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 758 'legacy' => array(
bbbf2d40 759 'editingteacher' => CAP_ALLOW,
bbbf2d40 760 'admin' => CAP_ALLOW
761 )
762 ),
eef868d1 763
bbbf2d40 764 'moodle/blog:view' => array(
765
766 'captype' => 'read',
f432bebf 767 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 768 'legacy' => array(
00adf177 769 'guest' => CAP_ALLOW,
c785d40a 770 'user' => CAP_ALLOW,
bbbf2d40 771 'student' => CAP_ALLOW,
772 'teacher' => CAP_ALLOW,
773 'editingteacher' => CAP_ALLOW,
bbbf2d40 774 'admin' => CAP_ALLOW
775 )
776 ),
eef868d1 777
5a8ab2e9 778 'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 779
21b6db6e 780 'riskbitmask' => RISK_SPAM,
781
bbbf2d40 782 'captype' => 'write',
783 'contextlevel' => CONTEXT_SYSTEM,
784 'legacy' => array(
c785d40a 785 'user' => CAP_ALLOW,
bbbf2d40 786 'admin' => CAP_ALLOW
787 )
788 ),
eef868d1 789
bbbf2d40 790 'moodle/blog:manageentries' => array(
791
21b6db6e 792 'riskbitmask' => RISK_SPAM,
793
bbbf2d40 794 'captype' => 'write',
f432bebf 795 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 796 'legacy' => array(
bbbf2d40 797 'teacher' => CAP_ALLOW,
798 'editingteacher' => CAP_ALLOW,
bbbf2d40 799 'admin' => CAP_ALLOW
800 )
801 ),
cae83708 802
803 'moodle/blog:manageexternal' => array(
804
805 'riskbitmask' => RISK_SPAM,
806
807 'captype' => 'write',
808 'contextlevel' => CONTEXT_USER,
809 'legacy' => array(
810 'student' => CAP_ALLOW,
811 'user' => CAP_ALLOW,
812 'teacher' => CAP_ALLOW,
813 'editingteacher' => CAP_ALLOW,
814 'admin' => CAP_ALLOW
815 )
816 ),
817
eef868d1 818
5a8ab2e9 819 'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only
bbbf2d40 820
21b6db6e 821 'riskbitmask' => RISK_SPAM,
822
bbbf2d40 823 'captype' => 'write',
f432bebf 824 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 825 'legacy' => array(
c785d40a 826 'user' => CAP_ALLOW,
bbbf2d40 827 'admin' => CAP_ALLOW
828 )
829 ),
eef868d1 830
f63d2922 831 'moodle/calendar:managegroupentries' => array(
832
833 'riskbitmask' => RISK_SPAM,
834
835 'captype' => 'write',
f432bebf 836 'contextlevel' => CONTEXT_COURSE,
f63d2922 837 'legacy' => array(
838 'teacher' => CAP_ALLOW,
839 'editingteacher' => CAP_ALLOW,
840 'admin' => CAP_ALLOW
841 )
842 ),
843
bbbf2d40 844 'moodle/calendar:manageentries' => array(
845
21b6db6e 846 'riskbitmask' => RISK_SPAM,
847
bbbf2d40 848 'captype' => 'write',
f432bebf 849 'contextlevel' => CONTEXT_COURSE,
bbbf2d40 850 'legacy' => array(
bbbf2d40 851 'teacher' => CAP_ALLOW,
852 'editingteacher' => CAP_ALLOW,
bbbf2d40 853 'admin' => CAP_ALLOW
854 )
77d4953e 855 ),
a044c05d 856
857 'moodle/user:editprofile' => array(
858
3a0c6cca 859 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
a044c05d 860
861 'captype' => 'write',
862 'contextlevel' => CONTEXT_USER,
863 'legacy' => array(
864 'admin' => CAP_ALLOW
865 )
866 ),
eef868d1 867
a5b8be62 868 'moodle/user:editownprofile' => array(
1cb3da36 869
3a0c6cca 870 'riskbitmask' => RISK_SPAM,
871
a5b8be62 872 'captype' => 'write',
873 'contextlevel' => CONTEXT_SYSTEM,
874 'legacy' => array(
1cb3da36 875 'guest' => CAP_PROHIBIT,
876 'user' => CAP_ALLOW,
877 'admin' => CAP_ALLOW
a5b8be62 878 )
1cb3da36 879 ),
880
a5b8be62 881 'moodle/user:changeownpassword' => array(
1cb3da36 882
a5b8be62 883 'captype' => 'write',
884 'contextlevel' => CONTEXT_SYSTEM,
885 'legacy' => array(
1cb3da36 886 'guest' => CAP_PROHIBIT,
887 'user' => CAP_ALLOW,
888 'admin' => CAP_ALLOW
a5b8be62 889 )
1cb3da36 890 ),
891
eef868d1 892 // The next 3 might make no sense for some roles, e.g teacher, etc.
77d4953e 893 // since the next level up is site. These are more for the parent role
894 'moodle/user:readuserposts' => array(
bcdb0f19 895
77d4953e 896 'captype' => 'read',
4b10f08b 897 'contextlevel' => CONTEXT_USER,
77d4953e 898 'legacy' => array(
77d4953e 899 'student' => CAP_ALLOW,
900 'teacher' => CAP_ALLOW,
901 'editingteacher' => CAP_ALLOW,
77d4953e 902 'admin' => CAP_ALLOW
903 )
904 ),
eef868d1 905
77d4953e 906 'moodle/user:readuserblogs' => array(
bcdb0f19 907
77d4953e 908 'captype' => 'read',
4b10f08b 909 'contextlevel' => CONTEXT_USER,
77d4953e 910 'legacy' => array(
77d4953e 911 'student' => CAP_ALLOW,
912 'teacher' => CAP_ALLOW,
913 'editingteacher' => CAP_ALLOW,
77d4953e 914 'admin' => CAP_ALLOW
915 )
916 ),
eef868d1 917
3c7da16d 918 // designed for parent role - not used in legacy roles
77d4953e 919 'moodle/user:viewuseractivitiesreport' => array(
3c7da16d 920 'riskbitmask' => RISK_PERSONAL,
bcdb0f19 921
77d4953e 922 'captype' => 'read',
4b10f08b 923 'contextlevel' => CONTEXT_USER,
77d4953e 924 'legacy' => array(
77d4953e 925 )
945f88ca 926 ),
4e781c7b 927
3b120e46 928 //capabilities designed for the new message system configuration
929 'moodle/user:editmessageprofile' => array(
f7c0d84b 930
3b120e46 931 'riskbitmask' => RISK_SPAM,
f7c0d84b 932
3b120e46 933 'captype' => 'write',
934 'contextlevel' => CONTEXT_USER,
935 'legacy' => array(
936 'admin' => CAP_ALLOW
937 )
938 ),
f7c0d84b 939
940 'moodle/user:editownmessageprofile' => array(
941
942 'captype' => 'write',
943 'contextlevel' => CONTEXT_SYSTEM,
944 'legacy' => array(
3b120e46 945 'guest' => CAP_PROHIBIT,
946 'user' => CAP_ALLOW,
947 'admin' => CAP_ALLOW
f7c0d84b 948 )
3b120e46 949 ),
eef868d1 950
271e6dec 951 'moodle/question:managecategory' => array(
14d701d6 952 'riskbitmask' => RISK_SPAM | RISK_XSS,
945f88ca 953 'captype' => 'write',
954 'contextlevel' => CONTEXT_COURSE,
955 'legacy' => array(
945f88ca 956 'editingteacher' => CAP_ALLOW,
945f88ca 957 'admin' => CAP_ALLOW
958 )
a5b8be62 959 ),
960
271e6dec 961 //new in moodle 1.9
962 'moodle/question:add' => array(
14d701d6 963 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 964 'captype' => 'write',
965 'contextlevel' => CONTEXT_COURSE,
966 'legacy' => array(
967 'editingteacher' => CAP_ALLOW,
968 'admin' => CAP_ALLOW
969 ),
970 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 971 ),
271e6dec 972 'moodle/question:editmine' => array(
14d701d6 973 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 974 'captype' => 'write',
975 'contextlevel' => CONTEXT_COURSE,
976 'legacy' => array(
977 'editingteacher' => CAP_ALLOW,
978 'admin' => CAP_ALLOW
979 ),
a5b8be62 980 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 981 ),
982 'moodle/question:editall' => array(
14d701d6 983 'riskbitmask' => RISK_SPAM | RISK_XSS,
271e6dec 984 'captype' => 'write',
985 'contextlevel' => CONTEXT_COURSE,
986 'legacy' => array(
987 'editingteacher' => CAP_ALLOW,
988 'admin' => CAP_ALLOW
989 ),
a5b8be62 990 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 991 ),
992 'moodle/question:viewmine' => array(
945f88ca 993 'captype' => 'read',
994 'contextlevel' => CONTEXT_COURSE,
995 'legacy' => array(
945f88ca 996 'editingteacher' => CAP_ALLOW,
945f88ca 997 'admin' => CAP_ALLOW
271e6dec 998 ),
a5b8be62 999 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1000 ),
271e6dec 1001 'moodle/question:viewall' => array(
1002 'captype' => 'read',
1003 'contextlevel' => CONTEXT_COURSE,
1004 'legacy' => array(
1005 'editingteacher' => CAP_ALLOW,
1006 'admin' => CAP_ALLOW
1007 ),
a5b8be62 1008 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1009 ),
1010 'moodle/question:usemine' => array(
1011 'captype' => 'read',
1012 'contextlevel' => CONTEXT_COURSE,
1013 'legacy' => array(
1014 'editingteacher' => CAP_ALLOW,
1015 'admin' => CAP_ALLOW
1016 ),
a5b8be62 1017 'clonepermissionsfrom' => 'moodle/question:manage'
271e6dec 1018 ),
1019 'moodle/question:useall' => array(
1020 'captype' => 'read',
1021 'contextlevel' => CONTEXT_COURSE,
1022 'legacy' => array(
1023 'editingteacher' => CAP_ALLOW,
1024 'admin' => CAP_ALLOW
1025 ),
a5b8be62 1026 'clonepermissionsfrom' => 'moodle/question:manage'
1027 ),
271e6dec 1028 'moodle/question:movemine' => array(
945f88ca 1029 'captype' => 'write',
1030 'contextlevel' => CONTEXT_COURSE,
1031 'legacy' => array(
945f88ca 1032 'editingteacher' => CAP_ALLOW,
945f88ca 1033 'admin' => CAP_ALLOW
271e6dec 1034 ),
a5b8be62 1035 'clonepermissionsfrom' => 'moodle/question:manage'
945f88ca 1036 ),
271e6dec 1037 'moodle/question:moveall' => array(
945f88ca 1038 'captype' => 'write',
1039 'contextlevel' => CONTEXT_COURSE,
1040 'legacy' => array(
945f88ca 1041 'editingteacher' => CAP_ALLOW,
945f88ca 1042 'admin' => CAP_ALLOW
271e6dec 1043 ),
a5b8be62 1044 'clonepermissionsfrom' => 'moodle/question:manage'
7191a1fa 1045 ),
271e6dec 1046 //END new in moodle 1.9
a5b8be62 1047
0eb6b04a 1048 // Configure the installed question types.
1049 'moodle/question:config' => array(
0eb6b04a 1050 'riskbitmask' => RISK_CONFIG,
0eb6b04a 1051 'captype' => 'write',
1052 'contextlevel' => CONTEXT_SYSTEM,
1053 'legacy' => array(
1054 'admin' => CAP_ALLOW
1055 )
1056 ),
1057
62e76c67 1058 // While attempting questions, the ability to flag particular questions for later reference.
1059 'moodle/question:flag' => array(
1060 'captype' => 'write',
1061 'contextlevel' => CONTEXT_COURSE,
1062 'legacy' => array(
1063 'student' => CAP_ALLOW,
1064 'teacher' => CAP_ALLOW,
1065 'editingteacher' => CAP_ALLOW,
1066 'coursecreator' => CAP_ALLOW,
1067 'admin' => CAP_ALLOW
1068 )
1069 ),
bcdb0f19 1070
62e76c67 1071 'moodle/site:doclinks' => array(
7191a1fa 1072 'captype' => 'read',
1073 'contextlevel' => CONTEXT_SYSTEM,
1074 'legacy' => array(
7191a1fa 1075 'teacher' => CAP_ALLOW,
1076 'editingteacher' => CAP_ALLOW,
7191a1fa 1077 'admin' => CAP_ALLOW
1078 )
3924b988 1079 ),
eef868d1 1080
3924b988 1081 'moodle/course:sectionvisibility' => array(
bcdb0f19 1082
3924b988 1083 'captype' => 'write',
1084 'contextlevel' => CONTEXT_COURSE,
1085 'legacy' => array(
3924b988 1086 'editingteacher' => CAP_ALLOW,
3924b988 1087 'admin' => CAP_ALLOW
1088 )
1089 ),
eef868d1 1090
dc558690 1091 'moodle/course:useremail' => array(
bcdb0f19 1092
dc558690 1093 'captype' => 'write',
1094 'contextlevel' => CONTEXT_COURSE,
1095 'legacy' => array(
dc558690 1096 'editingteacher' => CAP_ALLOW,
dc558690 1097 'admin' => CAP_ALLOW
1098 )
1099 ),
eef868d1 1100
3924b988 1101 'moodle/course:viewhiddensections' => array(
bcdb0f19 1102
3924b988 1103 'captype' => 'write',
1104 'contextlevel' => CONTEXT_COURSE,
1105 'legacy' => array(
3924b988 1106 'editingteacher' => CAP_ALLOW,
3924b988 1107 'admin' => CAP_ALLOW
1108 )
1109 ),
eef868d1 1110
3924b988 1111 'moodle/course:setcurrentsection' => array(
bcdb0f19 1112
3924b988 1113 'captype' => 'write',
1114 'contextlevel' => CONTEXT_COURSE,
1115 'legacy' => array(
3924b988 1116 'editingteacher' => CAP_ALLOW,
3924b988 1117 'admin' => CAP_ALLOW
1118 )
1119 ),
eef868d1 1120
dd45888a 1121 'moodle/site:mnetlogintoremote' => array(
bc4c9800 1122
3924b988 1123 'captype' => 'read',
dd45888a 1124 'contextlevel' => CONTEXT_SYSTEM,
3924b988 1125 'legacy' => array(
3924b988 1126 'admin' => CAP_ALLOW
1127 )
1128 ),
eef868d1 1129
dd45888a 1130 'moodle/grade:viewall' => array(
bcdb0f19 1131 'riskbitmask' => RISK_PERSONAL,
dd45888a 1132 'captype' => 'read',
eecf76df 1133 'contextlevel' => CONTEXT_COURSE, // and CONTEXT_USER
3924b988 1134 'legacy' => array(
dd45888a 1135 'teacher' => CAP_ALLOW,
3924b988 1136 'editingteacher' => CAP_ALLOW,
3924b988 1137 'admin' => CAP_ALLOW
dd45888a 1138 ),
1139 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
f509ce06 1140 ),
f43ce1ad 1141
dd45888a 1142 'moodle/grade:view' => array(
f509ce06 1143 'captype' => 'read',
eecf76df 1144 'contextlevel' => CONTEXT_COURSE,
f509ce06 1145 'legacy' => array(
dd45888a 1146 'student' => CAP_ALLOW
f509ce06 1147 )
ca9ffa18 1148 ),
dd45888a 1149
1150 'moodle/grade:viewhidden' => array(
ca9ffa18 1151 'riskbitmask' => RISK_PERSONAL,
1152 'captype' => 'read',
eecf76df 1153 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1154 'legacy' => array(
0371f8e5 1155 'teacher' => CAP_ALLOW,
1156 'editingteacher' => CAP_ALLOW,
1157 'admin' => CAP_ALLOW
dd45888a 1158 ),
1159 'clonepermissionsfrom' => 'moodle/course:viewcoursegrades'
ca9ffa18 1160 ),
dd45888a 1161
1162 'moodle/grade:import' => array(
3a0c6cca 1163 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1164 'captype' => 'write',
ca9ffa18 1165 'contextlevel' => CONTEXT_COURSE,
1166 'legacy' => array(
ca9ffa18 1167 'editingteacher' => CAP_ALLOW,
1168 'admin' => CAP_ALLOW
dd45888a 1169 ),
1170 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1171 ),
dd45888a 1172
1173 'moodle/grade:export' => array(
ca9ffa18 1174 'riskbitmask' => RISK_PERSONAL,
1175 'captype' => 'read',
1176 'contextlevel' => CONTEXT_COURSE,
1177 'legacy' => array(
1178 'teacher' => CAP_ALLOW,
1179 'editingteacher' => CAP_ALLOW,
1180 'admin' => CAP_ALLOW
dd45888a 1181 ),
1182 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1183 ),
dd45888a 1184
1185 'moodle/grade:manage' => array(
3a0c6cca 1186 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
dd45888a 1187 'captype' => 'write',
1188 'contextlevel' => CONTEXT_COURSE,
ca9ffa18 1189 'legacy' => array(
dd45888a 1190 'editingteacher' => CAP_ALLOW,
ca9ffa18 1191 'admin' => CAP_ALLOW
dd45888a 1192 ),
1193 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1194 ),
dd45888a 1195
a5b8be62 1196 'moodle/grade:edit' => array(
1197 'riskbitmask' => RISK_PERSONAL | RISK_XSS,
04259694 1198 'captype' => 'write',
1199 'contextlevel' => CONTEXT_COURSE,
1200 'legacy' => array(
1201 'editingteacher' => CAP_ALLOW,
1202 'admin' => CAP_ALLOW
1203 ),
1204 'clonepermissionsfrom' => 'moodle/course:managegrades'
1205 ),
1206
a5b8be62 1207 'moodle/grade:manageoutcomes' => array(
284abb09 1208 'captype' => 'write',
1209 'contextlevel' => CONTEXT_COURSE,
1210 'legacy' => array(
1211 'editingteacher' => CAP_ALLOW,
1212 'admin' => CAP_ALLOW
1213 ),
1214 'clonepermissionsfrom' => 'moodle/course:managegrades'
1215 ),
1216
1217 'moodle/grade:manageletters' => array(
ca9ffa18 1218 'captype' => 'write',
1219 'contextlevel' => CONTEXT_COURSE,
1220 'legacy' => array(
1221 'editingteacher' => CAP_ALLOW,
1222 'admin' => CAP_ALLOW
a5b8be62 1223 ),
1224 'clonepermissionsfrom' => 'moodle/course:managegrades'
ca9ffa18 1225 ),
dd45888a 1226
a5b8be62 1227 'moodle/grade:hide' => array(
ca9ffa18 1228 'captype' => 'write',
1229 'contextlevel' => CONTEXT_COURSE,
1230 'legacy' => array(
1231 'editingteacher' => CAP_ALLOW,
1232 'admin' => CAP_ALLOW
1233 )
1234 ),
dd45888a 1235
a5b8be62 1236 'moodle/grade:lock' => array(
dd45888a 1237 'captype' => 'write',
ca9ffa18 1238 'contextlevel' => CONTEXT_COURSE,
1239 'legacy' => array(
1240 'editingteacher' => CAP_ALLOW,
1241 'admin' => CAP_ALLOW
1242 )
1243 ),
dd45888a 1244
a5b8be62 1245 'moodle/grade:unlock' => array(
ca9ffa18 1246 'captype' => 'write',
1247 'contextlevel' => CONTEXT_COURSE,
1248 'legacy' => array(
1249 'editingteacher' => CAP_ALLOW,
1250 'admin' => CAP_ALLOW
1251 )
282c1695 1252 ),
dd45888a 1253
1254 'moodle/my:manageblocks' => array(
282c1695 1255 'captype' => 'write',
1256 'contextlevel' => CONTEXT_SYSTEM,
1257 'legacy' => array(
1258 'user' => CAP_ALLOW
1259 )
eca3af25 1260 ),
dd45888a 1261
eca3af25 1262 'moodle/notes:view' => array(
1263 'captype' => 'read',
f432bebf 1264 'contextlevel' => CONTEXT_COURSE,
eca3af25 1265 'legacy' => array(
1266 'teacher' => CAP_ALLOW,
1267 'editingteacher' => CAP_ALLOW,
1268 'admin' => CAP_ALLOW
1269 )
1270 ),
1271
1272 'moodle/notes:manage' => array(
3a0c6cca 1273 'riskbitmask' => RISK_SPAM,
1274
eca3af25 1275 'captype' => 'write',
f432bebf 1276 'contextlevel' => CONTEXT_COURSE,
eca3af25 1277 'legacy' => array(
1278 'teacher' => CAP_ALLOW,
1279 'editingteacher' => CAP_ALLOW,
1280 'admin' => CAP_ALLOW
1281 )
dd45888a 1282 ),
79642064 1283
1284 'moodle/tag:manage' => array(
3a0c6cca 1285 'riskbitmask' => RISK_SPAM,
1286
79642064 1287 'captype' => 'write',
1288 'contextlevel' => CONTEXT_SYSTEM,
1289 'legacy' => array(
1290 'teacher' => CAP_ALLOW,
1291 'editingteacher' => CAP_ALLOW,
1292 'admin' => CAP_ALLOW
1293 )
705789bd 1294 ),
1295
1296 'moodle/tag:create' => array(
3a0c6cca 1297 'riskbitmask' => RISK_SPAM,
1298
705789bd 1299 'captype' => 'write',
1300 'contextlevel' => CONTEXT_SYSTEM,
1301 'legacy' => array(
0f07c40e 1302 'admin' => CAP_ALLOW,
1303 'user' => CAP_ALLOW
705789bd 1304 )
1305 ),
a5b8be62 1306
705789bd 1307 'moodle/tag:edit' => array(
3a0c6cca 1308 'riskbitmask' => RISK_SPAM,
1309
705789bd 1310 'captype' => 'write',
1311 'contextlevel' => CONTEXT_SYSTEM,
1312 'legacy' => array(
3e6e529f 1313 'admin' => CAP_ALLOW,
1314 'user' => CAP_ALLOW
98b5789d 1315 )
1316 ),
a5b8be62 1317
98b5789d 1318 'moodle/tag:editblocks' => array(
1319 'captype' => 'write',
1320 'contextlevel' => CONTEXT_SYSTEM,
1321 'legacy' => array(
705789bd 1322 'teacher' => CAP_ALLOW,
1323 'editingteacher' => CAP_ALLOW,
1324 'admin' => CAP_ALLOW
1325 )
7e874772 1326 ),
1327
1328 'moodle/block:view' => array(
1329 'captype' => 'read',
1330 'contextlevel' => CONTEXT_BLOCK,
1331 'legacy' => array(
1332 'guest' => CAP_ALLOW,
25a7d980 1333 'user' => CAP_ALLOW,
1334 'student' => CAP_ALLOW,
1335 'teacher' => CAP_ALLOW,
1336 'editingteacher' => CAP_ALLOW,
1337 'coursecreator' => CAP_ALLOW
7e874772 1338 )
8512f577 1339 ),
1340
d14edf06 1341 'moodle/block:edit' => array(
1342 'riskbitmask' => RISK_SPAM | RISK_XSS,
1343
1344 'captype' => 'write',
1345 'contextlevel' => CONTEXT_BLOCK,
1346 'legacy' => array(
1347 'editingteacher' => CAP_ALLOW,
1348 'coursecreator' => CAP_ALLOW
1349 )
1350 ),
1351
8512f577 1352 'moodle/portfolio:export' => array(
1353 'captype' => 'read',
1354 'contextlevel' => CONTEXT_SYSTEM,
1355 'legacy' => array(
1356 'user' => CAP_ALLOW,
1357 'student' => CAP_ALLOW,
1358 'teacher' => CAP_ALLOW,
1359 'editingteacher' => CAP_ALLOW,
1360 'coursecreator' => CAP_ALLOW
1361 )
1bcb7eb5 1362 ),
1363 'moodle/comment:view' => array(
1364
1365 'captype' => 'read',
1366 'contextlevel' => CONTEXT_SYSTEM,
1367 'legacy' => array(
1368 'user' => CAP_ALLOW,
1369 'student' => CAP_ALLOW,
1370 'teacher' => CAP_ALLOW,
1371 'editingteacher' => CAP_ALLOW,
1372 'coursecreator' => CAP_ALLOW,
1373 'admin' => CAP_ALLOW
1374 )
1375 ),
1376 'moodle/comment:post' => array(
1377
1378 'riskbitmask' => RISK_SPAM | RISK_PERSONAL,
1379 'captype' => 'write',
1380 'contextlevel' => CONTEXT_SYSTEM,
1381 'legacy' => array(
1382 'user' => CAP_ALLOW,
1383 'student' => CAP_ALLOW,
1384 'teacher' => CAP_ALLOW,
1385 'editingteacher' => CAP_ALLOW,
1386 'coursecreator' => CAP_ALLOW,
1387 'admin' => CAP_ALLOW
1388 )
1389 ),
1390 'moodle/comment:delete' => array(
1391
1392 'riskbitmask' => RISK_DATALOSS,
1393 'captype' => 'write',
1394 'contextlevel' => CONTEXT_SYSTEM,
1395 'legacy' => array(
1396 'editingteacher' => CAP_ALLOW,
1397 'coursecreator' => CAP_ALLOW,
1398 'admin' => CAP_ALLOW
1399 )
79642064 1400 )
bbbf2d40 1401);
1402
98b5789d 1403
bbbf2d40 1404?>