diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-08-22 16:06:41 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-08-22 16:06:41 +0000 |
commit | fdd5177ac3d85bedb7b28f71942d220c9a3edff7 (patch) | |
tree | 83a47024b73d6c0b6d1053ede6ae06cc3e9cb973 /app/controllers | |
parent | c1d315d4264e7fd5cad2af624a434db662186f93 (diff) | |
parent | a07efbdfd0ccb332df124b6c40287bdccb26fd89 (diff) | |
download | gitlab-ce-fdd5177ac3d85bedb7b28f71942d220c9a3edff7.tar.gz |
Merge branch 'ce-8631-archiving-a-project-should-create-an-audit-event' into 'master'
CE: Archiving a project should create an audit event
See merge request gitlab-org/gitlab-ce!32039
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects_controller.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e04cbf10470..5f335de4d6b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -29,6 +29,7 @@ class ProjectsController < Projects::ApplicationController # Authorize before_action :authorize_admin_project!, only: [:edit, :update, :housekeeping, :download_export, :export, :remove_export, :generate_new_export] + before_action :authorize_archive_project!, only: [:archive, :unarchive] before_action :event_filter, only: [:show, :activity] layout :determine_layout @@ -164,8 +165,6 @@ class ProjectsController < Projects::ApplicationController end def archive - return access_denied! unless can?(current_user, :archive_project, @project) - ::Projects::UpdateService.new(@project, current_user, archived: true).execute respond_to do |format| @@ -174,8 +173,6 @@ class ProjectsController < Projects::ApplicationController end def unarchive - return access_denied! unless can?(current_user, :archive_project, @project) - ::Projects::UpdateService.new(@project, current_user, archived: false).execute respond_to do |format| |