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 · 4.8 KB · 137 lines
1{
2 "rules": [
3 {
4 "effect": "allow",
5 "principal": "registered",
6 "actions": [
7 "create",
8 "read",
9 "update",
10 "delete"
11 ],
12 "collection": "bank_import_profiles",
13 "row_filter": {
14 "owner_id": "$user_id"
15 },
16 "reason": "an import profile is the user's own how-to-read-my-bank configuration"
17 },
18 {
19 "effect": "allow",
20 "principal": "registered",
21 "actions": [
22 "create",
23 "read"
24 ],
25 "collection": "bank_statement_imports",
26 "row_filter": {
27 "owner_id": "$user_id"
28 },
29 "reason": "import runs are historical events: readable and creatable by their owner, never updatable or deletable -- the provenance record for imported evidence must not be rewritable"
30 },
31 {
32 "effect": "allow",
33 "principal": "registered",
34 "actions": [
35 "create",
36 "read",
37 "update"
38 ],
39 "collection": "bank_lines",
40 "row_filter": {
41 "owner_id": "$user_id"
42 },
43 "reason": "owners read and import their own statement lines, and UPDATE only to record reconciliation work (match_status/matched_to/resolved_as) -- which is attributed in the change log, so who reconciled what is auditable. No delete: imported evidence is append-only, and the transitions on match_status constrain what an update may do to it"
44 },
45 {
46 "effect": "allow",
47 "principal": "registered",
48 "actions": [
49 "execute"
50 ],
51 "object_id": "action_import_bank_csv",
52 "reason": "importing a statement is an ordinary operator verb; the object requires a signed-in identity and verifies the bank account belongs to the caller"
53 },
54 {
55 "effect": "allow",
56 "principal": "registered",
57 "actions": [
58 "execute"
59 ],
60 "object_id": "action_resolve_bank_line",
61 "reason": "resolving a line as a fee, interest, transfer or NSF is an ordinary operator verb; the object checks ownership of the line (and of any counterpart account) and composes through the shared journal composer, which is idempotent by provenance"
62 },
63 {
64 "effect": "allow",
65 "principal": "registered",
66 "actions": [
67 "execute"
68 ],
69 "object_id": "system_bank_matcher",
70 "reason": "the matcher only ever writes SUGGESTIONS onto the caller's own unmatched lines (and auto-confirms solely at the configured tier), so running it is safe for any signed-in owner as well as the scheduler"
71 },
72 {
73 "effect": "allow",
74 "principal": "public",
75 "actions": [
76 "execute"
77 ],
78 "object_id": "site_reconcile",
79 "reason": "page objects are public execute like every other site_* page (see packages/app-finance's site_trial_balance rule); the object itself gates all data on a signed-in identity and scopes every read to the caller's own bank accounts and lines, so an anonymous or cross-owner request never sees another owner's reconciliation"
80 },
81 {
82 "effect": "allow",
83 "principal": "registered",
84 "actions": [
85 "create",
86 "read",
87 "update",
88 "delete"
89 ],
90 "collection": "value_accounts",
91 "row_filter": {
92 "owner_id": "$user_id"
93 },
94 "reason": "signed-in users manage their own value accounts; managed_by names who runs one day to day but ownership still governs the record itself"
95 },
96 {
97 "effect": "allow",
98 "principal": "registered",
99 "actions": [
100 "execute"
101 ],
102 "object_id": "system_bank_escalation",
103 "reason": "the runner only reads bank_lines/payments and creates tasks scoped to the item's own owner (or reconcile.escalate_to), so running it is safe for any signed-in owner as well as the scheduler"
104 },
105 {
106 "effect": "allow",
107 "principal": "registered",
108 "actions": [
109 "execute"
110 ],
111 "object_id": "action_import_ofx",
112 "reason": "same posture as the CSV importer: a signed-in operator verb that verifies the bank account belongs to the caller before reading anything"
113 },
114 {
115 "effect": "allow",
116 "principal": "registered",
117 "actions": [
118 "create",
119 "read"
120 ],
121 "collection": "value_account_counts",
122 "row_filter": {
123 "owner_id": "$user_id"
124 },
125 "reason": "a count is evidence: its owner may record and read one, and nobody may update or delete it -- an observation made by a named person at a moment is not a figure to revise later"
126 },
127 {
128 "effect": "allow",
129 "principal": "registered",
130 "actions": [
131 "execute"
132 ],
133 "object_id": "action_record_count",
134 "reason": "recording a count is an ordinary operator verb; the object verifies the account belongs to the caller, refuses accounts that are not counted by hand, and enforces the witness requirement"
135 }
136 ]
137}