diff --git a/plugins/catalog-backend-module-ldap/config.d.ts b/plugins/catalog-backend-module-ldap/config.d.ts index 5474108700..f9b49eabee 100644 --- a/plugins/catalog-backend-module-ldap/config.d.ts +++ b/plugins/catalog-backend-module-ldap/config.d.ts @@ -93,17 +93,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the memberOf attribute on the users to power the relations of users and groups - * - * @default false - */ - skipMemberOf?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -152,7 +141,7 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.memberOf field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; }; } | Array<{ @@ -184,17 +173,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the memberOf attribute on the users to power the relations of users and groups - * - * @default false - */ - skipMemberOf?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -243,7 +221,7 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.memberOf field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; }; }>; @@ -280,17 +258,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the member attributes on the groups to power the relations of users and groups - * - * @default false - */ - skipMembers?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -344,12 +311,12 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.parent field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; /** * The name of the attribute that shall be used for the values of * the spec.children field of the entity. Defaults to "member". */ - members?: string; + members?: string | null; }; } | Array<{ @@ -381,17 +348,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the member attributes on the groups to power the relations of users and groups - * - * @default false - */ - skipMembers?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -445,12 +401,12 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.parent field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; /** * The name of the attribute that shall be used for the values of * the spec.children field of the entity. Defaults to "member". */ - members?: string; + members?: string | null; }; }>; /** @@ -552,17 +508,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the memberOf attribute on the users to power the relations of users and groups - * - * @default false - */ - skipMemberOf?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -611,7 +556,7 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.memberOf field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; }; } | Array<{ @@ -643,17 +588,7 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the memberOf attribute on the users to power the relations of users and groups - * - * @default false - */ - skipMemberOf?: boolean; - }; + /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -702,7 +637,7 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.memberOf field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; }; }>; @@ -739,17 +674,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the member attributes on the groups to power the relations of users and groups - * - * @default false - */ - skipMembers?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -803,12 +727,12 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.parent field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; /** * The name of the attribute that shall be used for the values of * the spec.children field of the entity. Defaults to "member". */ - members?: string; + members?: string | null; }; } | Array<{ @@ -840,17 +764,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the member attributes on the groups to power the relations of users and groups - * - * @default false - */ - skipMembers?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -904,12 +817,12 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.parent field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; /** * The name of the attribute that shall be used for the values of * the spec.children field of the entity. Defaults to "member". */ - members?: string; + members?: string | null; }; }>; @@ -1009,17 +922,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the memberOf attribute on the users to power the relations of users and groups - * - * @default false - */ - skipMemberOf?: boolean; - }; /** * JSON paths (on a.b.c form) and hard coded values to set on those * paths. @@ -1067,7 +969,7 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.memberOf field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; }; }; @@ -1103,17 +1005,6 @@ export interface Config { pagePause?: boolean; }; }; - /** - * Additional parsing config - */ - parsing?: { - /** - * Whether to skip the member attributes on the groups to power the relations of users and groups - * - * @default false - */ - skipMembers?: boolean; - }; /** * @default false * JSON paths (on a.b.c form) and hard coded values to set on those @@ -1168,12 +1059,12 @@ export interface Config { * The name of the attribute that shall be used for the values of * the spec.parent field of the entity. Defaults to "memberOf". */ - memberOf?: string; + memberOf?: string | null; /** * The name of the attribute that shall be used for the values of * the spec.children field of the entity. Defaults to "member". */ - members?: string; + members?: string | null; }; }; /** diff --git a/plugins/catalog-backend-module-ldap/src/ldap/config.ts b/plugins/catalog-backend-module-ldap/src/ldap/config.ts index 87951a9801..95e45f3d5f 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/config.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/config.ts @@ -120,7 +120,7 @@ export type UserConfig = { picture?: string; // The name of the attribute that shall be used for the values of the // spec.memberOf field of the entity. Defaults to "memberOf". - memberOf: string; + memberOf: string | null; }; }; @@ -168,10 +168,10 @@ export type GroupConfig = { picture?: string; // The name of the attribute that shall be used for the values of the // spec.parent field of the entity. Defaults to "memberOf". - memberOf: string; + memberOf: string | null; // The name of the attribute that shall be used for the values of the // spec.children field of the entity. Defaults to "member". - members: string; + members: string | null; }; }; diff --git a/plugins/catalog-backend-module-ldap/src/ldap/read.test.ts b/plugins/catalog-backend-module-ldap/src/ldap/read.test.ts index f1070ad1f0..374cc2afd0 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/read.test.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/read.test.ts @@ -235,9 +235,7 @@ describe('readLdapUsers', () => { { dn: 'ddd', options: {}, - parsing: { - skipMemberOf: true, - }, + map: { rdn: 'uid', name: 'uid', @@ -245,7 +243,7 @@ describe('readLdapUsers', () => { displayName: 'cn', email: 'mail', picture: 'avatarUrl', - memberOf: 'memberOf', + memberOf: null, }, }, ]; @@ -799,9 +797,6 @@ describe('readLdapGroups', () => { { dn: 'ddd', options: {}, - parsing: { - skipMembers: true, - }, map: { rdn: 'cn', name: 'cn', @@ -811,7 +806,7 @@ describe('readLdapGroups', () => { picture: 'avatarUrl', type: 'tt', memberOf: 'memberOf', - members: 'member', + members: null, }, }, ];