diff options
author | manojmj <mmj@gitlab.com> | 2019-08-21 09:12:48 +0530 |
---|---|---|
committer | manojmj <mmj@gitlab.com> | 2019-08-21 09:12:48 +0530 |
commit | a07efbdfd0ccb332df124b6c40287bdccb26fd89 (patch) | |
tree | 032080a18bbf242684ee6854ae6284ec80d6cdae /app/controllers | |
parent | da573ae259f132e8a557001f54d58037f2534753 (diff) | |
download | gitlab-ce-a07efbdfd0ccb332df124b6c40287bdccb26fd89.tar.gz |
CE: Audit event for archiving and unarchiving projectsce-8631-archiving-a-project-should-create-an-audit-event
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| |