1
0
Fork 0
mirror of synced 2024-09-30 01:08:13 +13:00

Handle null permissions when processing aggregates

This commit is contained in:
Jake Barnby 2022-08-08 22:19:47 +12:00
parent e01560ab89
commit ac11617655

View file

@ -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',],