Skip to content

refactor User#groups to not use id #16

@johrstrom

Description

@johrstrom

Using id to parse ids may be problematic due to some groups having spaces in the name. Specifically domain users in some AD systems.

`id -G #{name}`.split(' ').map {|g| Group.new(g.to_i)}

See OSC/nginx_stage#45

Maybe it should look more like CurrentUser in ondemand.
https://github.com/OSC/ondemand/blob/dda7c0dd579765c5f983874f6f139f083804f883/apps/dashboard/app/models/current_user.rb#L42-L50

I'm not sure how to replicate as I can't create a unix group with a space in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions