diff options
| author | tv <tv@krebsco.de> | 2026-11-07 22:35:09 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-07 22:35:09 +0100 |
| commit | eaf25a3638568f580098bd56be76d80dc514e736 (patch) | |
| tree | 7abec8f4c6b2a0c11710445ce0870dbbf4865a6c /src/main.rs | |
| parent | f2487f5a1f897bb5499ffd782562f53967f20606 (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.rs | 7 |
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() }; |
