Remove Custom statuses feature flag (#17075)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9cc5089af8
Коммит
633d82f0ac
@@ -117,7 +117,7 @@ func updateUserCustomStatus(c *Context, w http.ResponseWriter, r *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !c.App.Config().FeatureFlags.CustomUserStatuses || !*c.App.Config().TeamSettings.EnableCustomUserStatuses {
|
if !*c.App.Config().TeamSettings.EnableCustomUserStatuses {
|
||||||
c.Err = model.NewAppError("updateUserCustomStatus", "api.custom_status.disabled", nil, "", http.StatusNotImplemented)
|
c.Err = model.NewAppError("updateUserCustomStatus", "api.custom_status.disabled", nil, "", http.StatusNotImplemented)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@ func removeUserCustomStatus(c *Context, w http.ResponseWriter, r *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !c.App.Config().FeatureFlags.CustomUserStatuses || !*c.App.Config().TeamSettings.EnableCustomUserStatuses {
|
if !*c.App.Config().TeamSettings.EnableCustomUserStatuses {
|
||||||
c.Err = model.NewAppError("removeUserCustomStatus", "api.custom_status.disabled", nil, "", http.StatusNotImplemented)
|
c.Err = model.NewAppError("removeUserCustomStatus", "api.custom_status.disabled", nil, "", http.StatusNotImplemented)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@ func removeUserRecentCustomStatus(c *Context, w http.ResponseWriter, r *http.Req
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !c.App.Config().FeatureFlags.CustomUserStatuses || !*c.App.Config().TeamSettings.EnableCustomUserStatuses {
|
if !*c.App.Config().TeamSettings.EnableCustomUserStatuses {
|
||||||
c.Err = model.NewAppError("removeUserRecentCustomStatus", "api.custom_status.disabled", nil, "", http.StatusNotImplemented)
|
c.Err = model.NewAppError("removeUserRecentCustomStatus", "api.custom_status.disabled", nil, "", http.StatusNotImplemented)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ func (a *App) ListAutocompleteCommands(teamID string, T i18n.TranslateFunc) ([]*
|
|||||||
seen := make(map[string]bool)
|
seen := make(map[string]bool)
|
||||||
|
|
||||||
// Disable custom status slash command if the feature or the setting is off
|
// Disable custom status slash command if the feature or the setting is off
|
||||||
if !a.Config().FeatureFlags.CustomUserStatuses || !*a.Config().TeamSettings.EnableCustomUserStatuses {
|
if !*a.Config().TeamSettings.EnableCustomUserStatuses {
|
||||||
seen[CmdCustomStatusTrigger] = true
|
seen[CmdCustomStatusTrigger] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func (*CustomStatusProvider) GetCommand(a *app.App, T i18n.TranslateFunc) *model
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (*CustomStatusProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse {
|
func (*CustomStatusProvider) DoCommand(a *app.App, args *model.CommandArgs, message string) *model.CommandResponse {
|
||||||
if !a.Config().FeatureFlags.CustomUserStatuses || !*a.Config().TeamSettings.EnableCustomUserStatuses {
|
if !*a.Config().TeamSettings.EnableCustomUserStatuses {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
|
|||||||
props := GenerateLimitedClientConfig(c, telemetryID, license)
|
props := GenerateLimitedClientConfig(c, telemetryID, license)
|
||||||
|
|
||||||
props["SiteURL"] = strings.TrimRight(*c.ServiceSettings.SiteURL, "/")
|
props["SiteURL"] = strings.TrimRight(*c.ServiceSettings.SiteURL, "/")
|
||||||
props["EnableCustomUserStatuses"] = strconv.FormatBool(c.FeatureFlags.CustomUserStatuses && *c.TeamSettings.EnableCustomUserStatuses)
|
props["EnableCustomUserStatuses"] = strconv.FormatBool(*c.TeamSettings.EnableCustomUserStatuses)
|
||||||
props["EnableUserDeactivation"] = strconv.FormatBool(*c.TeamSettings.EnableUserDeactivation)
|
props["EnableUserDeactivation"] = strconv.FormatBool(*c.TeamSettings.EnableUserDeactivation)
|
||||||
props["RestrictDirectMessage"] = *c.TeamSettings.RestrictDirectMessage
|
props["RestrictDirectMessage"] = *c.TeamSettings.RestrictDirectMessage
|
||||||
props["EnableXToLeaveChannelsFromLHS"] = strconv.FormatBool(*c.TeamSettings.EnableXToLeaveChannelsFromLHS)
|
props["EnableXToLeaveChannelsFromLHS"] = strconv.FormatBool(*c.TeamSettings.EnableXToLeaveChannelsFromLHS)
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ type FeatureFlags struct {
|
|||||||
// Toggle on and off support for Collapsed Threads
|
// Toggle on and off support for Collapsed Threads
|
||||||
CollapsedThreads bool
|
CollapsedThreads bool
|
||||||
|
|
||||||
// Toggle on and off support for Custom User Statuses
|
|
||||||
CustomUserStatuses bool
|
|
||||||
|
|
||||||
// Feature flags to control plugin versions
|
// Feature flags to control plugin versions
|
||||||
PluginIncidentManagement string `plugin_id:"com.mattermost.plugin-incident-management"`
|
PluginIncidentManagement string `plugin_id:"com.mattermost.plugin-incident-management"`
|
||||||
// Toggle on and off support for Files search
|
// Toggle on and off support for Files search
|
||||||
@@ -34,7 +31,6 @@ func (f *FeatureFlags) SetDefaults() {
|
|||||||
f.CloudDelinquentEmailJobsEnabled = false
|
f.CloudDelinquentEmailJobsEnabled = false
|
||||||
f.CollapsedThreads = false
|
f.CollapsedThreads = false
|
||||||
f.FilesSearch = false
|
f.FilesSearch = false
|
||||||
f.CustomUserStatuses = false
|
|
||||||
f.PluginIncidentManagement = "1.5.2"
|
f.PluginIncidentManagement = "1.5.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user