Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
User can leave group from group page. #6274
Fixes ACCEPTING MERGE/PULL REQUESTS at http://feedback.gitlab.com/forums/176466-general/suggestions/5323575-allow-people-to-leave-a-group
Moved some of the "who can remove who from a group" logic from templates into new functions of users_groups model.
Sorry for silliness in opening the already implemented idea of last user not being able to leave group.....
I have corrected it and squashed old commit: last owner cannot leave the group from the group members page either.
To make UI and logic uniform, on the Profile > Groups page, the leave button simply does not show if the user is the last owner:
The profiles controller was modified to contain the exact same "who can remove whom from a group" logic as the group members page, now encapsulated in the
Add one documentation line explaining it that the last owner cannot leave the group:
Add tests to check the "user leaves group from the profile page" case.
@randx I tried to implement it how I understood we had agreed on:
In addition I have:
Lets see how Travis feels about this one =)