Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
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.
8
//
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.
13
//
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
 * Dash block caps.
19
 *
20
 * @package    block_dash
21
 * @copyright  2019 bdecent gmbh <https://bdecent.de>
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
 
27
$capabilities = [
28
    'block/dash:addinstance' => [
29
        'riskbitmask' => RISK_SPAM | RISK_XSS,
30
        'captype' => 'write',
31
        'contextlevel' => CONTEXT_BLOCK,
32
        'archetypes' => [
33
            'manager' => CAP_ALLOW,
34
            'editingteacher' => CAP_ALLOW,
35
            'teacher' => CAP_ALLOW,
36
        ],
37
    ],
38
    'block/dash:myaddinstance' => [
39
        'riskbitmask' => RISK_PERSONAL,
40
        'captype' => 'read',
41
        'contextlevel' => CONTEXT_SYSTEM,
42
        'archetypes' => [
43
            'manager' => CAP_ALLOW,
44
            'editingteacher' => CAP_ALLOW,
45
            'user' => CAP_PREVENT,
46
        ],
47
    ],
48
    // View members.
49
    'block/dash:mygroups_view' => [
50
        'riskbitmask' => RISK_PERSONAL,
51
        'captype' => 'read',
52
        'contextlevel' => CONTEXT_SYSTEM,
53
        'archetypes' => [
54
            'manager' => CAP_ALLOW,
55
            'teacher' => CAP_ALLOW,
56
            'user' => CAP_ALLOW,
57
        ],
58
    ],
59
    // View members.
60
    'block/dash:mygroups_viewmembers' => [
61
        'riskbitmask' => RISK_PERSONAL,
62
        'captype' => 'read',
63
        'contextlevel' => CONTEXT_SYSTEM,
64
        'archetypes' => [
65
            'manager' => CAP_ALLOW,
66
            'teacher' => CAP_ALLOW,
67
            'user' => CAP_ALLOW,
68
        ],
69
    ],
70
    'block/dash:mygroups_addusers' => [
71
        'riskbitmask' => RISK_PERSONAL,
72
        'captype' => 'read',
73
        'contextlevel' => CONTEXT_SYSTEM,
74
        'archetypes' => [
75
            'manager' => CAP_ALLOW,
76
            'teacher' => CAP_ALLOW,
77
            'user' => CAP_PREVENT,
78
        ],
79
    ],
80
    'block/dash:mygroups_leavegroup' => [
81
        'riskbitmask' => RISK_PERSONAL,
82
        'captype' => 'read',
83
        'contextlevel' => CONTEXT_SYSTEM,
84
        'archetypes' => [
85
            'manager' => CAP_ALLOW,
86
            'teacher' => CAP_ALLOW,
87
            'user' => CAP_ALLOW,
88
        ],
89
    ],
90
    'block/dash:mygroups_creategroup' => [
91
        'riskbitmask' => RISK_PERSONAL,
92
        'captype' => 'read',
93
        'contextlevel' => CONTEXT_SYSTEM,
94
        'archetypes' => [
95
            'manager' => CAP_ALLOW,
96
            'teacher' => CAP_ALLOW,
97
            'user' => CAP_PREVENT,
98
        ],
99
    ],
100
 
101
    'block/dash:managewidget' => [
102
        'riskbitmask' => RISK_PERSONAL,
103
        'captype' => 'write',
104
        'contextlevel' => CONTEXT_SYSTEM,
105
        'archetypes' => [
106
            'manager' => CAP_ALLOW,
107
            'editingteacher' => CAP_PREVENT,
108
            'teacher' => CAP_PREVENT,
109
            'user' => CAP_PREVENT,
110
        ],
111
    ],
112
 
113
    'block/dash:managedatasource' => [
114
        'riskbitmask' => RISK_PERSONAL,
115
        'captype' => 'write',
116
        'contextlevel' => CONTEXT_SYSTEM,
117
        'archetypes' => [
118
            'manager' => CAP_ALLOW,
119
            'editingteacher' => CAP_PREVENT,
120
            'teacher' => CAP_PREVENT,
121
            'user' => CAP_PREVENT,
122
        ],
123
    ],
124
];