]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: Subadmin can access self
authorChristopher Ng <chrng8@gmail.com>
Fri, 4 Oct 2024 23:28:23 +0000 (16:28 -0700)
committerChristopher Ng <chrng8@gmail.com>
Tue, 8 Oct 2024 23:24:40 +0000 (16:24 -0700)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
lib/private/SubAdmin.php

index c025ab7b01246fb57d689869de8d13b6fbf61910..335e901a321b6e0ba6d0b7bbf27d2d76203f14bd 100644 (file)
@@ -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;
                }