]> git.mjollnir.org Git - moodle.git/commitdiff
MFC: MDL-11996 fixed previous speedup commit for user operations in admin tree
authorskodak <skodak>
Thu, 1 Nov 2007 19:43:46 +0000 (19:43 +0000)
committerskodak <skodak>
Thu, 1 Nov 2007 19:43:46 +0000 (19:43 +0000)
admin/settings/users.php

index b0fd5e9e54c75a09bdbac6228f9df0f746f973dd..5ad2d7daa5a3ecf3affc18aa6f6dd16b44b705d5 100644 (file)
@@ -2,7 +2,11 @@
 
 // This file defines settingpages and externalpages under the "users" category
 
-if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
+if ($hassiteconfig
+ or has_capability('moodle/site:uploadusers', $systemcontext)
+ or has_capability('moodle/user:create', $systemcontext)
+ or has_capability('moodle/user:update', $systemcontext)
+ or has_capability('moodle/user:delete', $systemcontext)) { // speedup for non-admins, add all caps used on this page
 
 
 $ADMIN->add('users', new admin_externalpage('userauthentication', get_string('authentication','admin'), "$CFG->wwwroot/$CFG->admin/auth.php"));