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 · 2.0 KB · 41 lines
| 1 | { |
| 2 | "retracted": [ |
| 3 | {"effect": "allow", "principal": "public", "actions": ["execute"], "object_id": "site_projects", "reason": "no package ships this object, so the grant made whatever was later created under the id runnable without a rule written for it (bug-reports/2026-11-28-06-14-43)"}, |
| 4 | {"effect": "allow", "principal": "registered", "actions": ["execute"], "object_id": "site_projects", "reason": "an earlier version's grant for an object this package no longer ships"} |
| 5 | ], |
| 6 | "rules": [ |
| 7 | {"effect": "deny", "principal": "owner_fallback", "actions": ["update"], "collection": "project_access", "reason": "a grant names its grantee in user_id, which the fallback read as ownership: a grantee could raise their own grant from read to write. A grant is changed by its project's owner revoking and re-granting. 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"}, |
| 8 | { |
| 9 | "effect": "allow", |
| 10 | "principal": "registered", |
| 11 | "actions": ["create", "read", "update", "delete"], |
| 12 | "collection": "projects", |
| 13 | "row_filter": {"owner_id": "$user_id"}, |
| 14 | "reason": "signed-in users manage their own projects" |
| 15 | }, |
| 16 | { |
| 17 | "effect": "allow", |
| 18 | "principal": "registered", |
| 19 | "actions": ["read"], |
| 20 | "collection": "projects", |
| 21 | "row_filter": {"id": "$accessible_projects"}, |
| 22 | "reason": "projects shared with a user are readable" |
| 23 | }, |
| 24 | { |
| 25 | "effect": "allow", |
| 26 | "principal": "registered", |
| 27 | "actions": ["read"], |
| 28 | "collection": "project_access", |
| 29 | "row_filter": {"user_id": "$user_id"}, |
| 30 | "reason": "users can see grants that name them" |
| 31 | }, |
| 32 | { |
| 33 | "effect": "allow", |
| 34 | "principal": "registered", |
| 35 | "actions": ["create", "read", "delete"], |
| 36 | "collection": "project_access", |
| 37 | "row_filter": {"project_id": "$owned_projects"}, |
| 38 | "reason": "project owners share and revoke access to their own projects" |
| 39 | } |
| 40 | ] |
| 41 | } |