mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fully deprecate CallsEnabled feature flag (#27826)
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
499977d0f0
commit
453eabb54a
@ -1226,10 +1226,6 @@ func (ch *Channels) getPluginStateOverride(pluginID string) (bool, bool) {
|
||||
if !ch.cfgSvc.Config().FeatureFlags.AppsEnabled {
|
||||
return true, false
|
||||
}
|
||||
case model.PluginIdCalls:
|
||||
if !ch.cfgSvc.Config().FeatureFlags.CallsEnabled {
|
||||
return true, false
|
||||
}
|
||||
}
|
||||
|
||||
return false, false
|
||||
|
@ -1378,62 +1378,6 @@ func TestGetPluginStateOverride(t *testing.T) {
|
||||
require.False(t, value)
|
||||
})
|
||||
|
||||
t.Run("calls override", func(t *testing.T) {
|
||||
t.Run("on-prem", func(t *testing.T) {
|
||||
overrides, value := th.App.ch.getPluginStateOverride("com.mattermost.calls")
|
||||
require.False(t, overrides)
|
||||
require.False(t, value)
|
||||
})
|
||||
|
||||
t.Run("Cloud, without enabled flag", func(t *testing.T) {
|
||||
os.Setenv("MM_CLOUD_INSTALLATION_ID", "test")
|
||||
defer os.Unsetenv("MM_CLOUD_INSTALLATION_ID")
|
||||
overrides, value := th.App.ch.getPluginStateOverride("com.mattermost.calls")
|
||||
require.False(t, overrides)
|
||||
require.False(t, value)
|
||||
})
|
||||
|
||||
t.Run("Cloud, with enabled flag set to true", func(t *testing.T) {
|
||||
os.Setenv("MM_CLOUD_INSTALLATION_ID", "test")
|
||||
defer os.Unsetenv("MM_CLOUD_INSTALLATION_ID")
|
||||
os.Setenv("MM_FEATUREFLAGS_CALLSENABLED", "true")
|
||||
defer os.Unsetenv("MM_FEATUREFLAGS_CALLSENABLED")
|
||||
|
||||
th2 := Setup(t)
|
||||
defer th2.TearDown()
|
||||
|
||||
overrides, value := th2.App.ch.getPluginStateOverride("com.mattermost.calls")
|
||||
require.False(t, overrides)
|
||||
require.False(t, value)
|
||||
})
|
||||
|
||||
t.Run("Cloud, with enabled flag set to false", func(t *testing.T) {
|
||||
os.Setenv("MM_CLOUD_INSTALLATION_ID", "test")
|
||||
defer os.Unsetenv("MM_CLOUD_INSTALLATION_ID")
|
||||
os.Setenv("MM_FEATUREFLAGS_CALLSENABLED", "false")
|
||||
defer os.Unsetenv("MM_FEATUREFLAGS_CALLSENABLED")
|
||||
|
||||
th2 := Setup(t)
|
||||
defer th2.TearDown()
|
||||
|
||||
overrides, value := th2.App.ch.getPluginStateOverride("com.mattermost.calls")
|
||||
require.True(t, overrides)
|
||||
require.False(t, value)
|
||||
})
|
||||
|
||||
t.Run("On-prem, with enabled flag set to false", func(t *testing.T) {
|
||||
os.Setenv("MM_FEATUREFLAGS_CALLSENABLED", "false")
|
||||
defer os.Unsetenv("MM_FEATUREFLAGS_CALLSENABLED")
|
||||
|
||||
th2 := Setup(t)
|
||||
defer th2.TearDown()
|
||||
|
||||
overrides, value := th2.App.ch.getPluginStateOverride("com.mattermost.calls")
|
||||
require.True(t, overrides)
|
||||
require.False(t, value)
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("apps override", func(t *testing.T) {
|
||||
t.Run("without enabled flag", func(t *testing.T) {
|
||||
overrides, value := th.App.ch.getPluginStateOverride("com.mattermost.apps")
|
||||
|
@ -24,9 +24,6 @@ type FeatureFlags struct {
|
||||
|
||||
PermalinkPreviews bool
|
||||
|
||||
// CallsEnabled controls whether or not the Calls plugin should be enabled
|
||||
CallsEnabled bool
|
||||
|
||||
NormalizeLdapDNs bool
|
||||
|
||||
// Enable WYSIWYG text editor
|
||||
@ -63,7 +60,6 @@ func (f *FeatureFlags) SetDefaults() {
|
||||
f.EnableRemoteClusterService = false
|
||||
f.AppsEnabled = false
|
||||
f.NormalizeLdapDNs = false
|
||||
f.CallsEnabled = true
|
||||
f.DeprecateCloudFree = false
|
||||
f.WysiwygEditor = false
|
||||
f.OnboardingTourTips = true
|
||||
|
Loading…
Reference in New Issue
Block a user