Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for MDL-9216 ("Login as" doesn't work) backported from head

  • Loading branch information...
commit 52f24bfec6e31fcd699da8213c28ac1490f7c243 1 parent b278798
donal72 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/accesslib.php
View
3  lib/accesslib.php
@@ -741,7 +741,8 @@ function load_user_capability($capability='', $context = NULL, $userid='') {
}
if ($capability) {
- $capsearch = " AND rc.capability = '$capability' ";
+ // the doanything may override the requested capability
+ $capsearch = " AND (rc.capability = '$capability' OR rc.capability = 'moodle/site:doanything') ";
} else {
$capsearch ="";
}
Please sign in to comment.
Something went wrong with that request. Please try again.