github.com/psyb0t/mattermost-server@v4.6.1-0.20180125161845-5503a1351abf+incompatible/app/role.go (about) 1 // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package app 5 6 import ( 7 "github.com/mattermost/mattermost-server/model" 8 "github.com/mattermost/mattermost-server/utils" 9 ) 10 11 func (a *App) Role(id string) *model.Role { 12 return a.roles[id] 13 } 14 15 // Updates the roles based on the app config and the global license check. You may need to invoke 16 // this when license changes are made. 17 func (a *App) SetDefaultRolesBasedOnConfig() { 18 a.roles = utils.DefaultRolesBasedOnConfig(a.Config()) 19 }