Permalink
Browse files

MDL-27553 admin: Fixed override bug

  • Loading branch information...
1 parent 1e02608 commit c1608f405d7238b4c4c5f85b5af64a26bbb31e33 @skodak skodak committed with Sam Hemelryk Mar 19, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 admin/roles/override.php
View
@@ -50,8 +50,10 @@
// security first
require_login($course, false, $cm);
+$safeoverridesonly = false;
if (!has_capability('moodle/role:override', $context)) {
require_capability('moodle/role:safeoverride', $context);
+ $safeoverridesonly = true;
}
$PAGE->set_url($url);
$PAGE->set_context($context);
@@ -119,7 +121,7 @@
}
// If we are actually overriding a role, create the table object, and save changes if appropriate.
-$overridestable = new override_permissions_table_advanced($context, $roleid, false);
+$overridestable = new override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
$overridestable->read_submitted_permissions();
if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {

0 comments on commit c1608f4

Please sign in to comment.