sources/ldap: rename ldappropertymapping to ldapsourcepropertymapping (#10606)

This commit is contained in:
Marc 'risson' Schmitt
2024-07-25 16:09:36 +02:00
committed by GitHub
parent 76fcdabae4
commit ced4533890
17 changed files with 673 additions and 570 deletions

View File

@ -10,25 +10,25 @@ import { TemplateResult, html } from "lit";
import { customElement } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { LDAPPropertyMapping, PropertymappingsApi } from "@goauthentik/api";
import { LDAPSourcePropertyMapping, PropertymappingsApi } from "@goauthentik/api";
@customElement("ak-property-mapping-ldap-form")
export class PropertyMappingLDAPForm extends BasePropertyMappingForm<LDAPPropertyMapping> {
loadInstance(pk: string): Promise<LDAPPropertyMapping> {
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsLdapRetrieve({
@customElement("ak-property-mapping-ldap-source-form")
export class PropertyMappingLDAPSourceForm extends BasePropertyMappingForm<LDAPSourcePropertyMapping> {
loadInstance(pk: string): Promise<LDAPSourcePropertyMapping> {
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceLdapRetrieve({
pmUuid: pk,
});
}
async send(data: LDAPPropertyMapping): Promise<LDAPPropertyMapping> {
async send(data: LDAPSourcePropertyMapping): Promise<LDAPSourcePropertyMapping> {
if (this.instance) {
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsLdapUpdate({
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceLdapUpdate({
pmUuid: this.instance.pk,
lDAPPropertyMappingRequest: data,
lDAPSourcePropertyMappingRequest: data,
});
} else {
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsLdapCreate({
lDAPPropertyMappingRequest: data,
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsSourceLdapCreate({
lDAPSourcePropertyMappingRequest: data,
});
}
}
@ -68,6 +68,6 @@ export class PropertyMappingLDAPForm extends BasePropertyMappingForm<LDAPPropert
declare global {
interface HTMLElementTagNameMap {
"ak-property-mapping-ldap-form": PropertyMappingLDAPForm;
"ak-property-mapping-ldap-source-form": PropertyMappingLDAPSourceForm;
}
}

View File

@ -1,5 +1,5 @@
import "@goauthentik/admin/property-mappings/PropertyMappingGoogleWorkspaceForm";
import "@goauthentik/admin/property-mappings/PropertyMappingLDAPForm";
import "@goauthentik/admin/property-mappings/PropertyMappingLDAPSourceForm";
import "@goauthentik/admin/property-mappings/PropertyMappingMicrosoftEntraForm";
import "@goauthentik/admin/property-mappings/PropertyMappingNotification";
import "@goauthentik/admin/property-mappings/PropertyMappingRACForm";

View File

@ -33,7 +33,7 @@ export const staticSettingOptions: RadioOption<string | undefined>[] = [
];
@customElement("ak-property-mapping-rac-form")
export class PropertyMappingLDAPForm extends ModelForm<RACPropertyMapping, string> {
export class PropertyMappingRACForm extends ModelForm<RACPropertyMapping, string> {
loadInstance(pk: string): Promise<RACPropertyMapping> {
return new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsRacRetrieve({
pmUuid: pk,
@ -177,6 +177,6 @@ export class PropertyMappingLDAPForm extends ModelForm<RACPropertyMapping, strin
declare global {
interface HTMLElementTagNameMap {
"ak-property-mapping-rac-form": PropertyMappingLDAPForm;
"ak-property-mapping-rac-form": PropertyMappingRACForm;
}
}

View File

@ -1,4 +1,4 @@
import "@goauthentik/admin/property-mappings/PropertyMappingLDAPForm";
import "@goauthentik/admin/property-mappings/PropertyMappingLDAPSourceForm";
import "@goauthentik/admin/property-mappings/PropertyMappingNotification";
import "@goauthentik/admin/property-mappings/PropertyMappingRACForm";
import "@goauthentik/admin/property-mappings/PropertyMappingSAMLForm";