Closed robertknight closed 3 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.42%. Comparing base (
67b74ce
) to head (600b3fe
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Previously the "Leave group" option was only shown for private groups on the basis that membership of open and restricted groups was managed by h admins. However first-party Hypothesis users can now create open and restricted groups themselves and members of these groups will see an option to leave the group on activity pages. Align whether the client shows the "Leave group" option with h's behavior.
During this change it was noticed that the documentation in the code and test descriptions did not match the actual handling of
allowLeavingGroups
. The comments said that services had to explicitly setallowLeavingGroups
to prevent users leaving. However the code would treatallowLeavingGroups
as false if a) service configuration was present and b) the value ofallowLeavingGroups
was falsey (including undefined). Changing this behavior may cause issues for existing users of third party authorities, so this commit updates the documentation and tests to accurately describe the current behavior.Fixes https://github.com/hypothesis/client/issues/6637 (Slack thread)
Testing:
main
branch in the client, the new group will appear in the drop-down menu but the "Leave group" option will be missing