Skip to content

Commit

Permalink
MDL-29801 core_message: added delete message caps
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Sep 2, 2015
1 parent 1efd323 commit 4582308
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lang/en/role.php
Expand Up @@ -355,6 +355,8 @@
$string['site:approvecourse'] = 'Approve course creation';
$string['site:backup'] = 'Backup courses';
$string['site:config'] = 'Change site configuration';
$string['site:deleteanymessage'] = 'Delete any messages on the site';
$string['site:deleteownmessage'] = 'Delete messages sent by and to the user';
$string['site:doanything'] = 'Allowed to do everything';
$string['site:doclinks'] = 'Show links to offsite docs';
$string['site:forcelanguage'] = 'Override course language';
Expand Down
20 changes: 20 additions & 0 deletions lib/db/access.php
Expand Up @@ -77,6 +77,17 @@
)
),

'moodle/site:deleteanymessage' => array(

'riskbitmask' => RISK_DATALOSS,

'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'manager' => CAP_ALLOW
)
),

'moodle/site:sendmessage' => array(

'riskbitmask' => RISK_SPAM,
Expand All @@ -89,6 +100,15 @@
)
),

'moodle/site:deleteownmessage' => array(

'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'user' => CAP_ALLOW
)
),

'moodle/site:approvecourse' => array(

'riskbitmask' => RISK_XSS,
Expand Down

0 comments on commit 4582308

Please sign in to comment.