Files
mostlymatter/app/role.go
Chris a6309aaf48 Remove license globals entirely (#8229)
* remove license globals entirely

* fix infinite recursion

* test fix
2018-02-09 10:04:48 -06:00

18 строки
427 B
Go

// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package app
import (
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
func (a *App) Role(id string) *model.Role {
return a.roles[id]
}
func (a *App) setDefaultRolesBasedOnConfig() {
a.roles = utils.DefaultRolesBasedOnConfig(a.Config(), a.License() != nil)
}