summaryrefslogtreecommitdiffstats
path: root/model/license.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-05-17 16:29:31 +0100
committerGitHub <noreply@github.com>2018-05-17 16:29:31 +0100
commit463065c8ba4b4aece7fd9b7764ba917df3e73292 (patch)
tree2dfbe1dee29ce78eac853f64dde247338d44c917 /model/license.go
parenta09dc68e1d99394f5d636284e0580dd17b2773b3 (diff)
downloadchat-463065c8ba4b4aece7fd9b7764ba917df3e73292.tar.gz
chat-463065c8ba4b4aece7fd9b7764ba917df3e73292.tar.bz2
chat-463065c8ba4b4aece7fd9b7764ba917df3e73292.zip
MM-10606: License feature flag for custom schemes. (#8804)
* MM-10606: Add new field to license for custom schemes. * Add feature flag to license check for Schemes.
Diffstat (limited to 'model/license.go')
-rw-r--r--model/license.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/model/license.go b/model/license.go
index 942a18d55..dea326287 100644
--- a/model/license.go
+++ b/model/license.go
@@ -56,6 +56,7 @@ type Features struct {
EmailNotificationContents *bool `json:"email_notification_contents"`
DataRetention *bool `json:"data_retention"`
MessageExport *bool `json:"message_export"`
+ CustomPermissionsSchemes *bool `json:"custom_permissions_schemes"`
// after we enabled more features for webrtc we'll need to control them with this
FutureFeatures *bool `json:"future_features"`
@@ -78,6 +79,7 @@ func (f *Features) ToMap() map[string]interface{} {
"email_notification_contents": *f.EmailNotificationContents,
"data_retention": *f.DataRetention,
"message_export": *f.MessageExport,
+ "custom_permissions_schemes": *f.CustomPermissionsSchemes,
"future": *f.FutureFeatures,
}
}
@@ -158,6 +160,10 @@ func (f *Features) SetDefaults() {
if f.MessageExport == nil {
f.MessageExport = NewBool(*f.FutureFeatures)
}
+
+ if f.CustomPermissionsSchemes == nil {
+ f.CustomPermissionsSchemes = NewBool(*f.FutureFeatures)
+ }
}
func (l *License) IsExpired() bool {