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
record_shares.json · 1.1 KB · 17 lines
| 1 | { |
| 2 | "name": "record_shares", |
| 3 | "title": "Shares", |
| 4 | "version": 1, |
| 5 | "storage": "append", |
| 6 | "description": "Generic record sharing: a grant of access to one record in any collection, via collection/record_id, to a user. The capabilities.shareable surface. Grants are WRITTEN only by the owner-checked /api/share endpoint (never a raw collection write -- forging a grant would be privilege escalation), so this schema declares no create/update/delete permission rule.", |
| 7 | "fields": [ |
| 8 | {"name": "id"}, |
| 9 | {"name": "collection", "type": "text", "required": true, "label": "Collection"}, |
| 10 | {"name": "record_id", "type": "text", "required": true, "label": "Record"}, |
| 11 | {"name": "user_id", "type": "text", "required": true, "label": "Shared with"}, |
| 12 | {"name": "permission", "type": "enum", "enum": ["read", "write"], "default": "read", "label": "Permission"}, |
| 13 | {"name": "granted_by", "type": "text", "read_only": true, "label": "Granted by"}, |
| 14 | {"name": "created_at", "type": "datetime", "read_only": true, "label": "Granted"} |
| 15 | ], |
| 16 | "views": {"list_mode": "table", "list_fields": ["user_id", "permission", "granted_by", "created_at"]} |
| 17 | } |