gitlab-org--gitlab-foss/spec/factories
Robert Speicher e64594ac44 Merge branch '21983-member-add_user-doesn-t-detect-existing-members-that-have-requested-access' into 'master'
Resolve "`Member.add_user`doesn't detect existing members that have requested access"

## What does this MR do?

This merge request handle the case when an access requester is added to a group or project (via the members page or the API).

In `Member.add_user`, if an access requester already exists, we simply accept their request (and set the `created_by`, `access_level` and `expires_at` attributes if given).

## Are there points in the code the reviewer needs to double check?

I've taken the opportunity to cleanup the whole `{Group,Project}Member.add_user*` methods since it was quite a mess.

## What are the relevant issue numbers?

Closes #21983

See merge request !6393
2016-10-02 11:42:57 +00:00
..
ci
abuse_reports.rb
appearances.rb
award_emoji.rb
boards.rb
broadcast_messages.rb
commit_statuses.rb
commits.rb
deploy_keys_projects.rb
deployments.rb
emails.rb
environments.rb
events.rb
file_uploader.rb
forked_project_links.rb
group_members.rb
groups.rb
identities.rb
issues.rb
keys.rb
label_links.rb
labels.rb
lfs_objects.rb
lfs_objects_projects.rb
lists.rb
merge_requests.rb
milestones.rb
namespaces.rb
notes.rb
notification_settings.rb
oauth_access_tokens.rb
oauth_applications.rb
personal_access_tokens.rb
personal_snippets.rb
project_group_links.rb
project_hooks.rb
project_members.rb
project_snippets.rb
project_wikis.rb
projects.rb
protected_branches.rb
releases.rb
sent_notifications.rb
service_hooks.rb
services.rb
snippets.rb
spam_logs.rb
system_hooks.rb
todos.rb
u2f_registrations.rb
user_agent_details.rb
users.rb
wiki_pages.rb