diff --git a/app/views/modules/_flash_messages.html.erb b/app/views/modules/_flash_messages.html.erb
index 949306053b..ea7932a256 100644
--- a/app/views/modules/_flash_messages.html.erb
+++ b/app/views/modules/_flash_messages.html.erb
@@ -14,42 +14,48 @@ Unless required by applicable law or agreed to in writing, software distributed
--- END LICENSE_HEADER BLOCK ---
%>
-<% if Settings&.flash_message&.message %>
- <% flash[Settings.flash_message.type || :error] = Settings.flash_message.message.html_safe %>
-<% end %>
+
+ <% if Settings&.repository_read_only_mode && current_ability.can?(:read, Admin::Collection) %>
+
+
<%= Settings.repository_read_only_mode_message %>
+
+ <% end %>
+
+ <% if Settings&.flash_message&.message %>
+ <% flash[Settings.flash_message.type || :error] = Settings.flash_message.message.html_safe %>
+ <% end %>
-<% if defined? flash and !flash.empty? %>
-
- <% [:success, :notice, :error, :alert].each do |type| %>
- <%- alert_class = case type
- when :success then "alert-success"
- when :notice then "alert-info"
- when :alert then "alert-warning"
- when :error then "alert-danger"
- else "alert-#{type}"
- end
- -%>
- <% if flash[type] %>
-
-
- <% Array(flash[type]).each do |msg| %>
-
<%= msg %>
- <% end %>
-
+ <% if defined? flash and !flash.empty? %>
+ <% [:success, :notice, :error, :alert].each do |type| %>
+ <%- alert_class = case type
+ when :success then "alert-success"
+ when :notice then "alert-info"
+ when :alert then "alert-warning"
+ when :error then "alert-danger"
+ else "alert-#{type}"
+ end
+ -%>
+ <% if flash[type] %>
+
+
+ <% Array(flash[type]).each do |msg| %>
+
<%= msg %>
+ <% end %>
+
+ <% end %>
<% end %>
<% end %>
-
-<% end %>
-
-
-
Could not complete log in. Possible causes and solutions are:
-
-
Cookies are not set, which might happen if you've never visited this website before.
- Please open <%= link_to main_app.root_url, main_app.root_url, target: :_blank %> in a new window, then come back and refresh this page.
-
An ad blocker is preventing successful login.
- Please disable ad blockers for this site then refresh this page.
-
+
+
+
Could not complete log in. Possible causes and solutions are:
+
+
Cookies are not set, which might happen if you've never visited this website before.
+ Please open <%= link_to main_app.root_url, main_app.root_url, target: :_blank %> in a new window, then come back and refresh this page.
+
An ad blocker is preventing successful login.
+ Please disable ad blockers for this site then refresh this page.
+
+
<% content_for :page_scripts do %>
diff --git a/config/settings.yml b/config/settings.yml
index 687ea27dcd..b84809d24f 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -135,3 +135,4 @@ derivative:
# Does not affect actions that only affect the database
# This is useful when running long migrations
repository_read_only_mode: false
+repository_read_only_mode_message: "🚧 Read-only mode: all content editing has been disabled 🚧"