1
0
Fork 0
mirror of synced 2024-06-11 15:24:45 +12:00

Review fixes

This commit is contained in:
Jake Barnby 2022-08-15 22:11:17 +12:00
parent 5870e6367c
commit 813e9135c6
3 changed files with 8 additions and 10 deletions

View file

@ -1056,9 +1056,9 @@ App::post('/v1/projects/:projectId/platforms')
$platform = new Document([
'$id' => ID::unique(),
'$permissions' => [
'read(any)',
'update(any)',
'delete(any)',
Permission::read(Role::any()),
Permission::update(Role::any()),
Permission::delete(Role::any()),
],
'projectInternalId' => $project->getInternalId(),
'projectId' => $project->getId(),
@ -1272,9 +1272,9 @@ App::post('/v1/projects/:projectId/domains')
$domain = new Document([
'$id' => ID::unique(),
'$permissions' => [
'read(any)',
'update(any)',
'delete(any)',
Permission::read(Role::any()),
Permission::update(Role::any()),
Permission::delete(Role::any()),
],
'projectInternalId' => $project->getInternalId(),
'projectId' => $project->getId(),

View file

@ -469,9 +469,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
$path = $deviceFiles->getPath($fileId . '.' . \pathinfo($fileName, PATHINFO_EXTENSION));
$path = str_ireplace($deviceFiles->getRoot(), $deviceFiles->getRoot() . DIRECTORY_SEPARATOR . $bucket->getId(), $path); // Add bucket id to path after root
$file = Authorization::skip(function () use ($dbForProject, $bucket, $fileId) {
return $dbForProject->getDocument('bucket_' . $bucket->getInternalId(), $fileId);
});
$file = $dbForProject->getDocument('bucket_' . $bucket->getInternalId(), $fileId);
$metadata = ['content_type' => $deviceLocal->getFileMimeType($fileTmpName)];
if (!$file->isEmpty()) {

View file

@ -13,7 +13,7 @@
</extensions>
<testsuites>
<testsuite name="unit">
<directory>./tests/unit</directory>
<directory>./tests/unit/</directory>
</testsuite>
<testsuite name="e2e">
<file>./tests/e2e/Client.php</file>