diff --git a/packages/cli/src/InternalHooks.ts b/packages/cli/src/InternalHooks.ts index de41f61fe..12bfe6beb 100644 --- a/packages/cli/src/InternalHooks.ts +++ b/packages/cli/src/InternalHooks.ts @@ -963,14 +963,6 @@ export class InternalHooks implements IInternalHooksClass { return this.telemetry.track('Ldap general sync finished', data); } - async onLdapUsersDisabled(data: { - reason: 'ldap_update' | 'ldap_feature_deactivated'; - users: number; - user_ids: string[]; - }): Promise { - return this.telemetry.track('Ldap users disabled', data); - } - async onUserUpdatedLdapSettings(data: { user_id: string; loginIdAttribute: string; diff --git a/packages/cli/src/Ldap/LdapSync.ee.ts b/packages/cli/src/Ldap/LdapSync.ee.ts index 5b8d552f0..0b22983e3 100644 --- a/packages/cli/src/Ldap/LdapSync.ee.ts +++ b/packages/cli/src/Ldap/LdapSync.ee.ts @@ -104,14 +104,6 @@ export class LdapSync { role, ); - if (usersToDisable.length) { - void Container.get(InternalHooks).onLdapUsersDisabled({ - reason: 'ldap_update', - users: usersToDisable.length, - user_ids: usersToDisable, - }); - } - Logger.debug('LDAP - Users processed', { created: usersToCreate.length, updated: usersToUpdate.length, diff --git a/packages/cli/src/Ldap/helpers.ts b/packages/cli/src/Ldap/helpers.ts index 0fd943042..2ddbca37f 100644 --- a/packages/cli/src/Ldap/helpers.ts +++ b/packages/cli/src/Ldap/helpers.ts @@ -180,11 +180,6 @@ export const updateLdapConfig = async (ldapConfig: LdapConfig): Promise => const ldapUsers = await getLdapUsers(); if (ldapUsers.length) { await deleteAllLdapIdentities(); - void Container.get(InternalHooks).onLdapUsersDisabled({ - reason: 'ldap_update', - users: ldapUsers.length, - user_ids: ldapUsers.map((user) => user.id), - }); } } @@ -200,17 +195,7 @@ export const updateLdapConfig = async (ldapConfig: LdapConfig): Promise => * If it's the first run of this feature, all the default data is created in the database */ export const handleLdapInit = async (): Promise => { - if (!isLdapEnabled()) { - const ldapUsers = await getLdapUsers(); - if (ldapUsers.length) { - void Container.get(InternalHooks).onLdapUsersDisabled({ - reason: 'ldap_feature_deactivated', - users: ldapUsers.length, - user_ids: ldapUsers.map((user) => user.id), - }); - } - return; - } + if (!isLdapEnabled()) return; const ldapConfig = await getLdapConfig();