feat(ui): Benutzer mit Rollen, Anmeldung mit Passwort, erste Einrichtung (#1062)
Argon2id, Standard-Admin mit Einmalpasswort in Datei, eigener Admin bei der ersten Einrichtung, Rollen admin und nutzer, Benutzerverwaltung, Mein Konto, nexus user. Die Anmeldung mit API-Key an der Oberfläche entfällt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg3osejhFSpUz472iQ1
This commit is contained in:
@ -28,6 +28,8 @@ pub struct Finish {
|
||||
pub span: Span,
|
||||
pub correlation: String,
|
||||
pub key_id: Option<i64>,
|
||||
/// Benutzer der Weboberfläche (Playground), wenn kein Key im Spiel ist.
|
||||
pub user: Option<String>,
|
||||
/// Name aus der Anfrage, gekürzt (nur für das Anfrage-Log).
|
||||
pub model_logged: String,
|
||||
/// Registrierter Modellname (Metrik-Label).
|
||||
@ -77,6 +79,7 @@ impl Tap {
|
||||
let entry = RequestLogEntry {
|
||||
correlation: f.correlation.clone(),
|
||||
api_key_id: f.key_id,
|
||||
user: f.user.clone(),
|
||||
model: Some(f.model_logged.clone()),
|
||||
status: f.status,
|
||||
wait_ms: f.wait_ms,
|
||||
@ -88,7 +91,7 @@ impl Tap {
|
||||
instance_id: Some(f.lease.instance_id),
|
||||
aborted,
|
||||
};
|
||||
if f.key_id.is_some()
|
||||
if (f.key_id.is_some() || f.user.is_some())
|
||||
&& let Err(e) = f.state.store().log_request(&entry)
|
||||
{
|
||||
f.span.in_scope(|| {
|
||||
|
||||
Reference in New Issue
Block a user