aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2024-10-04 16:28:23 -0700
committerChristopher Ng <chrng8@gmail.com>2024-10-09 14:52:11 -0700
commit5611268a15a9ec54351c98eff075ae80ae353a65 (patch)
tree65c0fe6179726bf24d6bd48229689fc848566d39 /lib
parentec396e588f2bc182a86ce4b16f945e13735f7b87 (diff)
downloadnextcloud-server-5611268a15a9ec54351c98eff075ae80ae353a65.tar.gz
nextcloud-server-5611268a15a9ec54351c98eff075ae80ae353a65.zip
fix: Subadmin can access self
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/SubAdmin.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/SubAdmin.php b/lib/private/SubAdmin.php
index c025ab7b012..335e901a321 100644
--- a/lib/private/SubAdmin.php
+++ b/lib/private/SubAdmin.php
@@ -259,6 +259,9 @@ class SubAdmin extends PublicEmitter implements ISubAdmin {
* @return bool
*/
public function isUserAccessible(IUser $subadmin, IUser $user): bool {
+ if ($subadmin->getUID() === $user->getUID()) {
+ return true;
+ }
if (!$this->isSubAdmin($subadmin)) {
return false;
}