web: Jens requested that the default subscription state for contexts be , and it's the right call.
This commit is contained in:
parent
f669222529
commit
03fde51313
|
@ -31,7 +31,7 @@ import {
|
||||||
} from "./LDAPOptionsAndHelp";
|
} from "./LDAPOptionsAndHelp";
|
||||||
|
|
||||||
@customElement("ak-application-wizard-authentication-by-ldap")
|
@customElement("ak-application-wizard-authentication-by-ldap")
|
||||||
export class ApplicationWizardApplicationDetails extends WithTenantConfig(BaseProviderPanel, true) {
|
export class ApplicationWizardApplicationDetails extends WithTenantConfig(BaseProviderPanel) {
|
||||||
render() {
|
render() {
|
||||||
const provider = this.wizard.provider as LDAPProvider | undefined;
|
const provider = this.wizard.provider as LDAPProvider | undefined;
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,7 @@ import { FlowsInstancesListDesignationEnum, RadiusProvider } from "@goauthentik/
|
||||||
import BaseProviderPanel from "../BaseProviderPanel";
|
import BaseProviderPanel from "../BaseProviderPanel";
|
||||||
|
|
||||||
@customElement("ak-application-wizard-authentication-by-radius")
|
@customElement("ak-application-wizard-authentication-by-radius")
|
||||||
export class ApplicationWizardAuthenticationByRadius extends WithTenantConfig(
|
export class ApplicationWizardAuthenticationByRadius extends WithTenantConfig(BaseProviderPanel) {
|
||||||
BaseProviderPanel,
|
|
||||||
true,
|
|
||||||
) {
|
|
||||||
render() {
|
render() {
|
||||||
const provider = this.wizard.provider as RadiusProvider | undefined;
|
const provider = this.wizard.provider as RadiusProvider | undefined;
|
||||||
|
|
||||||
|
|
|
@ -111,9 +111,7 @@ export class RelatedUserAdd extends Form<{ users: number[] }> {
|
||||||
|
|
||||||
@customElement("ak-user-related-list")
|
@customElement("ak-user-related-list")
|
||||||
export class RelatedUserList extends WithTenantConfig(
|
export class RelatedUserList extends WithTenantConfig(
|
||||||
WithCapabilitiesConfig(Table<User>, true),
|
WithCapabilitiesConfig(Table<User>)) {
|
||||||
true,
|
|
||||||
) {
|
|
||||||
expandable = true;
|
expandable = true;
|
||||||
checkbox = true;
|
checkbox = true;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import {
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
|
|
||||||
@customElement("ak-provider-ldap-form")
|
@customElement("ak-provider-ldap-form")
|
||||||
export class LDAPProviderFormPage extends WithTenantConfig(ModelForm<LDAPProvider, number>, true) {
|
export class LDAPProviderFormPage extends WithTenantConfig(ModelForm<LDAPProvider, number>) {
|
||||||
async loadInstance(pk: number): Promise<LDAPProvider> {
|
async loadInstance(pk: number): Promise<LDAPProvider> {
|
||||||
return new ProvidersApi(DEFAULT_CONFIG).providersLdapRetrieve({
|
return new ProvidersApi(DEFAULT_CONFIG).providersLdapRetrieve({
|
||||||
id: pk,
|
id: pk,
|
||||||
|
|
|
@ -14,10 +14,7 @@ import { customElement } from "lit/decorators.js";
|
||||||
import { FlowsInstancesListDesignationEnum, ProvidersApi, RadiusProvider } from "@goauthentik/api";
|
import { FlowsInstancesListDesignationEnum, ProvidersApi, RadiusProvider } from "@goauthentik/api";
|
||||||
|
|
||||||
@customElement("ak-provider-radius-form")
|
@customElement("ak-provider-radius-form")
|
||||||
export class RadiusProviderFormPage extends WithTenantConfig(
|
export class RadiusProviderFormPage extends WithTenantConfig(ModelForm<RadiusProvider, number>) {
|
||||||
ModelForm<RadiusProvider, number>,
|
|
||||||
true,
|
|
||||||
) {
|
|
||||||
loadInstance(pk: number): Promise<RadiusProvider> {
|
loadInstance(pk: number): Promise<RadiusProvider> {
|
||||||
return new ProvidersApi(DEFAULT_CONFIG).providersRadiusRetrieve({
|
return new ProvidersApi(DEFAULT_CONFIG).providersRadiusRetrieve({
|
||||||
id: pk,
|
id: pk,
|
||||||
|
@ -89,7 +86,7 @@ export class RadiusProviderFormPage extends WithTenantConfig(
|
||||||
</label>
|
</label>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
${msg(
|
${msg(
|
||||||
"When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon.",
|
"When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon."
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
|
@ -106,7 +103,7 @@ export class RadiusProviderFormPage extends WithTenantConfig(
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${first(
|
||||||
this.instance?.sharedSecret,
|
this.instance?.sharedSecret,
|
||||||
randomString(128, ascii_letters + digits),
|
randomString(128, ascii_letters + digits)
|
||||||
)}"
|
)}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
|
|
|
@ -91,10 +91,7 @@ const recoveryButtonStyles = css`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@customElement("ak-user-list")
|
@customElement("ak-user-list")
|
||||||
export class UserListPage extends WithTenantConfig(
|
export class UserListPage extends WithTenantConfig(WithCapabilitiesConfig(TablePage<User>)) {
|
||||||
WithCapabilitiesConfig(TablePage<User>, true),
|
|
||||||
true,
|
|
||||||
) {
|
|
||||||
expandable = true;
|
expandable = true;
|
||||||
checkbox = true;
|
checkbox = true;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ type Constructor<T = object> = abstract new (...args: any[]) => T;
|
||||||
|
|
||||||
export function WithTenantConfig<T extends Constructor<LitElement>>(
|
export function WithTenantConfig<T extends Constructor<LitElement>>(
|
||||||
superclass: T,
|
superclass: T,
|
||||||
subscribe = false,
|
subscribe = true,
|
||||||
) {
|
) {
|
||||||
abstract class WithTenantProvider extends superclass {
|
abstract class WithTenantProvider extends superclass {
|
||||||
@consume({ context: authentikTenantContext, subscribe })
|
@consume({ context: authentikTenantContext, subscribe })
|
||||||
|
|
|
@ -24,7 +24,7 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
import { EventsApi } from "@goauthentik/api";
|
import { EventsApi } from "@goauthentik/api";
|
||||||
|
|
||||||
@customElement("ak-page-header")
|
@customElement("ak-page-header")
|
||||||
export class PageHeader extends WithTenantConfig(AKElement, true) {
|
export class PageHeader extends WithTenantConfig(AKElement) {
|
||||||
@property()
|
@property()
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const DefaultTenant: CurrentTenant = {
|
||||||
};
|
};
|
||||||
|
|
||||||
@customElement("ak-sidebar-brand")
|
@customElement("ak-sidebar-brand")
|
||||||
export class SidebarBrand extends WithTenantConfig(AKElement, true) {
|
export class SidebarBrand extends WithTenantConfig(AKElement) {
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return [
|
return [
|
||||||
PFBase,
|
PFBase,
|
||||||
|
|
Reference in a new issue