access.php 5.94 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
//
// Capability definitions for the forum module.
//
// The capabilities are loaded into the database table when the module is
// installed or updated. Whenever the capability definitions are updated,
// the module version number should be bumped up.
//
// The system has four possible values for a capability:
// CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set).
//
//
// CAPABILITY NAMING CONVENTION
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
//   [mod/block]/<component_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
// Core moodle capabilities are defined thus:
//    moodle/<capabilityclass>:<capabilityname>
//
// Examples: mod/forum:viewpost
//           block/recent_activity:view
//           moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
//   $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.


$mod_forum_capabilities = array(
35

36
    'mod/forum:viewdiscussion' => array(
37

38
39
40
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
41
            'guest' => CAP_ALLOW,
42
43
44
45
46
47
            'student' => CAP_ALLOW,
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
48

vyshane's avatar
vyshane committed
49
    'mod/forum:viewhiddentimedposts' => array(
50

vyshane's avatar
vyshane committed
51
52
53
54
55
56
57
58
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
59

60
    'mod/forum:startdiscussion' => array(
61

62
63
64
        'riskbitmask' => RISK_SPAM,

        'captype' => 'write',
65
66
67
68
69
70
71
72
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'student' => CAP_ALLOW,
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
73

74
    'mod/forum:replypost' => array(
75

76
77
78
        'riskbitmask' => RISK_SPAM,

        'captype' => 'write',
79
80
81
82
83
84
85
86
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'student' => CAP_ALLOW,
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
87

88
    'mod/forum:viewrating' => array(
89

90
91
92
93
94
95
96
97
98
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'student' => CAP_ALLOW,
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
99

100
    'mod/forum:viewanyrating' => array(
101

102
103
104
105
106
107
108
109
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
110

111
    'mod/forum:rate' => array(
112

113
        'captype' => 'write',
114
115
116
117
118
119
120
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
121

122
    'mod/forum:createattachment' => array(
123

124
125
126
        'riskbitmask' => RISK_SPAM,

        'captype' => 'write',
127
128
129
130
131
132
133
134
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'student' => CAP_ALLOW,
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
135

136
    'mod/forum:deleteownpost' => array(
137

138
139
140
141
142
143
144
145
146
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'student' => CAP_ALLOW,
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
147

148
    'mod/forum:deleteanypost' => array(
149

150
151
152
153
154
155
156
157
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
158

159
    'mod/forum:splitdiscussions' => array(
160

161
162
163
164
165
166
167
168
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
169

170
    'mod/forum:movediscussions' => array(
171

172
173
174
175
176
177
178
179
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
180

181
    'mod/forum:editanypost' => array(
182

183
184
185
        'riskbitmask' => RISK_SPAM,

        'captype' => 'write',
186
187
188
189
190
191
192
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
193

194
    'mod/forum:viewqandawithoutposting' => array(
195

196
197
198
199
200
201
202
203
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
204

205
    'mod/forum:viewsubscribers' => array(
206

207
208
209
210
211
212
213
214
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    ),
215

216
    'mod/forum:managesubscriptions' => array(
217

218
219
220
221
222
223
224
        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
vyshane's avatar
vyshane committed
225
    ),
226

227
    'mod/forum:throttlingapplies' => array(
228
229

        'riskbitmask' => RISK_SPAM,
230

vyshane's avatar
vyshane committed
231
232
233
234
235
        'captype' => 'write',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
        )
    )
236
237
);

238
?>