Hub: LUNE_VAULT_CREATION=anyone lets every member create vaults

By default only the team owner and people who manage a vault can create
vaults, as before. A hub run with LUNE_VAULT_CREATION=anyone lets any
active member create one (and upload one); the creator is Manage on that
vault only. Sharing is unchanged: inviting or granting still needs Manage
on the vault being shared, so nobody can connect others to a vault they
do not manage.

An unknown value stops the hub at startup, before any data is touched.
All three places that report or enforce the rule (me, canvas, create_vault)
read the same setting. No client change is needed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 12:49:40 +07:00
parent e6c3f008a0
commit 0148f98cfe
9 changed files with 188 additions and 13 deletions

View File

@@ -250,3 +250,4 @@ Record here: date, what changed, why, which decision number. Example:
- 2026-10-29 — Community release without Apple signing, under AGPL-3.0-only; the public repo stays at git.senkensha.space. (Sen)
- 2026-11-16 — For GBrain vaults, S4 changes: the losing version of a same-lines clash is kept only on its own device under Notes to tidy, never written into the vault folder; lines both sides added are kept, incoming first (S4, M8). (Sen)
- 2026-11-16 — A vault's kind (Obsidian / GBrain) is a hub setting, so a GBrain vault must be on a hub; Brain moves from Gitea to the hub before M8's acceptance (M8). (Sen)
- 2026-11-17 — Who may create vaults is a hub setting, `LUNE_VAULT_CREATION`: `managers` (the default, as decided 2026-10-29: the team owner and anyone with Manage on a vault) or `anyone`. Any member can create vaults when LUNE_VAULT_CREATION=anyone; creators are Manage on their own vault only; sharing still needs Manage on the vault being shared. The same rule covers uploading a vault, and an unknown value stops the hub at start. (Sen)