Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-27553 admin: Fixed override bug

  • Loading branch information...
commit a3b60b4186f5b6562d484197afae3c5809c904e8 1 parent f571d4c
Petr Skoda skodak authored samhemelryk committed

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 admin/roles/override.php
4 admin/roles/override.php
@@ -50,8 +50,10 @@
50 50
51 51 // security first
52 52 require_login($course, false, $cm);
  53 +$safeoverridesonly = false;
53 54 if (!has_capability('moodle/role:override', $context)) {
54 55 require_capability('moodle/role:safeoverride', $context);
  56 + $safeoverridesonly = true;
55 57 }
56 58 $PAGE->set_url($url);
57 59 $PAGE->set_context($context);
@@ -119,7 +121,7 @@
119 121 }
120 122
121 123 // If we are actually overriding a role, create the table object, and save changes if appropriate.
122   -$overridestable = new override_permissions_table_advanced($context, $roleid, false);
  124 +$overridestable = new override_permissions_table_advanced($context, $roleid, $safeoverridesonly);
123 125 $overridestable->read_submitted_permissions();
124 126
125 127 if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {

0 comments on commit a3b60b4

Please sign in to comment.
Something went wrong with that request. Please try again.