test(samba): refs #5770 update group when change description
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
a2e4a65c3a
commit
52e4d3aed8
|
@ -1,4 +1,5 @@
|
|||
const {differences, printResults} = require('../util/helpers');
|
||||
const ldap = require('../util/ldapjs-extra');
|
||||
|
||||
const ROLE_PREFIX = '$';
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
@ -163,8 +164,18 @@ module.exports = class SambaHelper {
|
|||
|
||||
if (this.rolesToUpdate.length > 0) {
|
||||
for await (const role of this.rolesToUpdate) {
|
||||
await this.deleteRole(role);
|
||||
await this.addRole(this.roles.get(role));
|
||||
if (this.roles.get(role).$description != sambaCurrentGroups.get(role).description) {
|
||||
const groupDescriptionAttribute = {
|
||||
description: this.roles.get(role).$description,
|
||||
};
|
||||
const changed = await this.adClient.modify(`cn=${role},${this.fullGroupsDn}`, new ldap.Change({
|
||||
operation: 'replace',
|
||||
modification: groupDescriptionAttribute,
|
||||
}));
|
||||
console.log(changed);
|
||||
// await this.deleteRole(role);
|
||||
// await this.addRole(this.roles.get(role));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue