tenants: add tenant-level attributes, applied to users based on request

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-04-06 10:41:35 +02:00
parent fcd9c58a73
commit 5861d41ad3
12 changed files with 85 additions and 23 deletions

View File

@ -1,4 +1,5 @@
import { t } from "@lingui/macro";
import YAML from "yaml";
import { TemplateResult, html } from "lit";
import { customElement } from "lit/decorators.js";
@ -341,6 +342,16 @@ export class TenantForm extends ModelForm<Tenant, string> {
${t`Format: "weeks=3;days=2;hours=3,seconds=2".`}
</p>
</ak-form-element-horizontal>
<ak-form-element-horizontal label=${t`Attributes`} name="attributes">
<ak-codemirror
mode="yaml"
value="${YAML.stringify(first(this.instance?.attributes, {}))}"
>
</ak-codemirror>
<p class="pf-c-form__helper-text">
${t`Set custom attributes using YAML or JSON. Any attributes set here will be inherited by users, if the request is handled by this tenant.`}
</p>
</ak-form-element-horizontal>
<ak-form-element-horizontal label=${t`Web Certificate`} name="webCertificate">
<select class="pf-c-form-control">
<option