aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:09 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:09 +0100
commiteaf25a3638568f580098bd56be76d80dc514e736 (patch)
tree7abec8f4c6b2a0c11710445ce0870dbbf4865a6c /src/main.rs
parentf2487f5a1f897bb5499ffd782562f53967f20606 (diff)
access: genesis of swarms from before the registry
Swarms started before the registry keep working without one; the genesis node's options for a registry apply only to new swarms. What tests and migration leave is noted in future-work. Auth plan M1, bootstrap and migration (2.5).
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index b3eb438..2b8c376 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -97,14 +97,13 @@ async fn main() -> Result<()> {
// A broken htpasswd will abort startup.
let auth_state =
AuthState::from_settings(&args)?.context("htpasswd or user-header is required")?;
- // A new swarm's first users, before the minutes of startup too: one nobody could
- // manage doesn't start.
- let first_users = if args.genesis {
+ // A new swarm's first users, if it is to have a user registry.
+ let first_users = if args.genesis && !args.bootstrap_users.is_empty() {
let htpasswd = match args.htpasswd.as_deref() {
Some(path) => api::auth::htpasswd_names(path)?,
None => Vec::new(),
};
- access::registry::first_users(&args.bootstrap_users, &htpasswd, &args.protocol_writers)?
+ access::registry::first_users(&args.bootstrap_users, &htpasswd)
} else {
Vec::new()
};