aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/SubAdmin.php
diff options
context:
space:
mode:
authorMikael Hammarin <mikael@try2.se>2019-10-28 15:48:46 +0100
committerJoas Schilling <coding@schilljs.com>2020-04-25 14:37:46 +0200
commit6ffde74928651db451a8ca23ba440f16f8512681 (patch)
tree307d4565b876a961191e76c63dba7d71cd041092 /lib/private/SubAdmin.php
parent39f6f1ba341b053f8830571f6f2238c1653cf1ea (diff)
downloadnextcloud-server-6ffde74928651db451a8ca23ba440f16f8512681.tar.gz
nextcloud-server-6ffde74928651db451a8ca23ba440f16f8512681.zip
Patch to optimize for large installations (>5000 users >20000 groups) where subadmins have access to many of groups (>250)
- UsersController:editUser() calls isUserAccessible() even if the user is admin This fix reduces API calls to editUser (ex change locale/display name) from >2 minutes (!) to ~3 seconds per call in average. Signed-off-by: Mikael Hammarin <mikael@try2.se>
Diffstat (limited to 'lib/private/SubAdmin.php')
-rw-r--r--lib/private/SubAdmin.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/SubAdmin.php b/lib/private/SubAdmin.php
index d292e998ab9..9a758ac4423 100644
--- a/lib/private/SubAdmin.php
+++ b/lib/private/SubAdmin.php
@@ -255,6 +255,7 @@ class SubAdmin extends PublicEmitter implements ISubAdmin {
if ($this->groupManager->isAdmin($user->getUID())) {
return false;
}
+
$accessibleGroups = $this->getSubAdminsGroups($subadmin);
foreach ($accessibleGroups as $accessibleGroup) {
if ($accessibleGroup->inGroup($user)) {