openanalytics / containerproxy

Manage HTTP proxy routes into Docker containers
Apache License 2.0
45 stars 66 forks source link

containerproxy.service.UserService.java.isAdmin doesn't handle string arrays #8

Closed warnes closed 5 years ago

warnes commented 5 years ago

This code doesn't handle the case where getAdminGroups returns a string array (even with only a single element)
https://github.com/openanalytics/containerproxy/blob/144c4207fb2fa0bbb5ca071748d45c5e288ba43f/src/main/java/eu/openanalytics/containerproxy/service/UserService.java#L106-L111 because isMember is defined as: https://github.com/openanalytics/containerproxy/blob/144c4207fb2fa0bbb5ca071748d45c5e288ba43f/src/main/java/eu/openanalytics/containerproxy/service/UserService.java#L140

As a consequence shinyproxy fails to assign admin roles when the admin-groups is an array.

tverbeke commented 5 years ago

Thanks @warnes - will fix!

fmichielssen commented 5 years ago

Hi @warnes , thanks for bringing this up. A fix has been committed in the develop branch: https://github.com/openanalytics/containerproxy/commit/0907b03735061393eca02699c44963d047807ba2

tverbeke commented 5 years ago

Released with ContainerProxy 0.7.0