hypothesis / product-backlog

Where new feature ideas and current bugs for the Hypothesis product live
118 stars 7 forks source link

API response renders read permissions correctly #97

Closed chdorner closed 7 years ago

chdorner commented 7 years ago

This is part of the larger work (#92) which tracks the complete read permission implementation.

This part is to make sure that the API response reflects the correct read permissions in the JSON.


Currently we render only the groupid in the read permissions if the annotation is shared (see here. This will have to change as it depends on the value of the Group.readable_by property.

The memex annotation presenter will have to take the value of the Group.readable_by property into account by using the groupfinder then rendering the appropriate value (group:{pubid}, or group:__world__).

Some changes need to happen so we get access to the request for using the groupfinder, or the result of the groupfinder gets passed into the presenter, either way.

Relevant PRs: hypothesis/h#4293, hypothesis/h#4294, and hypothesis/h#4299

ajpeddakotla commented 7 years ago

Points: 3