Skip to content

Allow spaces in groups  #81

@makl81

Description

@makl81

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions