1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00
This commit is contained in:
Jake Barnby 2022-08-19 16:05:00 +12:00
parent 66539bbe3a
commit 9819088563
3 changed files with 4 additions and 4 deletions

View file

@ -1969,7 +1969,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
} else { } else {
foreach ($allowedPermissions as $permission) { foreach ($allowedPermissions as $permission) {
/** /**
* If an allowed permission was not passed in the request, * If an allowed permission was not passed in the request,
* and there is a current user, add it for the current user. * and there is a current user, add it for the current user.
*/ */
if (empty(\preg_grep("#^{$permission}\(.+\)$#", $permissions)) && !empty($user->getId())) { if (empty(\preg_grep("#^{$permission}\(.+\)$#", $permissions)) && !empty($user->getId())) {

View file

@ -247,8 +247,8 @@ App::init()
/* /*
* ACL Check * ACL Check
*/ */
$role = ($user->isEmpty()) $role = ($user->isEmpty())
? Role::guests()->toString() ? Role::guests()->toString()
: Role::users()->toString(); : Role::users()->toString();
// Add user roles // Add user roles

2
composer.lock generated
View file

@ -5383,5 +5383,5 @@
"platform-overrides": { "platform-overrides": {
"php": "8.0" "php": "8.0"
}, },
"plugin-api-version": "2.2.0" "plugin-api-version": "2.3.0"
} }