hydroshare / hs_restclient

Python client for the https://www.hydroshare.org REST API
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

hs.setAccessRules(resource_id, public=True) stopped working in 1.3 #95

Open zhiyuli opened 5 years ago

zhiyuli commented 5 years ago

hs.setAccessRules(resource_id, public=True) stopped working in 1.3

I was able to create a resource and add required metadata, but not make it public anymore

File "C:\Users\Drew\Miniconda3\envs\py27\lib\site-packages\hs_restclientinit.py", line 805, in setAccessRules raise HydroShareNotAuthorized(('PUT', url)) hs_restclient.exceptions.HydroShareNotAuthorized: Not authorized to perform PUT on https://dev-hs-6.cuahsi.org/hsapi/resource/accessRules/57d9241202ee4ea98735752ac433ec91/.

c-krew commented 5 years ago

I received the same error when I tried hs.createResourceFolder(resource_id, path). HydroShareNotAuthorized: Not authorized to perform PUT on https://www.hydroshare.org/hsapi/resource/21c38e32c8f34de1a3073e738e7726bc/folders/12-11-2018-21:21:35. This resource is mine and I used my credentials for authentication