|
|
@ -194,6 +194,11 @@ class User extends AuthUser {
|
|
|
|
const shell = this.login_shell || this.configs.get('ldap:server.schema.default_shell')
|
|
|
|
const shell = this.login_shell || this.configs.get('ldap:server.schema.default_shell')
|
|
|
|
const domain = this.configs.get('ldap:server.schema.base_dc').split(',').map(x => x.replace('dc=', '')).join('.')
|
|
|
|
const domain = this.configs.get('ldap:server.schema.base_dc').split(',').map(x => x.replace('dc=', '')).join('.')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const group_ids = []
|
|
|
|
|
|
|
|
for ( const group of await this.groups() ) {
|
|
|
|
|
|
|
|
group_ids.push(await group.get_gid_number())
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const ldap_data = {
|
|
|
|
const ldap_data = {
|
|
|
|
uid: this.uid.toLowerCase(),
|
|
|
|
uid: this.uid.toLowerCase(),
|
|
|
|
uuid: this.uuid,
|
|
|
|
uuid: this.uuid,
|
|
|
@ -208,7 +213,7 @@ class User extends AuthUser {
|
|
|
|
objectGuid: this.uuid,
|
|
|
|
objectGuid: this.uuid,
|
|
|
|
objectguid: this.uuid,
|
|
|
|
objectguid: this.uuid,
|
|
|
|
uidNumber: uid_number,
|
|
|
|
uidNumber: uid_number,
|
|
|
|
gidNumber: uid_number,
|
|
|
|
gidNumber: group_ids.map(x => String(x)),
|
|
|
|
loginShell: shell,
|
|
|
|
loginShell: shell,
|
|
|
|
homeDirectory: `/home/${this.uid}@${domain}`
|
|
|
|
homeDirectory: `/home/${this.uid}@${domain}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|