You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 increate_detail
.GitHub
mytardis/mytardis
mytardis - MyTardis - a data management system for private lab/facility data
The text was updated successfully, but these errors were encountered: