outposts: fix type not being configurable

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-26 14:45:14 +02:00
parent 302b047f1a
commit b35d9ae8b0
3 changed files with 10 additions and 2 deletions

View File

@ -24,6 +24,7 @@ class OutpostSerializer(ModelSerializer):
fields = [
"pk",
"name",
"type",
"providers",
"providers_obj",
"service_connection",

View File

@ -15959,6 +15959,12 @@ definitions:
title: Name
type: string
minLength: 1
type:
title: Type
type: string
enum:
- proxy
- ldap
providers:
type: array
items:

View File

@ -1,4 +1,4 @@
import { Outpost, OutpostsApi, ProvidersApi } from "authentik-api";
import { Outpost, OutpostsApi, OutpostTypeEnum, ProvidersApi } from "authentik-api";
import { t } from "@lingui/macro";
import { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html";
@ -50,7 +50,8 @@ export class OutpostForm extends Form<Outpost> {
?required=${true}
name="type">
<select class="pf-c-form-control">
<option value="proxy" ?selected=${true}>${t`Proxy`}</option>s
<option value=${OutpostTypeEnum.Proxy} ?selected=${this.outpost?.type === OutpostTypeEnum.Proxy}>${t`Proxy`}</option>
<option value=${OutpostTypeEnum.Ldap} ?selected=${this.outpost?.type === OutpostTypeEnum.Ldap}>${t`LDAP`}</option>
</select>
</ak-form-element-horizontal>
<ak-form-element-horizontal