diff options
author | Toon Claes <toon@gitlab.com> | 2018-03-16 15:19:46 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2018-03-22 22:34:45 +0300 |
commit | 9ab43aa762d2f0b69a400da0d9e992f232179002 (patch) | |
tree | 636208c45423b56f5018dbc6686fce98a42af894 /app/controllers | |
parent | c920d165f544d6c45a7cc357fcf330f48c10244c (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/controllers')
-rw-r--r-- | app/controllers/admin/application_controller.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb index c27f2ee3c09..a4648b33cfa 100644 --- a/app/controllers/admin/application_controller.rb +++ b/app/controllers/admin/application_controller.rb @@ -3,23 +3,9 @@ # Automatically sets the layout and ensures an administrator is logged in class Admin::ApplicationController < ApplicationController before_action :authenticate_admin! - before_action :display_read_only_information layout 'admin' def authenticate_admin! render_404 unless current_user.admin? end - - def display_read_only_information - return unless Gitlab::Database.read_only? - - flash.now[:notice] = read_only_message - end - - private - - # Overridden in EE - def read_only_message - _('You are on a read-only GitLab instance.') - end end |