summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/permission.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/permission.go42
1 files changed, 42 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go b/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
index 9a3e4aae..e8d9d2c3 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
@@ -7,6 +7,7 @@ const (
PermissionScopeSystem = "system_scope"
PermissionScopeTeam = "team_scope"
PermissionScopeChannel = "channel_scope"
+ PermissionScopeGroup = "group_scope"
PermissionScopePlaybook = "playbook_scope"
PermissionScopeRun = "run_scope"
)
@@ -355,6 +356,11 @@ var PermissionRunView *Permission
// admin functions but not others
var PermissionManageSystem *Permission
+var PermissionCreateCustomGroup *Permission
+var PermissionManageCustomGroupMembers *Permission
+var PermissionEditCustomGroup *Permission
+var PermissionDeleteCustomGroup *Permission
+
var AllPermissions []*Permission
var DeprecatedPermissions []*Permission
@@ -1914,6 +1920,34 @@ func initializePermissions() {
PermissionScopeSystem,
}
+ PermissionCreateCustomGroup = &Permission{
+ "create_custom_group",
+ "authentication.permissions.create_custom_group.name",
+ "authentication.permissions.create_custom_group.description",
+ PermissionScopeSystem,
+ }
+
+ PermissionManageCustomGroupMembers = &Permission{
+ "manage_custom_group_members",
+ "authentication.permissions.manage_custom_group_members.name",
+ "authentication.permissions.manage_custom_group_members.description",
+ PermissionScopeGroup,
+ }
+
+ PermissionEditCustomGroup = &Permission{
+ "edit_custom_group",
+ "authentication.permissions.edit_custom_group.name",
+ "authentication.permissions.edit_custom_group.description",
+ PermissionScopeGroup,
+ }
+
+ PermissionDeleteCustomGroup = &Permission{
+ "delete_custom_group",
+ "authentication.permissions.delete_custom_group.name",
+ "authentication.permissions.delete_custom_group.description",
+ PermissionScopeGroup,
+ }
+
// Playbooks
PermissionPublicPlaybookCreate = &Permission{
"playbook_public_create",
@@ -2200,6 +2234,7 @@ func initializePermissions() {
PermissionGetLogs,
PermissionReadLicenseInformation,
PermissionManageLicenseInformation,
+ PermissionCreateCustomGroup,
}
TeamScopedPermissions := []*Permission{
@@ -2259,6 +2294,12 @@ func initializePermissions() {
PermissionUseGroupMentions,
}
+ GroupScopedPermissions := []*Permission{
+ PermissionManageCustomGroupMembers,
+ PermissionEditCustomGroup,
+ PermissionDeleteCustomGroup,
+ }
+
DeprecatedPermissions = []*Permission{
PermissionPermanentDeleteUser,
PermissionManageWebhooks,
@@ -2307,6 +2348,7 @@ func initializePermissions() {
AllPermissions = append(AllPermissions, ChannelScopedPermissions...)
AllPermissions = append(AllPermissions, SysconsoleReadPermissions...)
AllPermissions = append(AllPermissions, SysconsoleWritePermissions...)
+ AllPermissions = append(AllPermissions, GroupScopedPermissions...)
AllPermissions = append(AllPermissions, PlaybookScopedPermissions...)
AllPermissions = append(AllPermissions, RunScopedPermissions...)