Adds relationships and loads secrets into the session details

This commit is contained in:
2025-05-28 15:42:49 -07:00
parent 73c7dac802
commit 65ac4852df
7 changed files with 269 additions and 6 deletions

View File

@@ -0,0 +1,28 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_617371094")
// update collection data
unmarshal({
"createRule": "",
"deleteRule": "@request.auth.id = primary.campaign.owner.id",
"listRule": "@request.auth.id = primary.campaign.owner.id",
"updateRule": "@request.auth.id = primary.campaign.owner.id",
"viewRule": "@request.auth.id = primary.campaign.owner.id"
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_617371094")
// update collection data
unmarshal({
"createRule": null,
"deleteRule": null,
"listRule": null,
"updateRule": null,
"viewRule": null
}, collection)
return app.save(collection)
})