Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

9 downloads

Install on DigitalOcean Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Daniel Quellhorst Changelog for this batch. 65ef78d 3 hours, 41 minutes ago History
rules.json · 3.5 KB · 44 lines
1{
2 "retracted": [
3 {"effect": "allow", "principal": "registered", "actions": ["execute"], "object_id": "site_return_form", "reason": "superseded: the return form's execute grant is now the public one this package ships"}
4 ],
5 "rules": [
6 {"effect": "deny", "principal": "owner_fallback", "actions": ["delete"], "collection": "return_authorizations", "reason": "a return that was granted cannot be made not to have been granted: no delete. 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"},
7 {
8 "effect": "allow",
9 "principal": "registered",
10 "actions": ["create", "read", "update"],
11 "collection": "return_authorizations",
12 "row_filter": {"owner_id": "$user_id"},
13 "reason": "an RMA is the operator's own paperwork about their own goods and their own promise; no delete, because a return that was granted cannot be made not to have been granted -- a mistake is a declined RMA or a closed one with no refund, never a vanished row, and 'we said no on the 3rd' is the answer to the email that arrives on the 20th"
14 },
15 {
16 "effect": "allow",
17 "principal": "registered",
18 "actions": ["execute"],
19 "object_id": "action_authorize_return",
20 "reason": "the execute grant only lets a signed-in caller ask; the object decides, and it says yes to whoever the orders API lets update the order (its owner, staff, an admin) -- a signed-in account is never let in by the order's guest token (0.6.3). Everything anyone can say yes TO is bounded by what the order actually shipped -- the gate refuses more than was sent, with the numbers, whoever is asking"
21 },
22 {
23 "effect": "allow",
24 "principal": "registered",
25 "actions": ["execute"],
26 "object_id": "action_disposition_return",
27 "reason": "the person who opens the box is the person who knows what is in it, and making them fetch an owner before they can say 'this one is fine' is how goods end up on a bench for a week; the money it can move is bounded by hook_refunds, which caps every refund at what the payment can give back regardless of who called this"
28 },
29 {
30 "effect": "allow",
31 "principal": "registered",
32 "actions": ["execute"],
33 "object_id": "system_return_posting",
34 "reason": "a change handler runs as the dispatcher, and it only ever stamps a status to keep an RMA in step with its parcel -- it moves no stock and composes no money, so there is nothing here worth guarding more tightly than the write that triggered it"
35 },
36 {
37 "effect": "allow",
38 "principal": "public",
39 "actions": ["execute"],
40 "object_id": "site_return_form",
41 "reason": "public since 0.4.0, and it had to become so: this shop's default sale is a guest checkout, so a returns flow that requires an account is a returns flow nobody can use. The order id in the URL is still not a secret and is still not treated as one -- the page admits a visitor only on a signed-in session OR on orders.portal_token (schema v5) matched against THAT order with hmac.compare_digest, and everything else, including a wrong token and an order that does not exist, gets the identical 'open your tracking link or sign in' page so a guessed id never confirms itself. Public EXECUTE on the page object only; the orders and return_authorizations collections stay owner-scoped, the same split app-invoices uses for site_invoice_portal"
42 }
43 ]
44}