diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-02-18 23:47:37 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-03-07 17:50:10 +0000 |
commit | 6253d4456a98613b419d766a03af7ff9b9fcf2af (patch) | |
tree | 6776fed77ca12bd4da5f8efec3301df124e08bd8 /app/controllers/projects/services_controller.rb | |
parent | d9ca76559f740bdeac78bcd9a7cfe60df5ef9795 (diff) | |
download | gitlab-ce-6253d4456a98613b419d766a03af7ff9b9fcf2af.tar.gz |
Backport changes from EE's GithubService integration
Adds detailed_status to pipeline hook data
Adds detailed_description option for Services
Integration edit page renders 404 if a service is disabled
Diffstat (limited to 'app/controllers/projects/services_controller.rb')
-rw-r--r-- | app/controllers/projects/services_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index daa5c88aae0..b0da0d4dac5 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -3,6 +3,7 @@ class Projects::ServicesController < Projects::ApplicationController # Authorize before_action :authorize_admin_project! + before_action :ensure_service_enabled before_action :service, only: [:edit, :update, :test] respond_to :html @@ -54,4 +55,8 @@ class Projects::ServicesController < Projects::ApplicationController def service @service ||= @project.find_or_initialize_service(params[:id]) end + + def ensure_service_enabled + render_404 unless service + end end |