From 94211250808bbd489a823c8ac6d6168c9197d824 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Mon, 13 Apr 2009 06:54:11 +0000 Subject: [PATCH] filters: MDL-7336 create new moodle/filter:manage capability --- lang/en_utf8/role.php | 1 + lib/db/access.php | 11 +++++++++++ version.php | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lang/en_utf8/role.php b/lang/en_utf8/role.php index 71e8e6cdc2..83ec50a4c6 100644 --- a/lang/en_utf8/role.php +++ b/lang/en_utf8/role.php @@ -103,6 +103,7 @@ $string['explainpermissionsinfo'] = '

To use this table:

  1. First look $string['explainpermissionsdoanything'] = 'Note that this user has the moodle/site:doanything capability, so even though the table above shows that has_capability will return false, this user will actually be deemed to have the capability $a in most circumstances.'; $string['extusers'] = 'Existing users'; $string['extusersmatching'] = 'Existing users matching \'$a\''; +$string['filter:manage'] = 'Manage local filter settings'; $string['globalrole'] = 'System role'; $string['globalroleswarning'] = 'WARNING! Any roles you assign from this page will apply to the assigned users throughout the entire system, including the front page and all the courses.'; $string['gotoassignroles'] = 'Go to Assign roles for this $a->contextlevel'; diff --git a/lib/db/access.php b/lib/db/access.php index 341c499537..292e34c593 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -300,6 +300,17 @@ $moodle_capabilities = array( ) ), + // Permission to manage filter setting overrides in subcontexts. + 'moodle/filter:manage' => array( + + 'captype' => 'write', + 'contextlevel' => CONTEXT_COURSE, + 'legacy' => array( + 'editingteacher' => CAP_ALLOW, + 'coursecreator' => CAP_ALLOW, + 'admin' => CAP_ALLOW, + ) + ), 'moodle/user:create' => array( diff --git a/version.php b/version.php index e471904093..910d18e47a 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2009040302; // YYYYMMDD = date of the last version bump + $version = 2009040303; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 dev (Build: 20090413)'; // Human-friendly version name -- 2.39.5