web/admin: show user internal service account as disabled (#9464) Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens L <jens@goauthentik.io>
This commit is contained in:
![98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
e86aa11131
commit
f991d656c7
@ -128,6 +128,14 @@ export class UserForm extends ModelForm<User, number> {
|
|||||||
"Service accounts should be used for machine-to-machine authentication or other automations.",
|
"Service accounts should be used for machine-to-machine authentication or other automations.",
|
||||||
)}`,
|
)}`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Internal Service account",
|
||||||
|
value: UserTypeEnum.InternalServiceAccount,
|
||||||
|
disabled: true,
|
||||||
|
description: html`${msg(
|
||||||
|
"Internal Service accounts are created and managed by authentik and cannot be created manually.",
|
||||||
|
)}`,
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
.value=${this.instance?.type}
|
.value=${this.instance?.type}
|
||||||
>
|
>
|
||||||
|
@ -16,6 +16,7 @@ export interface RadioOption<T> {
|
|||||||
description?: TemplateResult;
|
description?: TemplateResult;
|
||||||
default?: boolean;
|
default?: boolean;
|
||||||
value: T;
|
value: T;
|
||||||
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@customElement("ak-radio")
|
@customElement("ak-radio")
|
||||||
@ -77,6 +78,9 @@ export class Radio<T> extends CustomEmitterElement(AKElement) {
|
|||||||
// This is a controlled input. Stop the native event from escaping or affecting the
|
// This is a controlled input. Stop the native event from escaping or affecting the
|
||||||
// value. We'll do that ourselves.
|
// value. We'll do that ourselves.
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
if (option.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.value = option.value;
|
this.value = option.value;
|
||||||
this.dispatchCustomEvent("change", { value: option.value });
|
this.dispatchCustomEvent("change", { value: option.value });
|
||||||
this.dispatchCustomEvent("input", { value: option.value });
|
this.dispatchCustomEvent("input", { value: option.value });
|
||||||
@ -93,6 +97,7 @@ export class Radio<T> extends CustomEmitterElement(AKElement) {
|
|||||||
name="${this.name}"
|
name="${this.name}"
|
||||||
id=${elId}
|
id=${elId}
|
||||||
.checked=${option.value === this.value}
|
.checked=${option.value === this.value}
|
||||||
|
.disabled=${option.disabled}
|
||||||
/>
|
/>
|
||||||
<label class="pf-c-radio__label" for=${elId}>${option.label}</label>
|
<label class="pf-c-radio__label" for=${elId}>${option.label}</label>
|
||||||
${option.description
|
${option.description
|
||||||
|
Reference in New Issue
Block a user