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 = [ fields = [
"pk", "pk",
"name", "name",
"type",
"providers", "providers",
"providers_obj", "providers_obj",
"service_connection", "service_connection",

View File

@ -15959,6 +15959,12 @@ definitions:
title: Name title: Name
type: string type: string
minLength: 1 minLength: 1
type:
title: Type
type: string
enum:
- proxy
- ldap
providers: providers:
type: array type: array
items: 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 { t } from "@lingui/macro";
import { customElement, property } from "lit-element"; import { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html"; import { html, TemplateResult } from "lit-html";
@ -50,7 +50,8 @@ export class OutpostForm extends Form<Outpost> {
?required=${true} ?required=${true}
name="type"> name="type">
<select class="pf-c-form-control"> <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> </select>
</ak-form-element-horizontal> </ak-form-element-horizontal>
<ak-form-element-horizontal <ak-form-element-horizontal