From eaf25a3638568f580098bd56be76d80dc514e736 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2026 22:35:09 +0100 Subject: 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). --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main.rs') 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() }; -- cgit v1.3.1