mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-21290: Adds licensing feature for LockTeammateNameDisplay. (#13431)
This commit is contained in:
@@ -61,6 +61,7 @@ type Features struct {
|
||||
CustomTermsOfService *bool `json:"custom_terms_of_service"`
|
||||
GuestAccountsPermissions *bool `json:"guest_accounts_permissions"`
|
||||
IDLoadedPushNotifications *bool `json:"id_loaded"`
|
||||
LockTeammateNameDisplay *bool `json:"lock_teammate_name_display"`
|
||||
|
||||
// after we enabled more features we'll need to control them with this
|
||||
FutureFeatures *bool `json:"future_features"`
|
||||
@@ -85,6 +86,7 @@ func (f *Features) ToMap() map[string]interface{} {
|
||||
"custom_permissions_schemes": *f.CustomPermissionsSchemes,
|
||||
"guest_accounts_permissions": *f.GuestAccountsPermissions,
|
||||
"id_loaded": *f.IDLoadedPushNotifications,
|
||||
"lock_teammate_name_display": *f.LockTeammateNameDisplay,
|
||||
"future": *f.FutureFeatures,
|
||||
}
|
||||
}
|
||||
@@ -177,6 +179,10 @@ func (f *Features) SetDefaults() {
|
||||
if f.IDLoadedPushNotifications == nil {
|
||||
f.IDLoadedPushNotifications = NewBool(*f.FutureFeatures)
|
||||
}
|
||||
|
||||
if f.LockTeammateNameDisplay == nil {
|
||||
f.LockTeammateNameDisplay = NewBool(*f.FutureFeatures)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *License) IsExpired() bool {
|
||||
|
||||
@@ -157,6 +157,7 @@ func GetClientLicense(l *model.License) map[string]string {
|
||||
props["CustomPermissionsSchemes"] = strconv.FormatBool(*l.Features.CustomPermissionsSchemes)
|
||||
props["GuestAccountsPermissions"] = strconv.FormatBool(*l.Features.GuestAccountsPermissions)
|
||||
props["CustomTermsOfService"] = strconv.FormatBool(*l.Features.CustomTermsOfService)
|
||||
props["LockTeammateNameDisplay"] = strconv.FormatBool(*l.Features.LockTeammateNameDisplay)
|
||||
}
|
||||
|
||||
return props
|
||||
|
||||
Reference in New Issue
Block a user