1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 09:55:33 +02:00

MDL-29801 core_message: added delete message caps

This commit is contained in:
Mark Nelson 2015-03-24 18:28:08 -07:00
parent 1efd323842
commit 4582308508
2 changed files with 22 additions and 0 deletions
lang/en
lib/db

@ -355,6 +355,8 @@ $string['siteadministrators'] = 'Site administrators';
$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';

@ -77,6 +77,17 @@ $capabilities = array(
)
),
'moodle/site:deleteanymessage' => array(
'riskbitmask' => RISK_DATALOSS,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'manager' => CAP_ALLOW
)
),
'moodle/site:sendmessage' => array(
'riskbitmask' => RISK_SPAM,
@ -89,6 +100,15 @@ $capabilities = array(
)
),
'moodle/site:deleteownmessage' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'user' => CAP_ALLOW
)
),
'moodle/site:approvecourse' => array(
'riskbitmask' => RISK_XSS,