From ed9d331f89f050346b7af4fa1bedc00f5baeb4bf Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 3 Aug 2022 21:52:55 +1200 Subject: [PATCH] Pass through collection config permissions and document security --- app/http.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/http.php b/app/http.php index 68bf3959d8..f7dfbc5cff 100644 --- a/app/http.php +++ b/app/http.php @@ -129,6 +129,8 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { $attributes = []; $indexes = []; + $permissions = $collection['$permissions'] ?? ['read(any)', 'write(any)']; + $documentSecurity = $collection['documentSecurity'] ?? false; foreach ($collection['attributes'] as $attribute) { $attributes[] = new Document([ @@ -154,7 +156,7 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { ]); } - $dbForConsole->createCollection($key, $attributes, $indexes); + $dbForConsole->createCollection($key, $attributes, $indexes, $permissions, $documentSecurity); } if ($dbForConsole->getDocument('buckets', 'default')->isEmpty()) {