Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-02-19 02:47:37 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-07 20:50:10 +0300
commit6253d4456a98613b419d766a03af7ff9b9fcf2af (patch)
tree6776fed77ca12bd4da5f8efec3301df124e08bd8 /app/controllers/projects/services_controller.rb
parentd9ca76559f740bdeac78bcd9a7cfe60df5ef9795 (diff)
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.rb5
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