-
Notifications
You must be signed in to change notification settings - Fork 6
Adding admin dependency in authorization of dataset,files, metadata,search #819
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
Conversation
black formatting adding codegen file removing redundant print statement fixing pytest failure fixing pytest failure ran black
|
Hold on to review this one. I need to do some testing. |
lmarini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line return DatasetDB.creator.email == current_username.email at authentication.py:100 is returning {'creator.email': '<current user email address>'} for some reason, which in turn is making all the if admin statements true, even if the user is not admin.
|
Question on this one. I have 2 users in my db right now. One is an admin, and one is not. If I create a dataset with the non-admin user and upload files, the admin sees the dataset under explore, but when they click the dataset they do not see the files. But if I download the dataset, they are downloaded. If I try to access one of the files directly, this error is in the console:
|
|
@tcnichol Could you check the same issue here in this branch? #834 |
tcnichol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. other admin features in another pull request, also approved.
longshuicy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test a few scenarios all works:
- Admin seeing other person's resources
- Admin search
- Non-Admin see resources only through sharing
- etc
If you fix the merge conflict we can merge :-)
done |
For testing, please use endpoints on Postman or Clowder UI. Both should work.