Refactor add_users method for project and group [EE]
EE version of the https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10850
What does this MR do?
- Add
Member#add_users
method to be consistent withMember#add_user
- Get rid of specific methods like
add_users_to_group
and useMember#add_users
instead - Don't use
ProjectMember.add_users_to_projects
when you only need to add members to single project
Are there points in the code the reviewer needs to double check?
no
Why was this MR needed?
Cleanup code spaghetti code around adding users to project/group.
Before:
-
ProjectTeam.add_users -> ProjectMember.add_users_to_projects -> Member.add_users_to_source
. Group.add_users -> Group.add_users_to_group -> Member.add_users_to_source
Now:
ProjectTeam.add_users -> Member.add_users
Group.add_users -> Member.add_users
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary Documentation created/updatedAPI support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/14709