github.com/coincircle/mattermost-server@v4.8.1-0.20180321182714-9d701c704416+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  func (a *App) setDefaultRolesBasedOnConfig() {
    16  	a.roles = utils.DefaultRolesBasedOnConfig(a.Config(), a.License() != nil)
    17  }