Skip to content

Commit 996a04d

Browse files
committed
patch
1 parent c371b70 commit 996a04d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/create-collection.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ for (const collectionId of schema.collections.map(({ $id }) => $id)) {
6767
console.log(`Found collection id=${collectionId} name=${name}`);
6868
} else {
6969
console.log(`Creating collection id=${collectionId} name=${name}`);
70-
await databases.createCollection(DATABASE_ID, collectionId, name);
70+
await databases.createCollection(DATABASE_ID, collectionId, name, [
71+
sdk.Permission.create(sdk.Role.users()),
72+
sdk.Permission.read(sdk.Role.users()),
73+
sdk.Permission.update(sdk.Role.users()),
74+
]);
7175
}
7276

7377
for (const { key, type, required, array, size } of attributes) {

0 commit comments

Comments
 (0)