Skip to content

Commit

Permalink
fix: Subadmin can access self
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Oct 8, 2024
1 parent 50b8221 commit ea5e27d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/private/SubAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ public function isSubAdmin(IUser $user): bool {
* @return bool
*/
public function isUserAccessible(IUser $subadmin, IUser $user): bool {
if ($subadmin->getUID() === $user->getUID()) {
return true;
}
if (!$this->isSubAdmin($subadmin)) {
return false;
}
Expand Down

0 comments on commit ea5e27d

Please sign in to comment.