askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
rules.json · 1.8 KB · 46 lines
| 1 | { |
| 2 | "retracted": [ |
| 3 | {"effect": "allow", "principal": "public", "actions": ["execute"], "object_id": "site_message_thread", "reason": "an earlier version's grant for an object this package no longer ships"} |
| 4 | ], |
| 5 | "rules": [ |
| 6 | { |
| 7 | "effect": "allow", |
| 8 | "principal": "registered", |
| 9 | "actions": ["create", "read", "update", "delete"], |
| 10 | "collection": "message_threads", |
| 11 | "row_filter": {"owner_id": "$user_id"}, |
| 12 | "reason": "a mailbox is private -- signed-in users manage only their own threads, no public read" |
| 13 | }, |
| 14 | { |
| 15 | "effect": "allow", |
| 16 | "principal": "registered", |
| 17 | "actions": ["create", "read", "update", "delete"], |
| 18 | "collection": "messages", |
| 19 | "row_filter": {"owner_id": "$user_id"}, |
| 20 | "reason": "a mailbox is private -- signed-in users manage only their own messages, no public read" |
| 21 | }, |
| 22 | { |
| 23 | "effect": "allow", |
| 24 | "principal": "registered", |
| 25 | "actions": ["create", "read", "update", "delete"], |
| 26 | "collection": "message_recipients", |
| 27 | "row_filter": {"owner_id": "$user_id"}, |
| 28 | "reason": "a mailbox is private -- signed-in users manage only the recipient rows on their own messages, no public read" |
| 29 | }, |
| 30 | { |
| 31 | "effect": "allow", |
| 32 | "principal": "registered", |
| 33 | "actions": ["create", "read", "update", "delete"], |
| 34 | "collection": "message_drafts", |
| 35 | "row_filter": {"owner_id": "$user_id"}, |
| 36 | "reason": "a mailbox is private -- signed-in users manage only their own drafts, no public read" |
| 37 | }, |
| 38 | { |
| 39 | "effect": "allow", |
| 40 | "principal": "public", |
| 41 | "actions": ["execute"], |
| 42 | "object_id": "site_inbox", |
| 43 | "reason": "the inbox page is public; it shows a sign-in prompt to visitors -- the row-filtered collection API never returns anyone else's mail" |
| 44 | } |
| 45 | ] |
| 46 | } |