From 55a5a0c7fdfbaff6628c752a6c277aa07296e77f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 3 Sep 2021 17:15:42 +0200 Subject: [PATCH] fix roles variable --- src/Appwrite/Auth/Auth.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php index 1f75a55204..ea7787e857 100644 --- a/src/Appwrite/Auth/Auth.php +++ b/src/Appwrite/Auth/Auth.php @@ -283,6 +283,8 @@ class Auth */ public static function getRoles(Document $user): array { + $roles = []; + if (self::isPrivilegedUser(Authorization::$roles) || self::isAppUser(Authorization::$roles)) { if ($user->getId()) { $roles[] = 'user:'.$user->getId();