Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix private role validation #4432

Merged
merged 1 commit into from Aug 16, 2017

Conversation

Projects
None yet
3 participants
@guerler
Copy link
Contributor

commented Aug 15, 2017

User.roles is an array containing role-associations not actual roles. Individual roles are accessible through the .role attribute of the role-association. This change fixes the validation statement.

@guerler guerler added this to the 17.09 milestone Aug 15, 2017

@guerler guerler added status/review and removed status/WIP labels Aug 16, 2017

@dannon

This comment has been minimized.

Copy link
Member

commented Aug 16, 2017

Looks good to me, this fixes it. We can maybe improve this mapping down the road to be more intuitive, but this is how we currently handle group.roles as well.

@dannon dannon merged commit c5a9149 into galaxyproject:dev Aug 16, 2017

4 checks passed

api test Build finished. 281 tests run, 0 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 153 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 44 tests run, 0 skipped, 0 failed.
Details
@martenson

This comment has been minimized.

Copy link
Member

commented Aug 16, 2017

So this used to be always false?

iow if role not in user.roles has always been evaluated as True?

@guerler

This comment has been minimized.

Copy link
Contributor Author

commented Aug 17, 2017

Yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.