summaryrefslogtreecommitdiffstats
path: root/app/role.go
blob: 9f271ea7a24d1167a12670f608829840bf15ea63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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)
}