diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 21:07:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 21:07:55 +0300 |
commit | 603c7d4cac5e28bc1c75e50c23ed2cbe56f1aafc (patch) | |
tree | 907f5b8ee1b6f5aad396e95e3327a08400b9e8ea /app/controllers/admin | |
parent | 120f4aaedc8fe830a3f572491d240d8ee6addefb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/services_controller.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 2f554519632..55817550b4b 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -3,11 +3,10 @@ class Admin::ServicesController < Admin::ApplicationController include ServiceParams - before_action :whitelist_query_limiting, only: [:index] before_action :service, only: [:edit, :update] def index - @services = services_templates + @services = Service.find_or_create_templates end def edit @@ -31,21 +30,8 @@ class Admin::ServicesController < Admin::ApplicationController private # rubocop: disable CodeReuse/ActiveRecord - def services_templates - Service.available_services_names.map do |service_name| - service_template = "#{service_name}_service".camelize.constantize - service_template.where(template: true).first_or_create - end - end - # rubocop: enable CodeReuse/ActiveRecord - - # rubocop: disable CodeReuse/ActiveRecord def service @service ||= Service.find_by(id: params[:id], template: true) end # rubocop: enable CodeReuse/ActiveRecord - - def whitelist_query_limiting - Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-foss/issues/42430') - end end |