gitlabhq/gitlabhq — pull request #6274 by cirosantilli (2014-02-08 14:39:30+00:00)
Title: User can leave group from group page.

Fixes ACCEPTING MERGE/PULL REQUESTS at

Screenshot:

![screenshot from 2014-02-08 14 36 15](https://f.cloud.github.com/assets/1429315/2117361/a09fbbe4-90c7-11e3-8e7f-0495c86416e5.png)

**Implementation notes**

Moved some of the "who can remove who from a group" logic from templates into new functions of users_groups model.

Tests:

- named the user and the groups. This led to mass refactoring of the group tests, but what was tested in all the existing tests was kept.

- merged create group, which had a single test, into the group tests.

- moved group test out of group directory since there is a single file now.