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.3 KB · 19 lines
| 1 | { |
| 2 | "rules": [ |
| 3 | { |
| 4 | "effect": "allow", |
| 5 | "principal": "registered", |
| 6 | "actions": ["create", "read", "update"], |
| 7 | "collection": "disputes", |
| 8 | "row_filter": {"owner_id": "$user_id"}, |
| 9 | "reason": "a dispute is the operator's own record of an argument about their own goods and their own money; no delete, because a claim that was made cannot be made not to have been made -- a mistake is a withdrawn dispute or one resolved as no_action with a reason, never a vanished row, and 'we told her no on the 3rd' is the answer to the chargeback that arrives on the 20th" |
| 10 | }, |
| 11 | { |
| 12 | "effect": "allow", |
| 13 | "principal": "registered", |
| 14 | "actions": ["execute"], |
| 15 | "object_id": "action_resolve_dispute", |
| 16 | "reason": "settling a claim is counter work, not owner-only work: the person on the phone to the customer is the person who can end the call, and everything they can give away is bounded by gates they do not control -- hook_refunds caps a refund at what the payment can give back, and hook_disputes refuses any close that does not name a real compensating record, whoever is asking. hook_disputes itself needs no rule of its own, the same way hook_receipt_lines and hook_shipment_lines have none: a pre-write gate runs inside the write it is guarding, on behalf of whoever was already allowed to make it" |
| 17 | } |
| 18 | ] |
| 19 | } |