Skip to content
Browse files

MDL-9216 has capabilitiy does not respect doanything if admin userid …

…specified and $USER is not admin
  • Loading branch information...
1 parent d76f66d commit 315184aeee04beb1b2d9659485b2e7f59a54bc3c skodak committed Apr 9, 2007
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/accesslib.php
View
3 lib/accesslib.php
@@ -845,7 +845,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 ="";
}

0 comments on commit 315184a

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