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

@@ -35,7 +35,8 @@ pub struct Me {
/// Someone asked this device to share now (Nudge).
#[serde(default)]
pub nudge: bool,
/// This person may create vaults here, and move vaults onto this hub (owner, or Manage on a vault).
/// This person may create vaults here, and move vaults onto this hub. The hub decides (by default the
/// owner, or Manage on a vault; every member when it runs with `LUNE_VAULT_CREATION=anyone`).
#[serde(default)]
pub can_create: bool,
}