gitlab-org--gitlab-foss/spec/services
Robert Speicher 11eefba891 Merge branch 'fix-namespace-deletion' into 'master'
Fix bug where destroying a namespace would not always destroy projects
    
There is a race condition in DestroyGroupService now that projects are deleted asynchronously:
    
1. User attempts to delete group
2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project
3. DestroyGroupService destroys the Group, leaving all its projects without a namespace
4. Projects::DestroyService runs later but the can?(current_user,
    :remove_project) is `false` because the user no longer has permission to
    destroy projects with no namespace.
5. This leaves the project in pending_delete state with no namespace/group.
 
Projects without a namespace or group also adds another problem: it's not possible to destroy the container registry tags, since `container_registry_path_with_namespace` is the wrong value.

The fix is to destroy the group asynchronously and run `execute` directly on Projects::DestroyService.
 
Closes #17893

See merge request !4341
2016-08-12 18:04:03 +00:00
..
auth Allow to access Container Registry for Public and Internal projects 2016-07-15 17:05:41 +02:00
ci Use state machine for pipeline event processing 2016-08-11 21:32:16 +02:00
groups Update tests for the current_application_settings request store changes 2016-05-27 19:05:52 -07:00
issues adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
members Raise a new Gitlab::Access::AccessDeniedError when permission is not enough to destroy a member 2016-06-18 06:06:34 +02:00
merge_requests api for generating new merge request 2016-08-11 23:37:00 +07:00
milestones Avoid `describe`-ing symbols in specs 2016-07-12 10:27:58 -05:00
notes Avoid `describe`-ing symbols in specs 2016-07-12 10:27:58 -05:00
projects adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
search Fix visibility of private project snippets for members when searching 2016-06-22 20:09:19 -03:00
create_deployment_service_spec.rb Fix creation of deployment on build that is retried, redeployed or rollback 2016-07-16 11:50:59 +02:00
create_release_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
create_snippet_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
create_tag_service_spec.rb Better message for git hooks and file locks 2016-07-04 15:31:49 +03:00
delete_tag_service_spec.rb Delete tags via rugged 2016-04-15 16:05:04 +02:00
delete_user_service_spec.rb Fix bug where destroying a namespace would not always destroy projects 2016-08-11 15:36:35 -07:00
destroy_group_service_spec.rb Fix bug where destroying a namespace would not always destroy projects 2016-08-11 15:36:35 -07:00
event_create_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
git_hooks_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
git_push_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
git_tag_push_service_spec.rb Expire branch/tag git data when needed. 2016-06-30 16:17:38 +02:00
import_export_clean_up_service_spec.rb fix spec 2016-08-04 13:39:38 +02:00
notification_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
repair_ldap_blocked_user_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
repository_archive_clean_up_service_spec.rb Extract helper methods to clean up RepositoryArchiveCleanUpService spec 2016-07-21 11:47:28 -03:00
search_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
system_hooks_service_spec.rb Merge branch 'add_username_to_user_system_hooks' of https://github.com/tbeadle/gitlabhq 2016-01-13 10:12:30 +01:00
system_note_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
test_hook_service_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
todo_service_spec.rb Merge branch 'kradydal/gitlab-ce-create-todos-when-issue-author-assigne-or-mention-himself' 2016-07-15 15:03:04 -05:00
update_release_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
update_snippet_service_spec.rb Fix more specs 2016-03-20 23:09:33 +01:00