test(samba): refs #5770 remove roleHasUpdated
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Javier Segarra 2024-05-10 17:03:19 +02:00
parent 117f42ff96
commit 7fcb63559a
1 changed files with 3 additions and 3 deletions

View File

@ -307,15 +307,15 @@ module.exports = Self => {
// OBTENER LDAPSJS MIEMBROS ROLES
for await (const role of rolesToUpdate) {
let roleHasUpdated = false;
// let roleHasUpdated = false;
if (roles.get(role).$description != sambaCurrentGroups.get(role).description) {
await this.deleteRole(role);
await this.addRole(roles.get(role));
roleHasUpdated = true;
// roleHasUpdated = true;
}
const users = usersMap.get(role);
const currentUsers = this.handleRoleMembers(await this.getRoleMembers(role));
if (!roleHasUpdated && currentUsers.length === 0 && users.length === 0) continue;
if (currentUsers.length === 0 && users.length === 0) continue;
await this.handleUsersRole(role, currentUsers, users);
}
}