Skip to content

A platform for community discussion. Free, open, simple.

DEV: Differentiate staff-writes-only banner (#18364)

Daniel Waterworth69d74ae508d6
diff --git a/app/assets/javascripts/discourse/app/components/global-notice.js b/app/assets/javascripts/discourse/app/components/global-notice.js
index 170421cb134..c0bd0bcd54f 100644
--- a/app/assets/javascripts/discourse/app/components/global-notice.js
+++ b/app/assets/javascripts/discourse/app/components/global-notice.js
@@ -77,6 +77,7 @@ export default Component.extend({
@discourseComputed(
"site.isReadOnly",
+ "site.isStaffWritesOnly",
"siteSettings.login_required",
"siteSettings.disable_emails",
"siteSettings.global_notice",
@@ -85,6 +86,7 @@ export default Component.extend({
)
notices(
isReadOnly,
+ isStaffWritesOnly,
loginRequired,
disableEmails,
globalNotice,
@@ -111,7 +113,14 @@ export default Component.extend({
);
}
- if (isReadOnly) {
+ if (isStaffWritesOnly) {
+ notices.push(
+ Notice.create({
+ text: I18n.t("staff_writes_only_mode.enabled"),
+ id: "alert-staff-writes-only",
+ })
+ );
+ } else if (isReadOnly) {
notices.push(
Notice.create({
text: I18n.t("read_only_mode.enabled"),
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 300e3234ad5..12cc1ac97c8 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -1838,6 +1838,8 @@ en:
enabled: "This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now."
login_disabled: "Login is disabled while the site is in read only mode."
logout_disabled: "Logout is disabled while the site is in read only mode."
+ staff_writes_only_mode:
+ enabled: "This site is in staff only mode. Please continue to browse, but replying, likes, and other actions are limited to staff members only."
too_few_topics_and_posts_notice_MF: >-
Let's <a href="https://blog.discourse.org/2014/08/building-a-discourse-community/">start the discussion!</a>
There {currentTopics, plural, one {is <strong>#</strong> topic} other {are <strong>#</strong> topics}} and