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
profile_comments.json · 3.6 KB · 88 lines
1{
2 "name": "profile_comments",
3 "title": "Profile Comments",
4 "version": 1,
5 "description": "Moderated guestbook comments on a public profile. A faithful port of the source system's ProfileComment model: author_name/author_email/author_url plus a pending/approved/rejected moderation status and the submitter's ip_address. v1 posture (see permissions/rules.json and dbbasic-package.json): guestbook posting is signed-in only, not anonymous -- the source's anonymous-submission path needs the anti-abuse stack in plan/vocabulary/02-public-write-hardening-spec.md (rate limits, honeypot, timing token), which this package does not build. The author_name/author_email/author_url fields are carried from the source's anonymous-guestbook shape even though v1 has no anonymous path, so no migration is needed when that path lands.",
6 "fields": [
7 {
8 "name": "id"
9 },
10 {
11 "name": "profile_id",
12 "type": "relation",
13 "required": true,
14 "relation": {"collection": "profiles", "display_field": "display_name"},
15 "label": "Profile"
16 },
17 {
18 "name": "author_name",
19 "type": "text",
20 "label": "Name",
21 "validation": {"max_length": 120}
22 },
23 {
24 "name": "author_email",
25 "type": "text",
26 "label": "Email",
27 "validation": {"max_length": 254},
28 "permissions": {"public": "hidden"},
29 "help": "Carried from the source's anonymous-guestbook shape. Hidden from public reads even though v1 has no public-write path to it -- defense in depth, matching the public-write-hardening spec's posture for contact fields."
30 },
31 {
32 "name": "author_url",
33 "type": "text",
34 "label": "URL",
35 "validation": {"max_length": 300}
36 },
37 {
38 "name": "content",
39 "type": "textarea",
40 "required": true,
41 "label": "Comment",
42 "validation": {"min_length": 1, "max_length": 2000}
43 },
44 {
45 "name": "status",
46 "type": "enum",
47 "label": "Status",
48 "default": "pending",
49 "enum": ["pending", "approved", "rejected"],
50 "permissions": {"public": "hidden"},
51 "transitions": {
52 "pending": [
53 {"to": "approved", "when": {"owner_id": "$user_id"}},
54 {"to": "rejected", "when": {"owner_id": "$user_id"}}
55 ],
56 "approved": [
57 {"to": "rejected", "when": {"owner_id": "$user_id"}}
58 ]
59 },
60 "help": "Matches the source: every new comment lands pending and only an approved comment is publicly visible (see permissions/rules.json's row_filter). The owner_id guard on these transitions is the SAME KNOWN GAP app-forum documents for is_solution: owner_id on a comment is the commenter, not the profile owner, so v1 lets a commenter move their own comment between pending/approved/rejected -- there is no row_filter path today for the profile owner to moderate someone else's comment. A moderator-role or profile-owner-scoped permission rule closes this; not built here."
61 },
62 {
63 "name": "ip_address",
64 "type": "text",
65 "label": "IP Address",
66 "permissions": {"public": "hidden"},
67 "help": "Carried from the source's abuse-tracking field. Nothing in this package stamps it -- no request-context plumbing exists on the create path here -- so it stays empty until a later slice fills it in."
68 },
69 {
70 "name": "created_at",
71 "type": "datetime",
72 "label": "Created",
73 "read_only": true
74 },
75 {
76 "name": "owner_id",
77 "type": "text",
78 "label": "Owner"
79 }
80 ],
81 "forms": {
82 "default": {"fields": ["content"]}
83 },
84 "views": {
85 "list_mode": "cards",
86 "list_fields": ["content", "status", "created_at"]
87 }
88}