forked from Qortal/q-blog
1.0 KiB
1.0 KiB
Wiki Mode — Resolver & Authorization Spec
Generated 2025-08-22
Identity
- Name (string) is the identity key.
- One account may own multiple Names. Names may be transferred; rules apply to current Name string.
Authorization Precedence
- Owner always allowed.
- If Name ∈ blacklist → blocked.
- If whitelist non-empty → allowed iff Name ∈ whitelist (and not blacklisted).
- If whitelist empty → allowed (unless blacklisted).
If Name in both lists → blacklisted.
Canonical Selection
- Group posts by originPostId (or id if missing).
- Candidates: published posts in lineage blog id.
- Filter: authorized authors only.
- Choose newest by updatedAt. Tie: Owner wins; then lowest id.
Edit Visibility
Shown if: (viewer == Owner) or (wikiEnabled && viewer not blacklisted && (whitelist empty or viewer ∈ whitelist)).
Backward Compatibility
- Missing wikiEnabled → false
- Missing lists → empty
- Missing originPostId → id
- Missing lineageBlogId → current blogId
- Missing updatedAt → QDN timestamp