summaryrefslogtreecommitdiff
path: root/app/services/application_settings
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-01-20 13:00:19 -0200
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-01-23 16:22:33 -0200
commitae057666bf9894660ce1cb480595f2686f1d9ae5 (patch)
treef2c92373defc75d58bad3d861548e512648cc4f7 /app/services/application_settings
parent3a54128d1f1ac1fa0779fe7309bd043ffa947ab5 (diff)
downloadgitlab-ce-ae057666bf9894660ce1cb480595f2686f1d9ae5.tar.gz
EE backport for new application settings service
Diffstat (limited to 'app/services/application_settings')
-rw-r--r--app/services/application_settings/base_service.rb7
-rw-r--r--app/services/application_settings/update_service.rb7
2 files changed, 14 insertions, 0 deletions
diff --git a/app/services/application_settings/base_service.rb b/app/services/application_settings/base_service.rb
new file mode 100644
index 00000000000..2bcc7d7c08b
--- /dev/null
+++ b/app/services/application_settings/base_service.rb
@@ -0,0 +1,7 @@
+module ApplicationSettings
+ class BaseService < ::BaseService
+ def initialize(application_setting, user, params = {})
+ @application_setting, @current_user, @params = application_setting, user, params.dup
+ end
+ end
+end
diff --git a/app/services/application_settings/update_service.rb b/app/services/application_settings/update_service.rb
new file mode 100644
index 00000000000..61589a07250
--- /dev/null
+++ b/app/services/application_settings/update_service.rb
@@ -0,0 +1,7 @@
+module ApplicationSettings
+ class UpdateService < ApplicationSettings::BaseService
+ def execute
+ @application_setting.update(@params)
+ end
+ end
+end