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 · 727 bytes · 27 lines
| 1 | { |
| 2 | "rules": [ |
| 3 | { |
| 4 | "effect": "allow", |
| 5 | "principal": "registered", |
| 6 | "actions": ["create", "read", "update", "delete"], |
| 7 | "collection": "articles", |
| 8 | "row_filter": {"owner_id": "$user_id"}, |
| 9 | "reason": "signed-in users manage their own articles" |
| 10 | }, |
| 11 | { |
| 12 | "effect": "allow", |
| 13 | "principal": "public", |
| 14 | "actions": ["read"], |
| 15 | "collection": "articles", |
| 16 | "row_filter": {"is_public": "true"}, |
| 17 | "reason": "published articles are readable by anyone" |
| 18 | }, |
| 19 | { |
| 20 | "effect": "allow", |
| 21 | "principal": "public", |
| 22 | "actions": ["execute"], |
| 23 | "object_id": "site_articles", |
| 24 | "reason": "the articles page is public; visitors see published articles" |
| 25 | } |
| 26 | ] |
| 27 | } |