gitlab-org--gitlab-foss/spec/features/projects/members
Rémy Coutable ec0061a95c Allow Member.add_user to handle access requesters
Changes include:

- Ensure Member.add_user is not called directly when not necessary
- New GroupMember.add_users_to_group to have the same abstraction level as for Project
- Refactor Member.add_user to take a source instead of an array of members
- Fix Rubocop offenses
- Always use Project#add_user instead of project.team.add_user
- Factorize users addition as members in Member.add_users_to_source
- Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects
- Destroy any requester before adding them as a member
- Improve the way we handle access requesters in Member.add_user
  Instead of removing the requester and creating a new member,
  we now simply accepts their access request. This way, they will
  receive a "access request granted" email.
- Fix error that was previously silently ignored
- Stop raising when access level is invalid in Member, let Rails validation do their work

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-28 09:43:00 +02:00
..
anonymous_user_sees_members_spec.rb Use the can? helper instead of current_user.can? 2016-04-22 15:48:58 +02:00
group_member_cannot_leave_group_project_spec.rb Don't show 'Leave Project' to group members 2016-06-17 12:16:59 +02:00
group_member_cannot_request_access_to_his_group_project_spec.rb New :request_access ability to replace a ugly helper 2016-07-05 14:35:26 +02:00
group_requester_cannot_request_access_to_project_spec.rb Group owner cannot request access to a project of their group 2016-06-17 13:03:19 +02:00
master_adds_member_with_expiration_date_spec.rb Add expiration date to group memberships 2016-08-18 21:09:17 +01:00
master_manages_access_requests_spec.rb Exclude requesters from Project#members, Group#members and User#members 2016-07-01 17:44:46 +02:00
member_cannot_request_access_to_his_project_spec.rb New :request_access ability to replace a ugly helper 2016-07-05 14:35:26 +02:00
member_leaves_project_spec.rb Show 'Leave project' only if member can actually leave the project 2016-06-18 06:06:34 +02:00
owner_cannot_leave_project_spec.rb Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
owner_cannot_request_access_to_his_project_spec.rb Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
user_requests_access_spec.rb Fix a few nitpicks 2016-07-20 14:38:21 +02:00