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.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
rules.json · 1.2 KB · 42 lines
| 1 | { |
| 2 | "rules": [ |
| 3 | { |
| 4 | "effect": "allow", |
| 5 | "principal": "registered", |
| 6 | "actions": ["create", "read", "update", "delete"], |
| 7 | "collection": "shell_preferences", |
| 8 | "row_filter": {"id": "$user_id"}, |
| 9 | "reason": "each user manages their own shell preferences row" |
| 10 | }, |
| 11 | { |
| 12 | "effect": "allow", |
| 13 | "principal": "registered", |
| 14 | "actions": ["create", "read", "delete"], |
| 15 | "collection": "shell_commands", |
| 16 | "row_filter": {"owner_id": "$user_id"}, |
| 17 | "reason": "each user owns their shell history" |
| 18 | }, |
| 19 | { |
| 20 | "effect": "allow", |
| 21 | "principal": "public", |
| 22 | "actions": ["execute"], |
| 23 | "object_id": "site_shell", |
| 24 | "reason": "the shell page is public; it shows a sign-in prompt to visitors" |
| 25 | }, |
| 26 | { |
| 27 | "effect": "allow", |
| 28 | "principal": "public", |
| 29 | "actions": ["execute"], |
| 30 | "object_id": "site_talk", |
| 31 | "reason": "the talk page is public; it shows a sign-in prompt to visitors, same as the shell" |
| 32 | }, |
| 33 | { |
| 34 | "effect": "allow", |
| 35 | "principal": "registered", |
| 36 | "actions": ["read"], |
| 37 | "collection": "ai_usage", |
| 38 | "row_filter": {"owner_id": "$user_id"}, |
| 39 | "reason": "each user can see their own AI token/cost history; only the chat handler writes it" |
| 40 | } |
| 41 | ] |
| 42 | } |