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

Resource access authorization fails when use basic authentication #182

Open
offtherailz opened this issue May 28, 2018 · 0 comments
Open

Comments

@offtherailz
Copy link
Member

offtherailz commented May 28, 2018

With basic authentication requests, user write and read rules are not correctly managed to provide access to resource's data and permission (normal user).
The resource is listed, the canEdit and canRead flags are correctly set in listing queries (e.g. extjs/search) but the resource is not available to the user.

Steps to reproduce

  • Create a resource (the default resources are assigned) with a normal user
  • Try to access to the resource using token (taken from /login entry point)
  • Try to access to the resource's permission (see rest api) using basic auth

Expected result

You can access both using basic or session key

Effective result

You can access the resource only with session key

Notes

This issue has been highlighted by this PR . The correction to the code for retrieving permission (instead of taking the first rule for the user, whatever it is) caused this problem, because now the user is checked.
We could fix is by excluding group rules in another way(i.e. excluding rules with group set), if it's confirmed that the rules returned are only the current user's ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant