From 211f94dd5054a6778174adc7bb8ba6c40564d188 Mon Sep 17 00:00:00 2001 From: q16marvin Date: Thu, 15 Jun 2023 15:15:49 +0200 Subject: [PATCH] Update index.js automaticly leave a group when user is not in ldap group anymore --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index d997244..274e8ad 100644 --- a/index.js +++ b/index.js @@ -394,7 +394,9 @@ } return groups.join(groupsToJoin, uid, callback); } else { - callback(); + const groupsToUnJoin = [groupId]; + winston.verbose("[LDAP] unjoins group" + ldapGroup.cn + " uid " + uid); + return groups.leave(groupsToUnJoin, uid, callback); } } );