diff options
author | Josh Frye <joshfng@gmail.com> | 2016-01-22 11:13:37 -0800 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-01-29 09:14:16 -0500 |
commit | 91b9cbff8de538c2966bca94c517ee6aa346f79b (patch) | |
tree | 9bce929d696fca03c86bba32f73fdb057541b024 /app/controllers/projects_controller.rb | |
parent | 227728712ec5b469a36dbaf8c9511098b4817741 (diff) | |
download | gitlab-ce-91b9cbff8de538c2966bca94c517ee6aa346f79b.tar.gz |
First pass at deleting projects in the background.
Diffstat (limited to 'app/controllers/projects_controller.rb')
-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 |