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:
@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user