Add host-configurable collab permissions with layered overrides.
All checks were successful
Windows Release / windows-x86_64 (push) Successful in 1h12m54s

Session/person/layer defaults plus person×layer ACL (Allow/Deny/Inherit) for draw, move, delete, hide, and layer management; bump save format to 0.9.0-fork.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
copilot 2026-11-07 18:12:42 +01:00
parent 2009a3f892
commit 7f34283537
20 changed files with 715 additions and 70 deletions

18
FORK.md
View file

@ -4,7 +4,7 @@ Upstream: [ErrorAtLine0/infinipaint](https://github.com/ErrorAtLine0/infinipaint
**Public forge:** https://forgejo.fsociety00.cc/copilot/infinipaint
GitHub (`littlecodedragon/infinipaint`) is **private builder only** — not a public fork mirror. Source of truth stays on Forgejo.
Save format: `INFPNT000008` / version `0.8.0-fork` (not network-compatible with stock 0.6.x peers).
Save format: `INFPNT000009` / version `0.9.0-fork` (not network-compatible with stock 0.6.x peers).
## CI
@ -33,4 +33,18 @@ Not automatic on import. Choose **Paste Image + Freistellen** from the canvas ri
## Fog of War / layer lock (host)
In the layer panel (host / local file only): mark a leaf layer as **Fog of War layer** (must sit **above** the content it covers), then paint fog with brush/shapes on that layer. Players receive a **stripped** world — only objects **fully** covered by opaque fog (not merely overlapping) are omitted from join sync and from their save. Partially covered images stay. Moving or reshaping fog (or content under it) live-updates clients: newly covered objects are unloaded, revealed ones are sent again with their resources. The host file stays complete. Fog draws at the layer’s real alpha (1.0 = fully opaque for host and players). **Lock for players** blocks client edits on a normal layer; fog layers are always locked for players (move/edit/erase rejected on the host). Players also **cannot hide or fade** a fog layer (eye / alpha); only the host can toggle fog visibility, and the host rejects client DisplayData that would strip FoW.
In the layer panel (host / local file only): mark a leaf layer as **Fog of War layer** (must sit **above** the content it covers), then paint fog with brush/shapes on that layer. Players receive a **stripped** world — only objects **fully** covered by opaque fog (not merely overlapping) are omitted from join sync and from their save. Partially covered images stay. Moving or reshaping fog (or content under it) live-updates clients: newly covered objects are unloaded, revealed ones are sent again with their resources. The host file stays complete. Fog draws at the layer’s real alpha (1.0 = fully opaque for host and players). **Lock for players** is a quick toggle that sets layer-default Draw/Move/Delete to Deny; fog layers are always locked for players (move/edit/erase rejected on the host). Players also **cannot hide or fade** a fog layer (eye / alpha); only the host can toggle fog visibility, and the host rejects client DisplayData that would strip FoW. FoW visibility is still global (not per-person).
## Collab permissions (host)
Rights: **Draw**, **Move**, **Delete**, **Hide**, **Layers** (create/reorder/delete layers). Each right is Allow / Deny / Inherit.
Resolution (first concrete wins): Person×Layer override → Layer defaults → Person defaults → World default (Inherit at world = Allow).
Host UI:
- Player list → **Session Defaults…** (world / new-player / new-layer templates)
- Player list → **Rights** per connected player (person defaults; copied from new-player template on join)
- Layer panel (host): layer defaults + per-player overrides for the selected layer
Clients cannot escalate their own ACL; host DisplayData/ClientData updates are sanitized.