Description
Problem
bioRxiv want only their own groups to be shown in the embedded client on biorxiv.org.
Specifically: they'll have an open group that should always be shown, and they'll have a private group for their moderators that should be shown if the authenticated user is a member of the private group. No other groups should be shown in the client's dropdown menu.
In addition, bioRxiv want the + Create new group button to be removed from the client's groups menu.
The embedded client on our demo site https://biotome.hypothes.is/ is currently configured to show only a demo open group and demo private group using pre-existing client settings, like so:
<script type="application/json" class="js-hypothesis-config">
{
...,
"services": [{
"apiUrl": "${HYPOTHESIS_API_URL}",
"authority": "${HYPOTHESIS_AUTHORITY}",
"groups": [${HYPOTHESIS_GROUPS}]
}]
}
</script>
However, there are several issues with this configuration:
-
If the user is not a member of the ReviewR Moderators private group they see an error message when the client first appears:
Unable to fetch groups: Network request failed (404): Either the resource you requested doesn't exist, or you are not currently authorized to see it.
Users who aren't members of the private group should not see the private group in the groups menu. But they shouldn't see an error message either. -
The configuration causes the sign up, log in and log out buttons in the client to stop working. These should work normally.
-
The + Create new group button is still shown. We'd like this to be removed.
-
The groups menu has the text
CURRENTLY VIEWING
at the top. This is weird. We'd like to remove this. -
The ReviewR Moderators group has an h. logo next to it. This shouldn't be there.
Solution
We'll add new client configuration settings for restricting the groups shown in the client's groups menu to certain, specific groups and for hiding the + Create new group button.
We'll use our demo site https://biotome.hypothes.is/ to test and demo this configuration.
Done when
- Only the ReviewR open group and ReviewR Moderators private group are shown in the client's groups menu on https://biotome.hypothes.is/.
- Users who aren't a member of the private group don't see the private group in the groups menu
- Users who aren't a member of the private group don't see an error message
- The + Create private group button isn't shown in the client's groups menu on https://biotome.hypothes.is/.
-
CURRENTLY VIEWING
isn't shown in the client's groups menu on https://biotome.hypothes.is/. - The log in, sign up and log out links work as normal
- No h. logo is shown next to the ReviewR Moderators group in the client's groups menu on https://biotome.hypothes.is/. (This may require implementing creating private groups in organizations other than the default organization. I don't think this is possible currently.)