mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Handle null permissions when processing aggregates
This commit is contained in:
@@ -2,12 +2,17 @@
|
||||
|
||||
namespace Appwrite\Permissions;
|
||||
|
||||
use Appwrite\Auth\Auth;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Database\Validator\Authorization;
|
||||
|
||||
class PermissionsProcessor
|
||||
{
|
||||
public static function handleAggregates(array $permissions): array
|
||||
public static function handleAggregates(?array $permissions): ?array
|
||||
{
|
||||
if (\is_null($permissions)) {
|
||||
return null;
|
||||
}
|
||||
$aggregates = [
|
||||
'admin' => ['create', 'update', 'delete', 'read',],
|
||||
'write' => ['create', 'update', 'delete',],
|
||||
|
||||
Reference in New Issue
Block a user