hypothesis / hypothesis/h

Enable users to change their own role on the `/groups/{pubid}/edit/members` page

Open
#9,136 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.2k
Forks
459
Avg merge
27d 1h
Merged PRs (30d)
1

Description

See also: https://github.com/hypothesis/h/issues/9135

Currently users can't use the _Members_ table on the `/groups/{pubid}/edit/members` to change their own role: there _is_ a row in the table for the user's own membership, but the role in this table row isn't editable.

Make the role in the user's own table row editable so that users can use the table to edit their own role.

Notes:

* This should be a frontend-only change: the backend API for editing roles already allows a user to edit their own role.
* Downgrading your own role has consequences for what you can and can't do in the group and (unlike when changing someone else's role) **cannot be undone**: once you've downgraded yourself you can't upgrade yourself back to your old role. No user can _upgrade_ their own role. Before we allow a user to downgrade their own role we need to show a warning dialog to this effect, importantly including the fact that this can't be undone.
* Changing your own role changes what actions you can take against every other member in the group, so after changing the user's own role the frontend will have to call the get-group-members API to re-fetch all displayed members and update their rows in the table.
* This interacts with pagination (https://github.com/hypothesis/h/issues/9133): if the table is paginated and the UI is currently displaying page `n`, we may want to maintain that state and stay on page `n` even after re-fetching all the members.
* This would similarly interact with any other state that the page has, such as: sort ordering (https://github.com/hypothesis/h/issues/9144), search filtering (https://github.com/hypothesis/h/issues/9143), etc. (None of these features have been implemented yet at the time of writing.)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.