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

Edit users page is somewhat visible to non admins #213

Closed
jpbulman opened this issue Jun 22, 2019 · 3 comments
Closed

Edit users page is somewhat visible to non admins #213

jpbulman opened this issue Jun 22, 2019 · 3 comments

Comments

@jpbulman
Copy link
Member

jpbulman commented Jun 22, 2019

While looking at #201 , I visited https://cubingusa.org/admin/edit_users and saw something odd. The edit users admin filter box comes up for me (even though I'm not an admin), but not the table. I duplicated this locally and found that anyone who is a delegate will get this strange formatting, but a person with no permissions (an average competitor) will just get redirected back home. I'll try and poke around, but the permission controlling for edit users does not seem to be in the handler, so if anyone has suggestions or a fix, feel free to chime in.

Not a dangerous issue since the table does not appear, which means delegates can't just edit users freely.

users

@timreyn
Copy link
Contributor

timreyn commented Jun 24, 2019

Hey JP, good catch.

This is configured here: https://github.com/cubingusa/org/blob/master/cubingusa.py#L75 Key is "AllRoles()".

It probably makes sense to set this to the same set of users that can actually edit users -- this is the handler for the async fetch:

return Roles.AdminRoles()

@jpbulman
Copy link
Member Author

Having some annoying git problems, so just ignore the referenced commit right before the pr.

@timreyn
Copy link
Contributor

timreyn commented Feb 24, 2022

Addressed in #240.

@timreyn timreyn closed this as completed Feb 24, 2022
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

2 participants