diff options
Diffstat (limited to 'utils/authorization.go')
-rw-r--r-- | utils/authorization.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/authorization.go b/utils/authorization.go index ba4768140..de288fc81 100644 --- a/utils/authorization.go +++ b/utils/authorization.go @@ -3,7 +3,9 @@ package utils -import "github.com/mattermost/platform/model" +import ( + "github.com/mattermost/platform/model" +) func SetDefaultRolesBasedOnConfig() { // Reset the roles to default to make this logic easier @@ -170,4 +172,11 @@ func SetDefaultRolesBasedOnConfig() { break } + if Cfg.TeamSettings.EnableTeamCreation { + model.ROLE_SYSTEM_USER.Permissions = append( + model.ROLE_SYSTEM_USER.Permissions, + model.PERMISSION_CREATE_TEAM.Id, + ) + } + } |