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 · 33 lines
| 1 | { |
| 2 | "rules": [ |
| 3 | {"effect": "deny", "principal": "owner_fallback", "actions": ["update", "delete"], "collection": "page_views", "reason": "the traffic log is captured server-side and is nobody's to edit; its user_id names the visitor, which the fallback read as ownership. No rule grants this; the engine's owner fallback did, to whoever the row's owner key names. This switches the fallback off for these actions only: an explicit grant still grants, and admins and in-process writers are unaffected"}, |
| 4 | {"effect": "deny", "principal": "owner_fallback", "actions": ["update", "delete"], "collection": "conversions", "reason": "conversion events are recorded server-side and are nobody's to edit; their user_id names the person converted, which the fallback read as ownership. No rule grants this; the engine's owner fallback did, to whoever the row's owner key names. This switches the fallback off for these actions only: an explicit grant still grants, and admins and in-process writers are unaffected"}, |
| 5 | { |
| 6 | "effect": "allow", |
| 7 | "principal": "role:admin", |
| 8 | "actions": [ |
| 9 | "read" |
| 10 | ], |
| 11 | "collection": "page_views", |
| 12 | "reason": "traffic analytics is an admin inspection surface; capture is server-side, never a public write" |
| 13 | }, |
| 14 | { |
| 15 | "effect": "allow", |
| 16 | "principal": "role:admin", |
| 17 | "actions": [ |
| 18 | "read" |
| 19 | ], |
| 20 | "collection": "conversions", |
| 21 | "reason": "conversion events are an admin analytics surface; recorded server-side, never a public write" |
| 22 | }, |
| 23 | { |
| 24 | "effect": "allow", |
| 25 | "principal": "registered", |
| 26 | "actions": [ |
| 27 | "execute" |
| 28 | ], |
| 29 | "object_id": "site_visitors", |
| 30 | "reason": "traffic numbers are operator information, and the page itself refuses an anonymous caller; this grant is what lets a signed-in operator reach it at all" |
| 31 | } |
| 32 | ] |
| 33 | } |