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

Authorisation denied for PUT requests on datasets #908

Open
RichardPBerry opened this issue Jun 27, 2017 · 0 comments
Open

Authorisation denied for PUT requests on datasets #908

RichardPBerry opened this issue Jun 27, 2017 · 0 comments

Comments

@RichardPBerry
Copy link

Attempting to use the PUT request on a dataset gives a 401 error. As this feature has not been implemented it should give a NotImplementedError instead. Relevant comments on the slack channel are copied below:

richardb [12:30 PM]
Has anyone else had a problem with PUTs on datasets? I'm suspecting this is a bug in MyTardis but have no way to replicate to be sure...

----- Today June 27th, 2017 -----
andrew.perry [10:52 AM]
@richardb A very quick look suggests to me that PUT requests on Datasets will always be rejected as Unauthorized: https://github.com/mytardis/mytardis/blob/develop/tardis/tardis_portal/api.py#L415. Maybe @grischa could confirm - looks like to make this work there needs to be some code there to check has_write_permissions on all parent Experiments for the Dataset.
GitHub
mytardis/mytardis
mytardis - MyTardis - a data management system for private lab/facility data

grischa [11:09 AM]
Thanks for following up on this, @andrew.perry. Yeah, the permissions checks aren't implemented for all operations. It should raise a NotImplementedError, so that's a bug.

james.wettenhall [11:50 AM]
If anyone wants to submit a Pull Request to fix this issue in api.py, we should be able to merge it quickly - a simple change like this should be easy to review.

andrew.perry [11:53 AM]
@richardb tip via @grischa: to implement it the code at line 415 in update_detail would be essentially be same as the permissions check here: https://github.com/mytardis/mytardis/blob/develop/tardis/tardis_portal/api.py#L310 in create_detail.
GitHub
mytardis/mytardis
mytardis - MyTardis - a data management system for private lab/facility data

@wettenhj wettenhj added this to the 4.0 milestone Jul 23, 2018
@wettenhj wettenhj removed this from the 4.0 milestone Jan 18, 2019
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