WIP: #5770 - Sync Groups Samba #1946
|
@ -80,9 +80,6 @@ module.exports = class SambaHelper {
|
|||
addMembers(role, user) {
|
||||
return this.sambaTool('group', ['addmembers', role, user]);
|
||||
}
|
||||
editGroup(role, descriptrion = '') {
|
||||
return this.sambaTool('group', ['edit', `${role}`, '--editor=\'vi\'']);
|
||||
}
|
||||
|
||||
handleRoleMembers(users) {
|
||||
if (users.length === 0) return [];
|
||||
|
@ -160,24 +157,10 @@ module.exports = class SambaHelper {
|
|||
|
||||
if (this.rolesToInsert.length > 0) {
|
||||
// PROCEDIMIENTO PARA INSERTAR ROLES
|
||||
// for (const $role of this.rolesToInsert) {
|
||||
// const {name, description} = this.roles.get($role);
|
||||
|
||||
// const changed = await this.adClient.add(
|
||||
// `cn=${$role},${this.fullGroupsDn}`,
|
||||
// {
|
||||
// cn: $role,
|
||||
// description: description,
|
||||
// objectClass: ['top', 'posixGroup', 'sambaGroupMapping']
|
||||
// }
|
||||
// );
|
||||
// console.log(changed);
|
||||
// }
|
||||
const resultsRoleInsert = await Promise.all(
|
||||
this.rolesToInsert.map(role => this.addRole(this.roles.get(role))));
|
||||
printResults(resultsRoleInsert);
|
||||
}
|
||||
// const edit = await this.editGroup('$developer');
|
||||
|
||||
if (this.rolesToUpdate.length > 0) {
|
||||
for await (const role of this.rolesToUpdate) {
|
||||
|
|
Loading…
Reference in New Issue