-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hello,
We also have a lot of LDAP Groups with spaces.
I know it was already discussed here, with no solution right now (Verdaccio is not supporting spaces in groups names):
#68
Is it possible to have this workaround in the code (.split(' ').join('_'))?
function authenticatedUserGroups(user, groupNameAttribute) { return [ user.cn, // _groups or memberOf could be single els or arrays. ...user._groups ? [].concat(user._groups).map((group) => group[groupNameAttribute].split(' ').join('_')) : [], ...user.memberOf ? [].concat(user.memberOf).map((groupDn) => rfc2253.parse(groupDn).get('CN').split(' ').join('_')) : [], ]; }
The I could use the groups with an underscore instead of a space in verdaccio config.yaml.
Could also be configurable.
Kind regards,
Marcus