From ea5e27dcd89820c9939598d53628f9d0f9988ceb Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 4 Oct 2024 16:28:23 -0700 Subject: [PATCH] fix: Subadmin can access self Signed-off-by: Christopher Ng --- lib/private/SubAdmin.php | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.5