MM-27930 - Cloud license feature (#15297)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f6bce5b32a
Коммит
e33ab02e1a
@@ -82,6 +82,7 @@ type Features struct {
|
|||||||
LockTeammateNameDisplay *bool `json:"lock_teammate_name_display"`
|
LockTeammateNameDisplay *bool `json:"lock_teammate_name_display"`
|
||||||
EnterprisePlugins *bool `json:"enterprise_plugins"`
|
EnterprisePlugins *bool `json:"enterprise_plugins"`
|
||||||
AdvancedLogging *bool `json:"advanced_logging"`
|
AdvancedLogging *bool `json:"advanced_logging"`
|
||||||
|
Cloud *bool `json:"cloud"`
|
||||||
|
|
||||||
// after we enabled more features we'll need to control them with this
|
// after we enabled more features we'll need to control them with this
|
||||||
FutureFeatures *bool `json:"future_features"`
|
FutureFeatures *bool `json:"future_features"`
|
||||||
@@ -110,6 +111,7 @@ func (f *Features) ToMap() map[string]interface{} {
|
|||||||
"lock_teammate_name_display": *f.LockTeammateNameDisplay,
|
"lock_teammate_name_display": *f.LockTeammateNameDisplay,
|
||||||
"enterprise_plugins": *f.EnterprisePlugins,
|
"enterprise_plugins": *f.EnterprisePlugins,
|
||||||
"advanced_logging": *f.AdvancedLogging,
|
"advanced_logging": *f.AdvancedLogging,
|
||||||
|
"cloud": *f.Cloud,
|
||||||
"future": *f.FutureFeatures,
|
"future": *f.FutureFeatures,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,6 +220,10 @@ func (f *Features) SetDefaults() {
|
|||||||
if f.AdvancedLogging == nil {
|
if f.AdvancedLogging == nil {
|
||||||
f.AdvancedLogging = NewBool(*f.FutureFeatures)
|
f.AdvancedLogging = NewBool(*f.FutureFeatures)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if f.Cloud == nil {
|
||||||
|
f.Cloud = NewBool(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *License) IsExpired() bool {
|
func (l *License) IsExpired() bool {
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ func GetClientLicense(l *model.License) map[string]string {
|
|||||||
props["GuestAccountsPermissions"] = strconv.FormatBool(*l.Features.GuestAccountsPermissions)
|
props["GuestAccountsPermissions"] = strconv.FormatBool(*l.Features.GuestAccountsPermissions)
|
||||||
props["CustomTermsOfService"] = strconv.FormatBool(*l.Features.CustomTermsOfService)
|
props["CustomTermsOfService"] = strconv.FormatBool(*l.Features.CustomTermsOfService)
|
||||||
props["LockTeammateNameDisplay"] = strconv.FormatBool(*l.Features.LockTeammateNameDisplay)
|
props["LockTeammateNameDisplay"] = strconv.FormatBool(*l.Features.LockTeammateNameDisplay)
|
||||||
|
props["Cloud"] = strconv.FormatBool(*l.Features.Cloud)
|
||||||
}
|
}
|
||||||
|
|
||||||
return props
|
return props
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user