diff options
author | Chris <ccbrown112@gmail.com> | 2018-02-09 10:04:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 10:04:48 -0600 |
commit | a6309aaf48e216fe5f6779188071d4b621b643b6 (patch) | |
tree | 9abbac7f172822e2286c755725fe3533cde8de8a /api/license.go | |
parent | 7e8106b95c11a4187f8c00256f3067433d20b24e (diff) | |
download | chat-a6309aaf48e216fe5f6779188071d4b621b643b6.tar.gz chat-a6309aaf48e216fe5f6779188071d4b621b643b6.tar.bz2 chat-a6309aaf48e216fe5f6779188071d4b621b643b6.zip |
Remove license globals entirely (#8229)
* remove license globals entirely
* fix infinite recursion
* test fix
Diffstat (limited to 'api/license.go')
-rw-r--r-- | api/license.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/api/license.go b/api/license.go index 8eb7803e1..432442ad6 100644 --- a/api/license.go +++ b/api/license.go @@ -9,7 +9,6 @@ import ( "net/http" "github.com/mattermost/mattermost-server/model" - "github.com/mattermost/mattermost-server/utils" ) func (api *API) InitLicense() { @@ -83,7 +82,7 @@ func removeLicense(c *Context, w http.ResponseWriter, r *http.Request) { func getClientLicenceConfig(c *Context, w http.ResponseWriter, r *http.Request) { useSanitizedLicense := !c.App.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) - etag := utils.GetClientLicenseEtag(useSanitizedLicense) + etag := c.App.GetClientLicenseEtag(useSanitizedLicense) if c.HandleEtag(etag, "Get Client License Config", w, r) { return } @@ -91,9 +90,9 @@ func getClientLicenceConfig(c *Context, w http.ResponseWriter, r *http.Request) var clientLicense map[string]string if useSanitizedLicense { - clientLicense = utils.ClientLicense() + clientLicense = c.App.ClientLicense() } else { - clientLicense = utils.GetSanitizedClientLicense() + clientLicense = c.App.GetSanitizedClientLicense() } w.Header().Set(model.HEADER_ETAG_SERVER, etag) |