summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFabio Pitino <fpitino@gitlab.com>2019-06-28 17:27:07 +0100
committerFabio Pitino <fpitino@gitlab.com>2019-07-10 12:08:45 +0200
commita7821dd910fd385a66cfe6c840c37c7b11263410 (patch)
treeb92de339bf035a7535bd85d11578e333ebb2e8b6 /app
parent0cd59a756cdee7aac8915f3e96ba4f065e5cbc9c (diff)
downloadgitlab-ce-a7821dd910fd385a66cfe6c840c37c7b11263410.tar.gz
Drop feature to take ownership of a trigger token
Removing API and frontend interactions that allowed users to take ownership of a trigger token. Removed mentions from the documentation.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/triggers_controller.rb12
-rw-r--r--app/views/projects/triggers/_trigger.html.haml3
2 files changed, 1 insertions, 14 deletions
diff --git a/app/controllers/projects/triggers_controller.rb b/app/controllers/projects/triggers_controller.rb
index 284e119ca06..7159d0243a3 100644
--- a/app/controllers/projects/triggers_controller.rb
+++ b/app/controllers/projects/triggers_controller.rb
@@ -4,7 +4,7 @@ class Projects::TriggersController < Projects::ApplicationController
before_action :authorize_admin_build!
before_action :authorize_manage_trigger!, except: [:index, :create]
before_action :authorize_admin_trigger!, only: [:edit, :update]
- before_action :trigger, only: [:take_ownership, :edit, :update, :destroy]
+ before_action :trigger, only: [:edit, :update, :destroy]
layout 'project_settings'
@@ -24,16 +24,6 @@ class Projects::TriggersController < Projects::ApplicationController
redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers')
end
- def take_ownership
- if trigger.update(owner: current_user)
- flash[:notice] = _('Trigger was re-assigned.')
- else
- flash[:alert] = _('You could not take ownership of trigger.')
- end
-
- redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers')
- end
-
def edit
end
diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml
index 6f6f1e5e0c5..7367a96f8e4 100644
--- a/app/views/projects/triggers/_trigger.html.haml
+++ b/app/views/projects/triggers/_trigger.html.haml
@@ -30,10 +30,7 @@
Never
%td.text-right.trigger-actions
- - take_ownership_confirmation = "By taking ownership you will bind this trigger to your user account. With this the trigger will have access to all your projects as if it was you. Are you sure?"
- revoke_trigger_confirmation = "By revoking a trigger you will break any processes making use of it. Are you sure?"
- - if trigger.owner != current_user && can?(current_user, :manage_trigger, trigger)
- = link_to 'Take ownership', take_ownership_project_trigger_path(@project, trigger), data: { confirm: take_ownership_confirmation }, method: :post, class: "btn btn-default btn-sm btn-trigger-take-ownership"
- if can?(current_user, :admin_trigger, trigger)
= link_to edit_project_trigger_path(@project, trigger), method: :get, title: "Edit", class: "btn btn-default btn-sm" do
%i.fa.fa-pencil