add App.License, remove utils.IsLicensed / utils.License calls (#8203)

This commit is contained in:
Chris
2018-02-06 17:25:49 -06:00
committed by GitHub
parent 034dbc07e3
commit 1ec295f88c
21 changed files with 56 additions and 48 deletions

View File

@@ -9,7 +9,6 @@ import (
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
const (
@@ -80,7 +79,7 @@ func (me *ClusterDiscoveryService) Stop() {
}
func (a *App) IsLeader() bool {
if utils.IsLicensed() && *a.Config().ClusterSettings.Enable && a.Cluster != nil {
if a.License() != nil && *a.Config().ClusterSettings.Enable && a.Cluster != nil {
return a.Cluster.IsLeader()
} else {
return true