fix: Subadmin can access self

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2024-10-04 16:28:23 -07:00
parent 50b82214e8
commit ea5e27dcd8

View 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;
}