summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model/role.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/role.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/role.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/role.go b/vendor/github.com/mattermost/mattermost-server/v6/model/role.go
index 0dcb405c..37edec4f 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/role.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/role.go
@@ -4,6 +4,7 @@
package model
import (
+ "fmt"
"strings"
)
@@ -42,6 +43,8 @@ func init() {
ChannelUserRoleId,
ChannelAdminRoleId,
+ CustomGroupUserRoleId,
+
PlaybookAdminRoleId,
PlaybookMemberRoleId,
RunAdminRoleId,
@@ -367,6 +370,8 @@ const (
ChannelUserRoleId = "channel_user"
ChannelAdminRoleId = "channel_admin"
+ CustomGroupUserRoleId = "custom_group_user"
+
PlaybookAdminRoleId = "playbook_admin"
PlaybookMemberRoleId = "playbook_member"
RunAdminRoleId = "run_admin"
@@ -379,6 +384,7 @@ const (
RoleScopeSystem RoleScope = "System"
RoleScopeTeam RoleScope = "Team"
RoleScopeChannel RoleScope = "Channel"
+ RoleScopeGroup RoleScope = "Group"
RoleTypeGuest RoleType = "Guest"
RoleTypeUser RoleType = "User"
@@ -683,6 +689,13 @@ func IsValidRoleName(roleName string) bool {
func MakeDefaultRoles() map[string]*Role {
roles := make(map[string]*Role)
+ roles[CustomGroupUserRoleId] = &Role{
+ Name: CustomGroupUserRoleId,
+ DisplayName: fmt.Sprintf("authentication.roles.%s.name", CustomGroupUserRoleId),
+ Description: fmt.Sprintf("authentication.roles.%s.description", CustomGroupUserRoleId),
+ Permissions: []string{},
+ }
+
roles[ChannelGuestRoleId] = &Role{
Name: "channel_guest",
DisplayName: "authentication.roles.channel_guest.name",
@@ -895,6 +908,10 @@ func MakeDefaultRoles() map[string]*Role {
PermissionCreateGroupChannel.Id,
PermissionViewMembers.Id,
PermissionCreateTeam.Id,
+ PermissionCreateCustomGroup.Id,
+ PermissionEditCustomGroup.Id,
+ PermissionDeleteCustomGroup.Id,
+ PermissionManageCustomGroupMembers.Id,
},
SchemeManaged: true,
BuiltIn: true,