Skip to content

No user isn't an admin user anymore - #991

Merged
ssalinas merged 3 commits into
masterfrom
no-user-isnt-admin
Apr 15, 2016
Merged

No user isn't an admin user anymore#991
ssalinas merged 3 commits into
masterfrom
no-user-isnt-admin

Conversation

@Calvinp

@Calvinp Calvinp commented Apr 7, 2016

Copy link
Copy Markdown
Contributor

The admin check would give you admin rights if you were logged in as no user.
This fixes that.

@tpetr please take a look - it is possible that there is a good reason for what Singularity was doing that I don't know about.

@ssalinas

ssalinas commented Apr 7, 2016

Copy link
Copy Markdown
Contributor

👍 I can't think of a reason where having no user should allow you any admin actions

@tpetr

tpetr commented Apr 7, 2016

Copy link
Copy Markdown
Contributor

LGTM, thanks. Let's be sure to test out the endpoints that use this method in the test cluster to make sure there aren't any side effects.

@tpetr

tpetr commented Apr 7, 2016

Copy link
Copy Markdown
Contributor

On second thought, Unauthorized is the more correct response to return if the user is not present: http://stackoverflow.com/questions/3297048/403-forbidden-vs-401-unauthorized-http-responses

I'd suggest copying what we do elsewhere and use the checkUnauthorized() method before checkForbidden()

@tpetr

tpetr commented Apr 7, 2016

Copy link
Copy Markdown
Contributor

🎈

@Calvinp Calvinp added the hs_qa label Apr 8, 2016
@ssalinas ssalinas modified the milestone: 0.6.0 Apr 11, 2016
@ssalinas

Copy link
Copy Markdown
Contributor

Thanks for the fix @Calvinp

@ssalinas
ssalinas merged commit b495521 into master Apr 15, 2016
@ssalinas
ssalinas deleted the no-user-isnt-admin branch April 15, 2016 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants