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:
authorToon Claes <toon@gitlab.com>2018-03-16 15:19:46 +0300
committerToon Claes <toon@gitlab.com>2018-03-22 22:34:45 +0300
commit9ab43aa762d2f0b69a400da0d9e992f232179002 (patch)
tree636208c45423b56f5018dbc6686fce98a42af894 /app/helpers/application_helper.rb
parentc920d165f544d6c45a7cc357fcf330f48c10244c (diff)
Add read-only banner to all pages
When the database is in a read-only state, display a banner on each page informing the user they cannot write to that GitLab instance. Closes gitlab-org/gitlab-ce#43937.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 3ddf8eb3369..701be97ee96 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -323,4 +323,11 @@ module ApplicationHelper
def locale_path
asset_path("locale/#{Gitlab::I18n.locale}/app.js")
end
+
+ # Overridden in EE
+ def read_only_message
+ return unless Gitlab::Database.read_only?
+
+ _('You are on a read-only GitLab instance.')
+ end
end