@ -387,11 +387,11 @@
|
||||
],
|
||||
"prettier": "@goauthentik/prettier-config",
|
||||
"overrides": {
|
||||
"rapidoc": {
|
||||
"@apitools/openapi-parser@": "0.0.37"
|
||||
},
|
||||
"chromedriver": {
|
||||
"axios": "^1.8.4"
|
||||
},
|
||||
"rapidoc": {
|
||||
"@apitools/openapi-parser@": "0.0.37"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,11 +33,10 @@ export class WorkersStatusCard extends AdminStatusCard<Worker[]> {
|
||||
icon: "fa fa-times-circle pf-m-danger",
|
||||
message: html`${msg("Worker with incorrect version connected.")}`,
|
||||
});
|
||||
} else {
|
||||
return Promise.resolve<AdminStatus>({
|
||||
icon: "fa fa-check-circle pf-m-success",
|
||||
});
|
||||
}
|
||||
return Promise.resolve<AdminStatus>({
|
||||
icon: "fa fa-check-circle pf-m-success",
|
||||
});
|
||||
}
|
||||
|
||||
renderValue() {
|
||||
|
||||
@ -30,9 +30,8 @@ export class ApplicationEntitlementForm extends ModelForm<ApplicationEntitlement
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance?.pbmUuid) {
|
||||
return msg("Successfully updated entitlement.");
|
||||
} else {
|
||||
return msg("Successfully created entitlement.");
|
||||
}
|
||||
return msg("Successfully created entitlement.");
|
||||
}
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
@ -48,11 +47,10 @@ export class ApplicationEntitlementForm extends ModelForm<ApplicationEntitlement
|
||||
pbmUuid: this.instance.pbmUuid || "",
|
||||
applicationEntitlementRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new CoreApi(DEFAULT_CONFIG).coreApplicationEntitlementsCreate({
|
||||
applicationEntitlementRequest: data,
|
||||
});
|
||||
}
|
||||
return new CoreApi(DEFAULT_CONFIG).coreApplicationEntitlementsCreate({
|
||||
applicationEntitlementRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -58,11 +58,10 @@ export class BlueprintForm extends ModelForm<BlueprintInstance, string> {
|
||||
instanceUuid: this.instance.pk,
|
||||
blueprintInstanceRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ManagedApi(DEFAULT_CONFIG).managedBlueprintsCreate({
|
||||
blueprintInstanceRequest: data,
|
||||
});
|
||||
}
|
||||
return new ManagedApi(DEFAULT_CONFIG).managedBlueprintsCreate({
|
||||
blueprintInstanceRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -42,11 +42,10 @@ export class BrandForm extends ModelForm<Brand, string> {
|
||||
brandUuid: this.instance.brandUuid,
|
||||
brandRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new CoreApi(DEFAULT_CONFIG).coreBrandsCreate({
|
||||
brandRequest: data,
|
||||
});
|
||||
}
|
||||
return new CoreApi(DEFAULT_CONFIG).coreBrandsCreate({
|
||||
brandRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -30,11 +30,10 @@ export class CertificateKeyPairForm extends ModelForm<CertificateKeyPair, string
|
||||
kpUuid: this.instance.pk || "",
|
||||
patchedCertificateKeyPairRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsCreate({
|
||||
certificateKeyPairRequest: data as unknown as CertificateKeyPairRequest,
|
||||
});
|
||||
}
|
||||
return new CryptoApi(DEFAULT_CONFIG).cryptoCertificatekeypairsCreate({
|
||||
certificateKeyPairRequest: data as unknown as CertificateKeyPairRequest,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -51,11 +51,10 @@ export class RuleForm extends ModelForm<NotificationRule, string> {
|
||||
pbmUuid: this.instance.pk || "",
|
||||
notificationRuleRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new EventsApi(DEFAULT_CONFIG).eventsRulesCreate({
|
||||
notificationRuleRequest: data,
|
||||
});
|
||||
}
|
||||
return new EventsApi(DEFAULT_CONFIG).eventsRulesCreate({
|
||||
notificationRuleRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -46,11 +46,10 @@ export class TransportForm extends ModelForm<NotificationTransport, string> {
|
||||
uuid: this.instance.pk || "",
|
||||
notificationTransportRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new EventsApi(DEFAULT_CONFIG).eventsTransportsCreate({
|
||||
notificationTransportRequest: data,
|
||||
});
|
||||
}
|
||||
return new EventsApi(DEFAULT_CONFIG).eventsTransportsCreate({
|
||||
notificationTransportRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
onModeChange(mode: string | undefined): void {
|
||||
|
||||
@ -39,9 +39,8 @@ export class StageBindingForm extends ModelForm<FlowStageBinding, string> {
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance?.pk) {
|
||||
return msg("Successfully updated binding.");
|
||||
} else {
|
||||
return msg("Successfully created binding.");
|
||||
}
|
||||
return msg("Successfully created binding.");
|
||||
}
|
||||
|
||||
send(data: FlowStageBinding): Promise<unknown> {
|
||||
@ -50,14 +49,13 @@ export class StageBindingForm extends ModelForm<FlowStageBinding, string> {
|
||||
fsbUuid: this.instance.pk,
|
||||
patchedFlowStageBindingRequest: data,
|
||||
});
|
||||
} else {
|
||||
if (this.targetPk) {
|
||||
data.target = this.targetPk;
|
||||
}
|
||||
return new FlowsApi(DEFAULT_CONFIG).flowsBindingsCreate({
|
||||
flowStageBindingRequest: data,
|
||||
});
|
||||
}
|
||||
if (this.targetPk) {
|
||||
data.target = this.targetPk;
|
||||
}
|
||||
return new FlowsApi(DEFAULT_CONFIG).flowsBindingsCreate({
|
||||
flowStageBindingRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
async getOrder(): Promise<number> {
|
||||
|
||||
@ -54,12 +54,11 @@ export class GroupForm extends ModelForm<Group, string> {
|
||||
groupUuid: this.instance.pk,
|
||||
patchedGroupRequest: data,
|
||||
});
|
||||
} else {
|
||||
data.users = [];
|
||||
return new CoreApi(DEFAULT_CONFIG).coreGroupsCreate({
|
||||
groupRequest: data,
|
||||
});
|
||||
}
|
||||
data.users = [];
|
||||
return new CoreApi(DEFAULT_CONFIG).coreGroupsCreate({
|
||||
groupRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -129,11 +129,10 @@ export class OutpostForm extends ModelForm<Outpost, string> {
|
||||
uuid: this.instance.pk || "",
|
||||
outpostRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsInstancesCreate({
|
||||
outpostRequest: data,
|
||||
});
|
||||
}
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsInstancesCreate({
|
||||
outpostRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -31,11 +31,10 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
|
||||
uuid: this.instance.pk || "",
|
||||
dockerServiceConnectionRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsDockerCreate({
|
||||
dockerServiceConnectionRequest: data,
|
||||
});
|
||||
}
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsDockerCreate({
|
||||
dockerServiceConnectionRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -35,11 +35,10 @@ export class ServiceConnectionKubernetesForm extends ModelForm<
|
||||
uuid: this.instance.pk || "",
|
||||
kubernetesServiceConnectionRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsKubernetesCreate({
|
||||
kubernetesServiceConnectionRequest: data,
|
||||
});
|
||||
}
|
||||
return new OutpostsApi(DEFAULT_CONFIG).outpostsServiceConnectionsKubernetesCreate({
|
||||
kubernetesServiceConnectionRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -72,9 +72,8 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
|
||||
return msg(str`Group ${item.groupObj?.name}`);
|
||||
} else if (item.user) {
|
||||
return msg(str`User ${item.userObj?.name}`);
|
||||
} else {
|
||||
return msg("-");
|
||||
}
|
||||
return msg("-");
|
||||
}
|
||||
|
||||
getPolicyUserGroupRow(item: PolicyBinding): TemplateResult {
|
||||
@ -123,9 +122,8 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
|
||||
${msg("Edit User")}
|
||||
</button>
|
||||
</ak-forms-modal>`;
|
||||
} else {
|
||||
return html``;
|
||||
}
|
||||
return html``;
|
||||
}
|
||||
|
||||
renderToolbarSelected(): TemplateResult {
|
||||
|
||||
@ -72,9 +72,8 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance?.pk) {
|
||||
return msg("Successfully updated binding.");
|
||||
} else {
|
||||
return msg("Successfully created binding.");
|
||||
}
|
||||
return msg("Successfully created binding.");
|
||||
}
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
@ -111,11 +110,10 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
|
||||
policyBindingUuid: this.instance.pk,
|
||||
policyBindingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsCreate({
|
||||
policyBindingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsCreate({
|
||||
policyBindingRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
async getOrder(): Promise<number> {
|
||||
|
||||
@ -24,11 +24,10 @@ export class DummyPolicyForm extends BasePolicyForm<DummyPolicy> {
|
||||
policyUuid: this.instance.pk || "",
|
||||
dummyPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesDummyCreate({
|
||||
dummyPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesDummyCreate({
|
||||
dummyPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -36,11 +36,10 @@ export class EventMatcherPolicyForm extends BasePolicyForm<EventMatcherPolicy> {
|
||||
policyUuid: this.instance.pk || "",
|
||||
eventMatcherPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesEventMatcherCreate({
|
||||
eventMatcherPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesEventMatcherCreate({
|
||||
eventMatcherPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -24,11 +24,10 @@ export class PasswordExpiryPolicyForm extends BasePolicyForm<PasswordExpiryPolic
|
||||
policyUuid: this.instance.pk || "",
|
||||
passwordExpiryPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesPasswordExpiryCreate({
|
||||
passwordExpiryPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesPasswordExpiryCreate({
|
||||
passwordExpiryPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -27,11 +27,10 @@ export class ExpressionPolicyForm extends BasePolicyForm<ExpressionPolicy> {
|
||||
policyUuid: this.instance.pk || "",
|
||||
expressionPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesExpressionCreate({
|
||||
expressionPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesExpressionCreate({
|
||||
expressionPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -38,11 +38,10 @@ export class GeoIPPolicyForm extends BasePolicyForm<GeoIPPolicy> {
|
||||
policyUuid: this.instance.pk || "",
|
||||
geoIPPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesGeoipCreate({
|
||||
geoIPPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesGeoipCreate({
|
||||
geoIPPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -37,11 +37,10 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
||||
policyUuid: this.instance.pk || "",
|
||||
passwordPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesPasswordCreate({
|
||||
passwordPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesPasswordCreate({
|
||||
passwordPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderStaticRules(): TemplateResult {
|
||||
|
||||
@ -24,11 +24,10 @@ export class ReputationPolicyForm extends BasePolicyForm<ReputationPolicy> {
|
||||
policyUuid: this.instance.pk || "",
|
||||
reputationPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesReputationCreate({
|
||||
reputationPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesReputationCreate({
|
||||
reputationPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -24,11 +24,10 @@ export class UniquePasswordPolicyForm extends BasePolicyForm<UniquePasswordPolic
|
||||
policyUuid: this.instance.pk || "",
|
||||
uniquePasswordPolicyRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesUniquePasswordCreate({
|
||||
uniquePasswordPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesUniquePasswordCreate({
|
||||
uniquePasswordPolicyRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -21,11 +21,10 @@ export class PropertyMappingNotification extends BasePropertyMappingForm<Notific
|
||||
pmUuid: this.instance.pk,
|
||||
notificationWebhookMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsNotificationCreate({
|
||||
notificationWebhookMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsNotificationCreate({
|
||||
notificationWebhookMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,13 +25,12 @@ export class PropertyMappingProviderGoogleWorkspaceForm extends BasePropertyMapp
|
||||
pmUuid: this.instance.pk,
|
||||
googleWorkspaceProviderMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(
|
||||
DEFAULT_CONFIG,
|
||||
).propertymappingsProviderGoogleWorkspaceCreate({
|
||||
googleWorkspaceProviderMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(
|
||||
DEFAULT_CONFIG,
|
||||
).propertymappingsProviderGoogleWorkspaceCreate({
|
||||
googleWorkspaceProviderMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,13 +25,12 @@ export class PropertyMappingProviderMicrosoftEntraForm extends BasePropertyMappi
|
||||
pmUuid: this.instance.pk,
|
||||
microsoftEntraProviderMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(
|
||||
DEFAULT_CONFIG,
|
||||
).propertymappingsProviderMicrosoftEntraCreate({
|
||||
microsoftEntraProviderMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderMicrosoftEntraCreate(
|
||||
{
|
||||
microsoftEntraProviderMappingRequest: data,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -46,11 +46,10 @@ export class PropertyMappingProviderRACForm extends BasePropertyMappingForm<RACP
|
||||
pmUuid: this.instance.pk,
|
||||
rACPropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderRacCreate({
|
||||
rACPropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderRacCreate({
|
||||
rACPropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -21,11 +21,10 @@ export class PropertyMappingProviderRadiusForm extends BasePropertyMappingForm<R
|
||||
pmUuid: this.instance.pk,
|
||||
radiusProviderPropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderRadiusCreate({
|
||||
radiusProviderPropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderRadiusCreate({
|
||||
radiusProviderPropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,11 +24,10 @@ export class PropertyMappingProviderSAMLForm extends BasePropertyMappingForm<SAM
|
||||
pmUuid: this.instance.pk,
|
||||
sAMLPropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderSamlCreate({
|
||||
sAMLPropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderSamlCreate({
|
||||
sAMLPropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderExtraFields(): TemplateResult {
|
||||
|
||||
@ -21,11 +21,10 @@ export class PropertyMappingProviderSCIMForm extends BasePropertyMappingForm<SCI
|
||||
pmUuid: this.instance.pk,
|
||||
sCIMMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderScimCreate({
|
||||
sCIMMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderScimCreate({
|
||||
sCIMMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,11 +24,10 @@ export class PropertyMappingProviderScopeForm extends BasePropertyMappingForm<Sc
|
||||
pmUuid: this.instance.pk,
|
||||
scopeMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderScopeCreate({
|
||||
scopeMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsProviderScopeCreate({
|
||||
scopeMappingRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderExtraFields(): TemplateResult {
|
||||
|
||||
@ -25,11 +25,10 @@ export class PropertyMappingSourceKerberosForm extends BasePropertyMappingForm<K
|
||||
pmUuid: this.instance.pk,
|
||||
kerberosSourcePropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceKerberosCreate({
|
||||
kerberosSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceKerberosCreate({
|
||||
kerberosSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,11 +25,10 @@ export class PropertyMappingSourceLDAPForm extends BasePropertyMappingForm<LDAPS
|
||||
pmUuid: this.instance.pk,
|
||||
lDAPSourcePropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceLdapCreate({
|
||||
lDAPSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceLdapCreate({
|
||||
lDAPSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,11 +25,10 @@ export class PropertyMappingSourceOAuthForm extends BasePropertyMappingForm<OAut
|
||||
pmUuid: this.instance.pk,
|
||||
oAuthSourcePropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceOauthCreate({
|
||||
oAuthSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceOauthCreate({
|
||||
oAuthSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,11 +25,10 @@ export class PropertyMappingSourcePlexForm extends BasePropertyMappingForm<PlexS
|
||||
pmUuid: this.instance.pk,
|
||||
plexSourcePropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourcePlexCreate({
|
||||
plexSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourcePlexCreate({
|
||||
plexSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,11 +25,10 @@ export class PropertyMappingSourceSAMLForm extends BasePropertyMappingForm<SAMLS
|
||||
pmUuid: this.instance.pk,
|
||||
sAMLSourcePropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceSamlCreate({
|
||||
sAMLSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceSamlCreate({
|
||||
sAMLSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,11 +25,10 @@ export class PropertyMappingSourceSCIMForm extends BasePropertyMappingForm<SCIMS
|
||||
pmUuid: this.instance.pk,
|
||||
sCIMSourcePropertyMappingRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceScimCreate({
|
||||
sCIMSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceScimCreate({
|
||||
sCIMSourcePropertyMappingRequest: data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -41,11 +41,10 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
|
||||
id: this.instance.pk,
|
||||
googleWorkspaceProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersGoogleWorkspaceCreate({
|
||||
googleWorkspaceProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersGoogleWorkspaceCreate({
|
||||
googleWorkspaceProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -24,11 +24,10 @@ export class LDAPProviderFormPage extends WithBrandConfig(BaseProviderForm<LDAPP
|
||||
id: this.instance.pk,
|
||||
lDAPProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersLdapCreate({
|
||||
lDAPProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersLdapCreate({
|
||||
lDAPProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm() {
|
||||
|
||||
@ -39,11 +39,10 @@ export class MicrosoftEntraProviderFormPage extends BaseProviderForm<MicrosoftEn
|
||||
id: this.instance.pk,
|
||||
microsoftEntraProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersMicrosoftEntraCreate({
|
||||
microsoftEntraProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersMicrosoftEntraCreate({
|
||||
microsoftEntraProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -82,11 +82,10 @@ export class OAuth2ProviderFormPage extends BaseProviderForm<OAuth2Provider> {
|
||||
id: this.instance.pk,
|
||||
oAuth2ProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersOauth2Create({
|
||||
oAuth2ProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersOauth2Create({
|
||||
oAuth2ProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm() {
|
||||
|
||||
@ -45,11 +45,10 @@ export class ProxyProviderFormPage extends BaseProviderForm<ProxyProvider> {
|
||||
id: this.instance.pk,
|
||||
proxyProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersProxyCreate({
|
||||
proxyProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersProxyCreate({
|
||||
proxyProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm() {
|
||||
|
||||
@ -45,11 +45,10 @@ export class EndpointForm extends ModelForm<Endpoint, string> {
|
||||
pbmUuid: this.instance.pk || "",
|
||||
patchedEndpointRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new RacApi(DEFAULT_CONFIG).racEndpointsCreate({
|
||||
endpointRequest: data,
|
||||
});
|
||||
}
|
||||
return new RacApi(DEFAULT_CONFIG).racEndpointsCreate({
|
||||
endpointRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -31,9 +31,8 @@ export class RACProviderFormPage extends ModelForm<RACProvider, number> {
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance) {
|
||||
return msg("Successfully updated provider.");
|
||||
} else {
|
||||
return msg("Successfully created provider.");
|
||||
}
|
||||
return msg("Successfully created provider.");
|
||||
}
|
||||
|
||||
async send(data: RACProvider): Promise<RACProvider> {
|
||||
@ -42,11 +41,10 @@ export class RACProviderFormPage extends ModelForm<RACProvider, number> {
|
||||
id: this.instance.pk,
|
||||
rACProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersRacCreate({
|
||||
rACProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersRacCreate({
|
||||
rACProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -22,11 +22,10 @@ export class RadiusProviderFormPage extends WithBrandConfig(BaseProviderForm<Rad
|
||||
id: this.instance.pk,
|
||||
radiusProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersRadiusCreate({
|
||||
radiusProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersRadiusCreate({
|
||||
radiusProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm() {
|
||||
|
||||
@ -27,11 +27,10 @@ export class SAMLProviderFormPage extends BaseProviderForm<SAMLProvider> {
|
||||
id: this.instance.pk,
|
||||
sAMLProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersSamlCreate({
|
||||
sAMLProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersSamlCreate({
|
||||
sAMLProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm() {
|
||||
|
||||
@ -21,11 +21,10 @@ export class SCIMProviderFormPage extends BaseProviderForm<SCIMProvider> {
|
||||
id: this.instance.pk,
|
||||
sCIMProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersScimCreate({
|
||||
sCIMProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersScimCreate({
|
||||
sCIMProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm() {
|
||||
|
||||
@ -42,11 +42,10 @@ export class SSFProviderFormPage extends BaseProviderForm<SSFProvider> {
|
||||
id: this.instance.pk,
|
||||
sSFProviderRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersSsfCreate({
|
||||
sSFProviderRequest: data,
|
||||
});
|
||||
}
|
||||
return new ProvidersApi(DEFAULT_CONFIG).providersSsfCreate({
|
||||
sSFProviderRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -46,11 +46,10 @@ export class InitialPermissionsForm extends ModelForm<InitialPermissions, string
|
||||
id: this.instance.pk,
|
||||
patchedInitialPermissionsRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new RbacApi(DEFAULT_CONFIG).rbacInitialPermissionsCreate({
|
||||
initialPermissionsRequest: data,
|
||||
});
|
||||
}
|
||||
return new RbacApi(DEFAULT_CONFIG).rbacInitialPermissionsCreate({
|
||||
initialPermissionsRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -32,11 +32,10 @@ export class RoleForm extends ModelForm<Role, string> {
|
||||
uuid: this.instance.pk,
|
||||
patchedRoleRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new RbacApi(DEFAULT_CONFIG).rbacRolesCreate({
|
||||
roleRequest: data,
|
||||
});
|
||||
}
|
||||
return new RbacApi(DEFAULT_CONFIG).rbacRolesCreate({
|
||||
roleRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -32,11 +32,10 @@ export class SCIMSourceForm extends BaseSourceForm<SCIMSource> {
|
||||
slug: this.instance.slug,
|
||||
patchedSCIMSourceRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new SourcesApi(DEFAULT_CONFIG).sourcesScimCreate({
|
||||
sCIMSourceRequest: data as unknown as SCIMSourceRequest,
|
||||
});
|
||||
}
|
||||
return new SourcesApi(DEFAULT_CONFIG).sourcesScimCreate({
|
||||
sCIMSourceRequest: data as unknown as SCIMSourceRequest,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -33,11 +33,10 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
|
||||
stageUuid: this.instance.pk || "",
|
||||
patchedAuthenticatorDuoStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorDuoCreate({
|
||||
authenticatorDuoStageRequest: data as unknown as AuthenticatorDuoStageRequest,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorDuoCreate({
|
||||
authenticatorDuoStageRequest: data as unknown as AuthenticatorDuoStageRequest,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -39,11 +39,10 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
||||
stageUuid: this.instance.pk || "",
|
||||
authenticatorEmailStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorEmailCreate({
|
||||
authenticatorEmailStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorEmailCreate({
|
||||
authenticatorEmailStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderConnectionSettings(): TemplateResult {
|
||||
|
||||
@ -27,11 +27,10 @@ export class AuthenticatorEndpointGDTCStageForm extends BaseStageForm<Authentica
|
||||
stageUuid: this.instance.pk || "",
|
||||
patchedAuthenticatorEndpointGDTCStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorEndpointGdtcCreate({
|
||||
authenticatorEndpointGDTCStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorEndpointGdtcCreate({
|
||||
authenticatorEndpointGDTCStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
static get styles() {
|
||||
|
||||
@ -50,11 +50,10 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
||||
stageUuid: this.instance.pk || "",
|
||||
authenticatorSMSStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorSmsCreate({
|
||||
authenticatorSMSStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorSmsCreate({
|
||||
authenticatorSMSStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderProviderTwillio(): TemplateResult {
|
||||
|
||||
@ -31,11 +31,10 @@ export class AuthenticatorStaticStageForm extends BaseStageForm<AuthenticatorSta
|
||||
stageUuid: this.instance.pk || "",
|
||||
authenticatorStaticStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorStaticCreate({
|
||||
authenticatorStaticStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorStaticCreate({
|
||||
authenticatorStaticStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -33,11 +33,10 @@ export class AuthenticatorTOTPStageForm extends BaseStageForm<AuthenticatorTOTPS
|
||||
stageUuid: this.instance.pk || "",
|
||||
authenticatorTOTPStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorTotpCreate({
|
||||
authenticatorTOTPStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorTotpCreate({
|
||||
authenticatorTOTPStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -57,11 +57,10 @@ export class AuthenticatorValidateStageForm extends BaseStageForm<AuthenticatorV
|
||||
stageUuid: this.instance.pk || "",
|
||||
authenticatorValidateStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorValidateCreate({
|
||||
authenticatorValidateStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorValidateCreate({
|
||||
authenticatorValidateStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
isDeviceClassSelected(field: DeviceClassesEnum): boolean {
|
||||
|
||||
@ -41,11 +41,10 @@ export class AuthenticatorWebAuthnStageForm extends BaseStageForm<AuthenticatorW
|
||||
stageUuid: this.instance.pk || "",
|
||||
authenticatorWebAuthnStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorWebauthnCreate({
|
||||
authenticatorWebAuthnStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesAuthenticatorWebauthnCreate({
|
||||
authenticatorWebAuthnStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -26,11 +26,10 @@ export class CaptchaStageForm extends BaseStageForm<CaptchaStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
patchedCaptchaStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesCaptchaCreate({
|
||||
captchaStageRequest: data as unknown as CaptchaStageRequest,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesCaptchaCreate({
|
||||
captchaStageRequest: data as unknown as CaptchaStageRequest,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -33,11 +33,10 @@ export class ConsentStageForm extends BaseStageForm<ConsentStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
consentStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesConsentCreate({
|
||||
consentStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesConsentCreate({
|
||||
consentStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -23,11 +23,10 @@ export class DenyStageForm extends BaseStageForm<DenyStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
denyStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesDenyCreate({
|
||||
denyStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesDenyCreate({
|
||||
denyStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -23,11 +23,10 @@ export class DummyStageForm extends BaseStageForm<DummyStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
dummyStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesDummyCreate({
|
||||
dummyStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesDummyCreate({
|
||||
dummyStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -36,11 +36,10 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
patchedEmailStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesEmailCreate({
|
||||
emailStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesEmailCreate({
|
||||
emailStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderConnectionSettings(): TemplateResult {
|
||||
|
||||
@ -34,11 +34,10 @@ export class InvitationForm extends ModelForm<Invitation, string> {
|
||||
inviteUuid: this.instance.pk || "",
|
||||
invitationRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesInvitationInvitationsCreate({
|
||||
invitationRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesInvitationInvitationsCreate({
|
||||
invitationRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -23,11 +23,10 @@ export class InvitationStageForm extends BaseStageForm<InvitationStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
invitationStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesInvitationStagesCreate({
|
||||
invitationStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesInvitationStagesCreate({
|
||||
invitationStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -34,11 +34,10 @@ export class PasswordStageForm extends BaseStageForm<PasswordStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
passwordStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesPasswordCreate({
|
||||
passwordStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesPasswordCreate({
|
||||
passwordStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
isBackendSelected(field: BackendsEnum): boolean {
|
||||
|
||||
@ -54,11 +54,10 @@ export class PromptForm extends ModelForm<Prompt, string> {
|
||||
promptUuid: this.instance.pk || "",
|
||||
promptRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesPromptPromptsCreate({
|
||||
promptRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesPromptPromptsCreate({
|
||||
promptRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
async loadInstance(pk: string): Promise<Prompt> {
|
||||
|
||||
@ -35,11 +35,10 @@ export class PromptStageForm extends BaseStageForm<PromptStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
promptStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesPromptStagesCreate({
|
||||
promptStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesPromptStagesCreate({
|
||||
promptStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -38,11 +38,10 @@ export class RedirectStageForm extends BaseStageForm<RedirectStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
redirectStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesRedirectCreate({
|
||||
redirectStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesRedirectCreate({
|
||||
redirectStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -31,11 +31,10 @@ export class SourceStageForm extends BaseStageForm<SourceStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
sourceStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesSourceCreate({
|
||||
sourceStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesSourceCreate({
|
||||
sourceStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -23,11 +23,10 @@ export class UserDeleteStageForm extends BaseStageForm<UserDeleteStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
userDeleteStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserDeleteCreate({
|
||||
userDeleteStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserDeleteCreate({
|
||||
userDeleteStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -25,11 +25,10 @@ export class UserLoginStageForm extends BaseStageForm<UserLoginStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
userLoginStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserLoginCreate({
|
||||
userLoginStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserLoginCreate({
|
||||
userLoginStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -23,11 +23,10 @@ export class UserLogoutStageForm extends BaseStageForm<UserLogoutStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
userLogoutStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserLogoutCreate({
|
||||
userLogoutStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserLogoutCreate({
|
||||
userLogoutStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -34,11 +34,10 @@ export class UserWriteStageForm extends BaseStageForm<UserWriteStage> {
|
||||
stageUuid: this.instance.pk || "",
|
||||
userWriteStageRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserWriteCreate({
|
||||
userWriteStageRequest: data,
|
||||
});
|
||||
}
|
||||
return new StagesApi(DEFAULT_CONFIG).stagesUserWriteCreate({
|
||||
userWriteStageRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
@ -37,11 +37,10 @@ export class TokenForm extends ModelForm<Token, string> {
|
||||
identifier: this.instance.identifier,
|
||||
tokenRequest: data,
|
||||
});
|
||||
} else {
|
||||
return new CoreApi(DEFAULT_CONFIG).coreTokensCreate({
|
||||
tokenRequest: data,
|
||||
});
|
||||
}
|
||||
return new CoreApi(DEFAULT_CONFIG).coreTokensCreate({
|
||||
tokenRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderExpiry(): TemplateResult {
|
||||
|
||||
@ -46,12 +46,11 @@ export class UserForm extends ModelForm<User, number> {
|
||||
getSuccessMessage(): string {
|
||||
if (this.instance) {
|
||||
return msg("Successfully updated user.");
|
||||
} else {
|
||||
if (this.group) {
|
||||
return msg(str`Successfully created user and added to group ${this.group.name}`);
|
||||
}
|
||||
return msg("Successfully created user.");
|
||||
}
|
||||
if (this.group) {
|
||||
return msg(str`Successfully created user and added to group ${this.group.name}`);
|
||||
}
|
||||
return msg("Successfully created user.");
|
||||
}
|
||||
|
||||
async send(data: User): Promise<User> {
|
||||
|
||||
@ -173,9 +173,8 @@ export class TreeView extends AKElement {
|
||||
child.parent = item;
|
||||
}
|
||||
return item;
|
||||
} else {
|
||||
return this.createNode(path, parentItem.childItems[idx], level + 1);
|
||||
}
|
||||
return this.createNode(path, parentItem.childItems[idx], level + 1);
|
||||
}
|
||||
|
||||
parse(data: string[]): TreeViewItem {
|
||||
|
||||
@ -34,12 +34,11 @@ export class UserTokenForm extends ModelForm<Token, string> {
|
||||
identifier: this.instance.identifier,
|
||||
tokenRequest: data,
|
||||
});
|
||||
} else {
|
||||
data.intent = this.intent;
|
||||
return new CoreApi(DEFAULT_CONFIG).coreTokensCreate({
|
||||
tokenRequest: data,
|
||||
});
|
||||
}
|
||||
data.intent = this.intent;
|
||||
return new CoreApi(DEFAULT_CONFIG).coreTokensCreate({
|
||||
tokenRequest: data,
|
||||
});
|
||||
}
|
||||
|
||||
renderForm(): TemplateResult {
|
||||
|
||||
Reference in New Issue
Block a user