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

0 downloads

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.

danq9 signup: the person chooses the password and name on the confirm page 83c7aa6 2 weeks, 5 days ago History
rules.json · 2.7 KB · 40 lines
1{
2 "rules": [
3 {
4 "effect": "allow",
5 "principal": "registered",
6 "actions": ["create", "read", "update"],
7 "collection": "return_authorizations",
8 "row_filter": {"owner_id": "$user_id"},
9 "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"
10 },
11 {
12 "effect": "allow",
13 "principal": "registered",
14 "actions": ["execute"],
15 "object_id": "action_authorize_return",
16 "reason": "granting a return is counter work, not owner-only work: anybody signed in can say yes, and everything they 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"
17 },
18 {
19 "effect": "allow",
20 "principal": "registered",
21 "actions": ["execute"],
22 "object_id": "action_disposition_return",
23 "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"
24 },
25 {
26 "effect": "allow",
27 "principal": "registered",
28 "actions": ["execute"],
29 "object_id": "system_return_posting",
30 "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"
31 },
32 {
33 "effect": "allow",
34 "principal": "public",
35 "actions": ["execute"],
36 "object_id": "site_return_form",
37 "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"
38 }
39 ]
40}