Remove 0x200 and 0x400 masks from being used in GET /entity/{id}/bundle
Description
The following masks in the GET /entity/{id}/bundle call will soon be deprecated:
Remove usages of these masks and change code that uses these to instead call (with limits and offsets):
GET /entity/(id)/accessApproval
GET /team/(id)/accessApproval
GET /entity/(id)/accessRequirement
GET /team/(id)/accessRequirement
Environment
Activity
Closing in favor of the other issue, linking.
is very similar to this issue so I've decided to resolve it in that issue
Kim suggested we use http://docs.synapse.org/rest/GET/entity/id/restrictionInformation.html for checking for access restrictions
After brainstorming.
When 403 occurs catch it then request unmetAccessRestrictions and return message based on their content. if no unmetAccessRestrictions re-throw exception.
Unfortunately the Python client always has to get the unmetAccessRequirements on every download to send the user to the website if they need to. Currently we have the following line:
if len(bundle['unmetAccessRequirements']) > 0:
#Write out a user friendly message
This could be replaced with getting back the number of unmet access restrictions instead of the actual access restrictions. But as it stands we would always be calling the new method anyway and hence slow down the client.
Are there alternatives? What is the errror code that is returned when you have unmet access restrictions, is it a 403 or soemthing more specific that we can react to when we try to download the file?