@@ -96,7 +108,7 @@ export default class ConfigurationSettings extends AdminSettings {
helpText={
}
value={this.state.siteURL}
diff --git a/webapp/components/error_bar.jsx b/webapp/components/error_bar.jsx
index edb929f20d7..108f5e0884d 100644
--- a/webapp/components/error_bar.jsx
+++ b/webapp/components/error_bar.jsx
@@ -13,11 +13,13 @@ const StatTypes = Constants.StatTypes;
import React from 'react';
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
+import {Link} from 'react-router';
const EXPIRING_ERROR = 'error_bar.expiring';
const EXPIRED_ERROR = 'error_bar.expired';
const PAST_GRACE_ERROR = 'error_bar.past_grace';
const RENEWAL_LINK = 'https://licensing.mattermost.com/renew';
+const SITE_URL_ERROR = 'error_bar.site_url';
const BAR_DEVELOPER_TYPE = 'developer';
const BAR_CRITICAL_TYPE = 'critical';
@@ -38,7 +40,11 @@ export default class ErrorBar extends React.Component {
isSystemAdmin = Utils.isSystemAdmin(user.roles);
}
- if (!ErrorStore.getIgnoreNotification() && global.window.mm_config.SendEmailNotifications === 'false') {
+ const errorIgnored = ErrorStore.getIgnoreNotification();
+
+ if (!errorIgnored && isSystemAdmin && global.mm_config.SiteURL === '') {
+ ErrorStore.storeLastError({notification: true, message: SITE_URL_ERROR});
+ } else if (!errorIgnored && global.window.mm_config.SendEmailNotifications === 'false') {
ErrorStore.storeLastError({notification: true, message: Utils.localizeMessage('error_bar.preview_mode', 'Preview Mode: Email notifications have not been configured')});
} else if (isLicensePastGracePeriod()) {
if (isSystemAdmin) {
@@ -157,6 +163,45 @@ export default class ErrorBar extends React.Component {
defaultMessage='Enterprise license is expired and some features may be disabled. Please contact your System Administrator for details.'
/>
);
+ } else if (message === SITE_URL_ERROR) {
+ let id;
+ let defaultMessage;
+ if (global.mm_config.EnableSignUpWithGitLab === 'true') {
+ id = 'error_bar.site_url_gitlab';
+ defaultMessage = '{docsLink} is now a required setting. Please configure it in the System Console or in gitlab.rb if you\'re using GitLab Mattermost.';
+ } else {
+ id = 'error_bar.site_url';
+ defaultMessage = '{docsLink} is now a required setting. Please configure it in {link}.';
+ }
+
+ message = (
+
+
+
+ ),
+ link: (
+
+
+
+ )
+ }}
+ />
+ );
}
return (
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index d24bbe11b13..e8c93f11cd3 100644
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -1291,6 +1291,10 @@
"error_bar.expiring": "Enterprise license expires on {date}. Please renew.",
"error_bar.past_grace": "Enterprise license is expired and some features may be disabled. Please contact your System Administrator for details.",
"error_bar.preview_mode": "Preview Mode: Email notifications have not been configured",
+ "error_bar.site_url": "{docsLink} is now a required setting. Please configure it in {link}.",
+ "error_bar.site_url.docsLink": "Site URL",
+ "error_bar.site_url.link": "the System Console",
+ "error_bar.site_url_gitlab": "{docsLink} is now a required setting. Please configure it in the System Console or in gitlab.rb if you're using GitLab Mattermost.",
"file_attachment.download": "Download",
"file_info_preview.size": "Size ",
"file_info_preview.type": "File type ",
diff --git a/webapp/stores/error_store.jsx b/webapp/stores/error_store.jsx
index e37de40ac7f..3b0bb023fca 100644
--- a/webapp/stores/error_store.jsx
+++ b/webapp/stores/error_store.jsx
@@ -62,11 +62,11 @@ class ErrorStoreClass extends EventEmitter {
BrowserStore.setGlobalItem('last_error_conn', count);
}
- clearLastError() {
+ clearLastError(force) {
var lastError = this.getLastError();
// preview message can only be cleared by clearNotificationError
- if (lastError && lastError.notification) {
+ if (!force && lastError && lastError.notification) {
return;
}