feat(oidc): show the env-managed provider as locked in settings

The API answers 409 to any write against this provider, so offering edit,
delete and the enable toggle would promise a change that cannot land -- the
operator would click, see nothing happen, and have no way to tell why. The
controls are hidden and a lock badge names the reason instead.

Reuses settings.environmentManagedLabel, the string the Home Assistant
env-managed fields already use: same situation, same wording, and no new key
to keep in parity across eleven locales.

is_env_managed is optional on the client type so a response from an older
backend still type-checks.

Refs #2593
This commit is contained in:
Marian
2026-07-28 21:05:29 +00:00
parent 8d1b2b9027
commit 05aebac67b
3 changed files with 90 additions and 16 deletions
+5
View File
@@ -3518,6 +3518,11 @@ export interface OIDCProvider {
// #1589: when true, the LoginPage redirects unauthenticated visitors
// straight to this provider on mount. At most one provider may carry this.
is_autologin: boolean;
// #2593: defined by BAMBUDDY_OIDC_* and rewritten from the environment on
// every boot. The API answers 409 to any write, so the settings UI must not
// offer edit/delete controls that cannot succeed. Optional so a response
// from an older backend still type-checks.
is_env_managed?: boolean;
}
export interface OIDCProviderCreate {