User - resolve posix groups for all member groups
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
48f5b3f71a
commit
0ee36dc429
@ -194,6 +194,11 @@ class User extends AuthUser {
|
||||
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 group_ids = []
|
||||
for ( const group of await this.groups() ) {
|
||||
group_ids.push(await group.get_gid_number())
|
||||
}
|
||||
|
||||
const ldap_data = {
|
||||
uid: this.uid.toLowerCase(),
|
||||
uuid: this.uuid,
|
||||
@ -208,7 +213,7 @@ class User extends AuthUser {
|
||||
objectGuid: this.uuid,
|
||||
objectguid: this.uuid,
|
||||
uidNumber: uid_number,
|
||||
gidNumber: uid_number,
|
||||
gidNumber: group_ids.map(x => String(x)),
|
||||
loginShell: shell,
|
||||
homeDirectory: `/home/${this.uid}@${domain}`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user