gitlab-org--gitlab-foss/app/models
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
..
ci Improve transition between states for event `enqueue` 2016-08-12 13:59:20 +02:00
concerns Pre-create all builds for Pipeline when a trigger is received 2016-08-11 15:22:35 +02:00
hooks
members New AccessRequests API endpoints for Group & Project 2016-08-10 19:07:05 +02:00
network
project_services Replace the tinder gem by bare HTTP requests 2016-08-11 08:52:13 +02:00
protected_branch Implement final review comments from @rymai. 2016-07-29 15:20:39 +05:30
.gitkeep
ability.rb Move abilities by subject class to a dedicated method 2016-08-04 16:00:31 +02:00
abuse_report.rb
appearance.rb
application_setting.rb Default to manual input for `domain_whitelist`, syntax fixes and added new tests. 2016-07-18 17:53:43 -05:00
audit_event.rb
award_emoji.rb
blob.rb Ensure relative paths for video are rewritten as we do for images 2016-07-26 10:22:17 +02:00
broadcast_message.rb
commit.rb Speed up Commit#repo_changes 2016-08-03 19:23:44 +02:00
commit_range.rb
commit_status.rb Use event `enqueue` instead of `queue` 2016-08-12 13:57:58 +02:00
compare.rb Make Compare#diffs diff_options a regular argument 2016-08-03 09:32:01 -07:00
deploy_key.rb
deploy_keys_project.rb
deployment.rb Improve manual actions code and add model, service and feature tests 2016-07-18 14:46:20 +02:00
diff_note.rb Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible 2016-08-02 16:04:15 +02:00
discussion.rb Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible 2016-08-02 16:04:15 +02:00
email.rb
environment.rb Incorporate feedback 2016-07-29 13:54:45 +02:00
event.rb Use a more future-proof check for Note/LegacyDiffNote 2016-07-06 10:08:42 +02:00
external_issue.rb
forked_project_link.rb
generic_commit_status.rb
global_label.rb
global_milestone.rb
group.rb Dumb-down avatar presence check in `avatar_url` methods 2016-07-05 10:51:11 -04:00
identity.rb
issue.rb Added concern for a faster "cache_key" method 2016-08-08 16:49:22 +02:00
key.rb Add simple identifier to public SSH keys 2016-08-02 06:56:23 +01:00
label.rb Simplify regex for string-based multi-word label surrounded in quotes 2016-07-13 16:01:27 -03:00
label_link.rb squashed - fixed label and milestone association problems, updated specs and refactored reader class a bit 2016-08-01 09:57:40 +02:00
legacy_diff_note.rb switch from diff_file_collection to diffs 2016-08-03 07:00:20 +02:00
lfs_object.rb
lfs_objects_project.rb
member.rb Incorporate review comments 2016-07-26 16:53:39 -07:00
merge_request.rb api for generating new merge request 2016-08-11 23:37:00 +07:00
merge_request_diff.rb Enable Style/SpaceAroundEqualsInParameterDefault cop 2016-08-06 04:03:01 +02:00
milestone.rb
namespace.rb Fix bug where destroying a namespace would not always destroy projects 2016-08-11 15:36:35 -07:00
note.rb Added concern for a faster "cache_key" method 2016-08-08 16:49:22 +02:00
notification_setting.rb Exclude projects pending delete from notifications 2016-07-07 20:49:17 +01:00
oauth_access_token.rb
personal_access_token.rb
personal_snippet.rb
project.rb New AccessRequests API endpoints for Group & Project 2016-08-10 19:07:05 +02:00
project_group_link.rb
project_import_data.rb
project_snippet.rb
project_team.rb Fix Rename `add_users_into_project` and `projects_ids` 2016-08-04 08:55:50 -03:00
project_wiki.rb
protected_branch.rb Use `Gitlab::Access` to protected branch access levels. 2016-07-29 15:20:39 +05:30
release.rb
repository.rb Update version_sorter and use new interface for faster tag sorting 2016-08-08 14:36:39 -04:00
security_event.rb
sent_notification.rb Allow SentNotification#position to be set as string or hash 2016-07-11 12:21:05 -05:00
service.rb Make Service.external_wikis return only active external wikis 2016-07-21 10:36:02 +02:00
snippet.rb
spam_log.rb
subscription.rb
todo.rb Add approval required todos 2016-07-12 19:01:09 +01:00
tree.rb
u2f_registration.rb
user.rb Store OTP secret key in secrets.yml 2016-08-03 15:46:37 +01:00
users_star_project.rb
wiki_page.rb `WikiPage` should have a slug even when not persisted. 2016-07-25 09:22:47 +05:30