-
-
Notifications
You must be signed in to change notification settings - Fork 133
Get user by id doesnt work if user doesn't have enough rights #542
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
Comments
@andrejcermak Thanks for the detailed report. Any ideas on how we might fix or workaround this? (I haven't used openstack in years at this point, so I don't feel equipped to easily fix/test). |
IMO just deleting the 2 lines that handle the |
I'm open to some kind of change, though I presume it was there for some reason/need. So maybe it could still be there, but fail more gracefully (and then presumably disable caching) rather than removing caching altogether? |
Is there any standardized way of handling errors in this project? I think an easy solution would be to try the cache call once, catch the exception and then disable the caching somehow. |
@andrejcermak Yeah, my thought was similar. I don't think there is an existing pattern that matches this particularly well (or at least not one that comes to mind). |
Get user by id doesn't work if user doesn't have enough rights because of the first 2 lines
def find_by_id(id) cached_user = find { |user| user.id == id } return cached_user if cached_user
as it calls the
list_all_users
in theall
function, so if the user doesn't have sufficient rights to list all users, this fails.The text was updated successfully, but these errors were encountered: