Allow users to add or remove themselves to/from groups using the API.
Review Request #5298 — Created Jan. 22, 2014 and submitted
Allow users to add or remove themselves to/from groups using the API.
Previously, there was no way for a user to add themselves to a group, or
remove themselves from a group. Only admins were able to do this. There
was also a bad query preventing adding on non-localsites.Now a user can add themselves to any group they'd have access to, and
remove themselves from any group they're on. This works with both global
groups and groups on Local Sites.
Unit tests pass.
Added myself to a global group as a non-admin, and removed myself from
the same group.
- Change Summary:
-
- Moved the modification permission checks in to
has_modify_permissions
. - For readability, created a local variable for
resources.review_group
. - Fixed a logic error with local site checks.
- Moved the modification permission checks in to