feat: erste Weboberfläche (nur lesend) mit Anmeldung über Key-Recht ui, Status-Endpunkt (#1048, #1049)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 09:29:02 +01:00
parent 3c4bb805d3
commit c90f17aef7
12 changed files with 886 additions and 5 deletions

View File

@ -14,6 +14,9 @@ pub struct Rights {
/// Darf `GET /gateway/v1/metrics` lesen. Ältere Keys ohne dieses Feld: nein.
#[serde(default)]
pub metrics: bool,
/// Darf sich an der Weboberfläche anmelden (nur lesend). Ältere Keys: nein.
#[serde(default)]
pub ui: bool,
}
impl Default for Rights {
@ -21,6 +24,7 @@ impl Default for Rights {
Self {
models: vec!["*".to_string()],
metrics: false,
ui: false,
}
}
}
@ -197,6 +201,7 @@ mod tests {
let r = Rights {
models: vec!["bonsai".to_string()],
metrics: false,
ui: false,
};
assert!(r.allows("bonsai"));
assert!(!r.allows("anderes"));