diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-01-30 12:14:48 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-01-30 12:14:48 +0100 |
commit | f862b4ae0faee80344faa583c74389c8e57fb7c2 (patch) | |
tree | 60fba79f2e2ca0c96a23ba0495a5cd04a42a0d19 /app/controllers | |
parent | 3d61cf9f1bfaa9d0ffd5cc36e54162c0f0b59c61 (diff) | |
parent | f255313ea47b433b428b3b90452aede8c9a6618c (diff) | |
download | gitlab-ce-f862b4ae0faee80344faa583c74389c8e57fb7c2.tar.gz |
Merge remote-tracking branch 'origin/background-delete-process'
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects_controller.rb | 8 |
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 |