feat: allow member of a group to view it
This commit is contained in:
parent
ca78e4f38e
commit
ba61a60192
1 changed files with 16 additions and 0 deletions
16
pb_migrations/1730642143_updated_groups.js
Normal file
16
pb_migrations/1730642143_updated_groups.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("b3bw2apayoyh7um")
|
||||
|
||||
collection.viewRule = "@request.auth.id != \"\" && members.id ?= @request.auth.id"
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
}, (db) => {
|
||||
const dao = new Dao(db)
|
||||
const collection = dao.findCollectionByNameOrId("b3bw2apayoyh7um")
|
||||
|
||||
collection.viewRule = null
|
||||
|
||||
return dao.saveCollection(collection)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue