web/admin: show warning when adding user to superuser group (#5091)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-03-27 16:27:34 +02:00
committed by GitHub
parent 5600261852
commit a7fc579202
5 changed files with 31 additions and 7 deletions

View File

@ -32,7 +32,7 @@ export class RelatedGroupAdd extends Form<{ groups: string[] }> {
return t`Successfully added user to group(s).`;
}
send = async (data: { groups: string[] }): Promise<{ groups: string[] }> => {
async send(data: { groups: string[] }): Promise<unknown> {
await Promise.all(
data.groups.map((group) => {
return new CoreApi(DEFAULT_CONFIG).coreGroupsAddUserCreate({
@ -44,7 +44,7 @@ export class RelatedGroupAdd extends Form<{ groups: string[] }> {
}),
);
return data;
};
}
renderForm(): TemplateResult {
return html`<form class="pf-c-form pf-m-horizontal">