1
0
Fork 0
mirror of synced 2024-06-14 08:44:49 +12:00

Pass through collection config permissions and document security

This commit is contained in:
Jake Barnby 2022-08-03 21:52:55 +12:00
parent 7b9fb32fae
commit ed9d331f89

View file

@ -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()) {