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

None

Activity

Show:
Meredith Slota
August 9, 2017, 9:37 PM

Closing in favor of the other issue, linking.

Ziming Dong
May 17, 2017, 12:40 AM

is very similar to this issue so I've decided to resolve it in that issue

Ziming Dong
April 19, 2017, 8:46 PM

Kim suggested we use http://docs.synapse.org/rest/GET/entity/id/restrictionInformation.html for checking for access restrictions

Larsson Omberg
April 19, 2017, 7:32 PM

After brainstorming.

When 403 occurs catch it then request unmetAccessRestrictions and return message based on their content. if no unmetAccessRestrictions re-throw exception.

Larsson Omberg
April 18, 2017, 9:02 PM

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?

Duplicate

Assignee

Ziming Dong

Reporter

Ziming Dong

Labels

None

Validator

Kimyen Truong

Development Area

None

Release Version History

None

Slack Channel

None

Fix versions

Priority

Major