admin UI: add anonymous user creation checkbox (#8773)

Add an "Anonymous" checkbox next to the username field in the Create User
modal. When checked, the username is set to "anonymous" and the credential
generation checkbox is disabled since anonymous users do not need keys.

The checkbox is only shown when no anonymous user exists yet. The
manage-access-keys button in the users table is hidden for the anonymous
user.
This commit is contained in:
Chris Lu
2026-03-25 21:24:10 -07:00
committed by GitHub
parent 94bfa2b340
commit 67a551fd62
4 changed files with 96 additions and 29 deletions

View File

@@ -311,10 +311,19 @@ func (h *UserHandlers) getObjectStoreUsersData(r *http.Request) dash.ObjectStore
}
}
hasAnonymous := false
for _, u := range users {
if u.Username == "anonymous" {
hasAnonymous = true
break
}
}
return dash.ObjectStoreUsersData{
Username: username,
Users: users,
TotalUsers: len(users),
LastUpdated: time.Now(),
Username: username,
Users: users,
TotalUsers: len(users),
HasAnonymousUser: hasAnonymous,
LastUpdated: time.Now(),
}
}