Merge branch 'web/config-provider-2-tenant' into web/config-provider-2a-branded

* web/config-provider-2-tenant:
  web: prettier having opinions after merging with dependent branch
  web: Jens requested that the default subscription state for contexts be , and it's the right call.
  web: Jens requested that subscription be  by default, and it's the right call.
  web: prettier had opinions about the README
This commit is contained in:
Ken Sternberg 2023-12-04 10:52:36 -08:00
commit 8c6f83b88e
7 changed files with 7 additions and 16 deletions

View File

@ -110,9 +110,7 @@ export class RelatedUserAdd extends Form<{ users: number[] }> {
}
@customElement("ak-user-related-list")
export class RelatedUserList extends WithBrandConfig(
WithCapabilitiesConfig(Table<User>, true),
) {
export class RelatedUserList extends WithBrandConfig(WithCapabilitiesConfig(Table<User>)) {
expandable = true;
checkbox = true;

View File

@ -25,7 +25,7 @@ import {
} from "@goauthentik/api";
@customElement("ak-provider-ldap-form")
export class LDAPProviderFormPage extends WithBrandConfig(ModelForm<LDAPProvider, number>, true) {
export class LDAPProviderFormPage extends WithBrandConfig(ModelForm<LDAPProvider, number>) {
async loadInstance(pk: number): Promise<LDAPProvider> {
return new ProvidersApi(DEFAULT_CONFIG).providersLdapRetrieve({
id: pk,

View File

@ -14,10 +14,7 @@ import { customElement } from "lit/decorators.js";
import { FlowsInstancesListDesignationEnum, ProvidersApi, RadiusProvider } from "@goauthentik/api";
@customElement("ak-provider-radius-form")
export class RadiusProviderFormPage extends WithBrandConfig(
ModelForm<RadiusProvider, number>,
true,
) {
export class RadiusProviderFormPage extends WithBrandConfig(ModelForm<RadiusProvider, number>) {
loadInstance(pk: number): Promise<RadiusProvider> {
return new ProvidersApi(DEFAULT_CONFIG).providersRadiusRetrieve({
id: pk,

View File

@ -91,8 +91,7 @@ const recoveryButtonStyles = css`
`;
@customElement("ak-user-list")
export class UserListPage extends WithBrandConfig(
WithCapabilitiesConfig(TablePage<User>, true)) {
export class UserListPage extends WithBrandConfig(WithCapabilitiesConfig(TablePage<User>)) {
expandable = true;
checkbox = true;

View File

@ -10,7 +10,7 @@ type Constructor<T = object> = new (...args: any[]) => T;
export function WithAuthentikConfig<T extends Constructor<LitElement>>(
superclass: T,
subscribe = false,
subscribe = true,
) {
abstract class WithAkConfigProvider extends superclass {
@consume({ context: authentikConfigContext, subscribe })

View File

@ -47,7 +47,7 @@ class WCC {
export function WithCapabilitiesConfig<T extends Constructor<LitElement>>(
superclass: T,
subscribe = false,
subscribe = true,
) {
abstract class CapabilitiesContext extends superclass {
@consume({ context: authentikConfigContext, subscribe })

View File

@ -31,10 +31,7 @@ import {
} from "@goauthentik/api";
@customElement("ak-user-settings-flow-executor")
export class UserSettingsFlowExecutor
extends WithBrandConfig(AKElement)
implements StageHost
{
export class UserSettingsFlowExecutor extends WithBrandConfig(AKElement) implements StageHost {
@property()
flowSlug?: string;