User is able to leave an organization
Problem
Users can be removed from Organizations. Similarly, they should have a right to leave an Organization.
Proposal
- Add an option to
Leave Organization. Where should this be located? - Leaving an Organization should remove a user as a member from all the groups and projects contained by the Organization.
- User is warned about the consequences of leaving the Organization.
- The user account stays intact.
- As a result of leaving, the user loses member privileges for all the groups and projects contained in the Organization.
- If the user is a member of more than 1 Organization, the Organization that the user left will not be available in the Organization switcher any longer.
- If the user is a member of only 1 Organization and leaves that Organization, they are added to the default Organization instead.
Add ellipse menu to organization homepage
Clicking the ellipse opens a menu with an option to leave the organization
Clicking Leave organization opens a confirmation modal
If the user is the sole owner of a group prevent leaving and display the following modal
If the user is the sole owner of an organization prevent leaving and display the following modal
Implementation plan
- Add leave action to
app/assets/javascripts/vue_shared/components/list_actions/constants.js - Render
app/assets/javascripts/vue_shared/components/list_actions/list_actions.vueinapp/assets/javascripts/organizations/users/components/users_view.vueby using theuser-actionsslot in<users-table> - Add
action: this.onActionLeaveandtext:Leave organizationto leave action and then pass toactions` prop - In
onActionLeaveopen aGlModal - Check permissions added in #441577 (closed) to determine what the modal should say.
- If user confirms use GraphQL Mutation in #423005 to remove the organization user
Edited by Peter Hegman





