diff --git a/api4/system.go b/api4/system.go
index 0c0fc7d123..2ad408e13c 100644
--- a/api4/system.go
+++ b/api4/system.go
@@ -45,7 +45,18 @@ func getSystemPing(c *Context, w http.ResponseWriter, r *http.Request) {
actualGoroutines := runtime.NumGoroutine()
if *utils.Cfg.ServiceSettings.GoroutineHealthThreshold <= 0 || actualGoroutines <= *utils.Cfg.ServiceSettings.GoroutineHealthThreshold {
- ReturnStatusOK(w)
+ m := make(map[string]string)
+ m[model.STATUS] = model.STATUS_OK
+
+ reqs := utils.Cfg.ClientRequirements
+ m["AndroidLatestVersion"] = reqs.AndroidLatestVersion
+ m["AndroidMinVersion"] = reqs.AndroidMinVersion
+ m["DesktopLatestVersion"] = reqs.DesktopLatestVersion
+ m["DesktopMinVersion"] = reqs.DesktopMinVersion
+ m["IosLatestVersion"] = reqs.IosLatestVersion
+ m["IosMinVersion"] = reqs.IosMinVersion
+
+ w.Write([]byte(model.MapToJson(m)))
} else {
rdata := map[string]string{}
rdata["status"] = "unhealthy"
diff --git a/app/diagnostics.go b/app/diagnostics.go
index 1df5b1feb7..9946ce9f12 100644
--- a/app/diagnostics.go
+++ b/app/diagnostics.go
@@ -19,6 +19,7 @@ const (
TRACK_CONFIG_SERVICE = "config_service"
TRACK_CONFIG_TEAM = "config_team"
+ TRACK_CONFIG_CLIENT_REQ = "config_client_requirements"
TRACK_CONFIG_SQL = "config_sql"
TRACK_CONFIG_LOG = "config_log"
TRACK_CONFIG_FILE = "config_file"
@@ -244,6 +245,15 @@ func trackConfig() {
"restrict_private_channel_manage_members": *utils.Cfg.TeamSettings.RestrictPrivateChannelManageMembers,
})
+ SendDiagnostic(TRACK_CONFIG_CLIENT_REQ, map[string]interface{}{
+ "android_latest_version": utils.Cfg.ClientRequirements.AndroidLatestVersion,
+ "android_min_version": utils.Cfg.ClientRequirements.AndroidMinVersion,
+ "desktop_latest_version": utils.Cfg.ClientRequirements.DesktopLatestVersion,
+ "desktop_min_version": utils.Cfg.ClientRequirements.DesktopMinVersion,
+ "ios_latest_version": utils.Cfg.ClientRequirements.IosLatestVersion,
+ "ios_min_version": utils.Cfg.ClientRequirements.IosMinVersion,
+ })
+
SendDiagnostic(TRACK_CONFIG_SQL, map[string]interface{}{
"driver_name": utils.Cfg.SqlSettings.DriverName,
"trace": utils.Cfg.SqlSettings.Trace,
diff --git a/config/default.json b/config/default.json
index 7f03e035bb..e0d3ec53c5 100644
--- a/config/default.json
+++ b/config/default.json
@@ -76,6 +76,14 @@
"MaxNotificationsPerChannel": 1000,
"TeammateNameDisplay": "username"
},
+ "ClientRequirements": {
+ "AndroidLatestVersion": "",
+ "AndroidMinVersion": "",
+ "DesktopLatestVersion": "",
+ "DesktopMinVersion": "",
+ "IosLatestVersion": "",
+ "IosMinVersion": ""
+ },
"SqlSettings": {
"DriverName": "mysql",
"DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s",
diff --git a/model/config.go b/model/config.go
index b3365a49a4..7404e96bed 100644
--- a/model/config.go
+++ b/model/config.go
@@ -351,6 +351,15 @@ type TeamSettings struct {
TeammateNameDisplay *string
}
+type ClientRequirements struct {
+ AndroidLatestVersion string
+ AndroidMinVersion string
+ DesktopLatestVersion string
+ DesktopMinVersion string
+ IosLatestVersion string
+ IosMinVersion string
+}
+
type LdapSettings struct {
// Basic
Enable *bool
@@ -469,6 +478,7 @@ type PluginSettings struct {
type Config struct {
ServiceSettings ServiceSettings
TeamSettings TeamSettings
+ ClientRequirements ClientRequirements
SqlSettings SqlSettings
LogSettings LogSettings
PasswordSettings PasswordSettings
@@ -518,6 +528,10 @@ func (o *Config) GetSSOService(service string) *SSOSettings {
return nil
}
+func (o *Config) getClientRequirementsFromConfig() ClientRequirements {
+ return o.ClientRequirements
+}
+
func ConfigFromJson(data io.Reader) *Config {
decoder := json.NewDecoder(data)
var o Config
diff --git a/utils/config.go b/utils/config.go
index 399e3a54c7..14f827983d 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -437,6 +437,13 @@ func getClientConfig(c *model.Config) map[string]string {
props["RestrictPrivateChannelManageMembers"] = *c.TeamSettings.RestrictPrivateChannelManageMembers
props["TeammateNameDisplay"] = *c.TeamSettings.TeammateNameDisplay
+ props["AndroidLatestVersion"] = c.ClientRequirements.AndroidLatestVersion
+ props["AndroidMinVersion"] = c.ClientRequirements.AndroidMinVersion
+ props["DesktopLatestVersion"] = c.ClientRequirements.DesktopLatestVersion
+ props["DesktopMinVersion"] = c.ClientRequirements.DesktopMinVersion
+ props["IosLatestVersion"] = c.ClientRequirements.IosLatestVersion
+ props["IosMinVersion"] = c.ClientRequirements.IosMinVersion
+
props["EnableOAuthServiceProvider"] = strconv.FormatBool(c.ServiceSettings.EnableOAuthServiceProvider)
props["GoogleDeveloperKey"] = c.ServiceSettings.GoogleDeveloperKey
props["EnableIncomingWebhooks"] = strconv.FormatBool(c.ServiceSettings.EnableIncomingWebhooks)
diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx
index 97b63e9c62..9a726c65c0 100644
--- a/webapp/components/admin_console/admin_sidebar.jsx
+++ b/webapp/components/admin_console/admin_sidebar.jsx
@@ -277,6 +277,22 @@ export default class AdminSidebar extends React.Component {
);
}
+ const SHOW_CLIENT_VERSIONS = false;
+ let clientVersions = null;
+ if (SHOW_CLIENT_VERSIONS) {
+ clientVersions = (
+