summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorAlex Lossent <alexandre.lossent@cern.ch>2015-05-29 17:42:27 +0200
committerAlex Lossent <alexandre.lossent@cern.ch>2015-05-29 18:20:15 +0200
commit60225a067dd69e047088dc73f1227fce071311e3 (patch)
tree62931326d34fe15c89a534f6e0e1f985944dee2c /app/models
parenta3b60982e59b7a3be052a62b5d89393d12c64562 (diff)
downloadgitlab-ce-60225a067dd69e047088dc73f1227fce071311e3.tar.gz
Allow to configure a URL to show after sign out
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_setting.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index c465158f764..80463ee8841 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -19,6 +19,7 @@
# default_snippet_visibility :integer
# restricted_signup_domains :text
# user_oauth_applications :bool default(TRUE)
+# after_sign_out_path :string(255)
#
class ApplicationSetting < ActiveRecord::Base
@@ -31,6 +32,10 @@ class ApplicationSetting < ActiveRecord::Base
format: { with: /\A#{URI.regexp(%w(http https))}\z/, message: "should be a valid url" },
if: :home_page_url_column_exist
+ validates :after_sign_out_path,
+ allow_blank: true,
+ format: { with: /\A#{URI.regexp(%w(http https))}\z/, message: "should be a valid url" }
+
validates_each :restricted_visibility_levels do |record, attr, value|
unless value.nil?
value.each do |level|