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

Admin access not possible once a user has signed in normal user mode #111

Open
mp911de opened this issue Jun 22, 2016 · 7 comments
Open

Comments

@mp911de
Copy link
Collaborator

mp911de commented Jun 22, 2016

The admin and claAuthor flags are not set if a user logs into the application and then decides to perform administrative tasks. This results in access denied when accessing resources protected by admin/CLA author roles.

@rwinch
Copy link
Collaborator

rwinch commented Jun 22, 2016

This is somewhat by design. The reason is we need to request an OAuth access token scopes and there are lot more scopes for administrative users (we don't want to request the additional scopes for non admin users).

When the access denied exception happens, it should be handled by attempting to re-authenticate as an administrative user and obtain an access token with the additional scopes required. Is this not happening? It works for me.

@rwinch
Copy link
Collaborator

rwinch commented Jun 22, 2016

NOTE: We could change the updated scopes of the access token logic to be distinct from being an admin user. I believe this would be a large improvement. However, this would be quite a bit of work.

@mp911de
Copy link
Collaborator Author

mp911de commented Jun 22, 2016

Turns out I used /manage/ as URL instead of the correct /admin/ URL. Somewhat fooled myself because I received a basic auth prompt.

@rwinch
Copy link
Collaborator

rwinch commented Jun 22, 2016

@mp911de Thanks for the response. You are right that the /manage/ URL could be configured better (i.e. use the same Security configuration as the rest of the application). That would be another nice improvement.

@Shredder121
Copy link
Contributor

Could it maybe also be made configurable what the admin email domain must be?
That's what I bumped into 😅
Also, the GitHub team id is also hard coded (for the CLA_AUTHOR permission.

@rwinch
Copy link
Collaborator

rwinch commented Jun 22, 2016

@Shredder121 Yes that could be made configurable. If you would like to send a PR, please do (just please make the defaults what we are using now).

@mp911de
Copy link
Collaborator Author

mp911de commented Jun 22, 2016

That's what I've seen as well but I didn't want to dig into other tickets atm. Sounds like a good addition for something like OrganizationProperties providing some defaults

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

No branches or pull requests

3 participants