User - resolve posix groups for all member groups
continuous-integration/drone/push Build is passing Details

master
Garrett Mills 3 years ago
parent 48f5b3f71a
commit 0ee36dc429
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -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…
Cancel
Save