summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-01-30 12:14:48 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-01-30 12:14:48 +0100
commitf862b4ae0faee80344faa583c74389c8e57fb7c2 (patch)
tree60fba79f2e2ca0c96a23ba0495a5cd04a42a0d19 /app/controllers
parent3d61cf9f1bfaa9d0ffd5cc36e54162c0f0b59c61 (diff)
parentf255313ea47b433b428b3b90452aede8c9a6618c (diff)
downloadgitlab-ce-f862b4ae0faee80344faa583c74389c8e57fb7c2.tar.gz
Merge remote-tracking branch 'origin/background-delete-process'
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 935f7d75c6a..4df5095bd94 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -93,6 +93,10 @@ class ProjectsController < ApplicationController
return
end
+ if @project.pending_delete?
+ flash[:alert] = "Project queued for delete."
+ end
+
respond_to do |format|
format.html do
if @project.repository_exists?
@@ -120,8 +124,8 @@ class ProjectsController < ApplicationController
def destroy
return access_denied! unless can?(current_user, :remove_project, @project)
- ::Projects::DestroyService.new(@project, current_user, {}).execute
- flash[:alert] = "Project '#{@project.name}' was deleted."
+ ::Projects::DestroyService.new(@project, current_user, {}).pending_delete!
+ flash[:alert] = "Project '#{@project.name}' will be deleted."
redirect_to dashboard_projects_path
rescue Projects::DestroyService::DestroyError => ex