Skip to content

Commit

Permalink
MDL-20328 New capabilities for blog
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Oct 30, 2009
1 parent 1c7b8b9 commit 05de723
Showing 1 changed file with 51 additions and 3 deletions.
54 changes: 51 additions & 3 deletions lib/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,20 @@
'moodle/blog:view' => array(

'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'contextlevel' => CONTEXT_SYSTEM,
'legacy' => array(
'guest' => CAP_ALLOW,
'user' => CAP_ALLOW,
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),

'moodle/blog:search' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_SYSTEM,
'legacy' => array(
'guest' => CAP_ALLOW,
'user' => CAP_ALLOW,
Expand All @@ -809,6 +822,16 @@
)
),

'moodle/blog:viewdrafts' => array(

'riskbitmask' => RISK_PERSONAL,
'captype' => 'read',
'contextlevel' => CONTEXT_SYSTEM,
'legacy' => array(
'admin' => CAP_ALLOW
)
),

'moodle/blog:create' => array( // works in CONTEXT_SYSTEM only

'riskbitmask' => RISK_SPAM,
Expand All @@ -826,14 +849,14 @@
'riskbitmask' => RISK_SPAM,

'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'contextlevel' => CONTEXT_SYSTEM,
'legacy' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),

'moodle/blog:manageexternal' => array(

'riskbitmask' => RISK_SPAM,
Expand All @@ -849,6 +872,31 @@
)
),

'moodle/blog:associatecourse' => array(

'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'legacy' => array(
'student' => CAP_ALLOW,
'user' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),

'moodle/blog:associatemodule' => array(

'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
'student' => CAP_ALLOW,
'user' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'admin' => CAP_ALLOW
)
),

'moodle/calendar:manageownentries' => array( // works in CONTEXT_SYSTEM only

Expand Down

0 comments on commit 05de723

Please sign in to comment.