forked from Qortal/q-blog
37 lines
1.0 KiB
Markdown
37 lines
1.0 KiB
Markdown
# 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
|
|
|
|
1. Owner always allowed.
|
|
2. If Name ∈ blacklist → blocked.
|
|
3. If whitelist non-empty → allowed iff Name ∈ whitelist (and not blacklisted).
|
|
4. 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
|