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.go146
1 files changed, 143 insertions, 3 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 6c10bab0..9a3e4aae 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
@@ -4,9 +4,11 @@
package model
const (
- PermissionScopeSystem = "system_scope"
- PermissionScopeTeam = "team_scope"
- PermissionScopeChannel = "channel_scope"
+ PermissionScopeSystem = "system_scope"
+ PermissionScopeTeam = "team_scope"
+ PermissionScopeChannel = "channel_scope"
+ PermissionScopePlaybook = "playbook_scope"
+ PermissionScopeRun = "run_scope"
)
type Permission struct {
@@ -331,6 +333,23 @@ var PermissionSysconsoleWriteExperimentalFeatureFlags *Permission
var PermissionSysconsoleReadExperimentalBleve *Permission
var PermissionSysconsoleWriteExperimentalBleve *Permission
+var PermissionPublicPlaybookCreate *Permission
+var PermissionPublicPlaybookManageProperties *Permission
+var PermissionPublicPlaybookManageMembers *Permission
+var PermissionPublicPlaybookView *Permission
+var PermissionPublicPlaybookMakePrivate *Permission
+
+var PermissionPrivatePlaybookCreate *Permission
+var PermissionPrivatePlaybookManageProperties *Permission
+var PermissionPrivatePlaybookManageMembers *Permission
+var PermissionPrivatePlaybookView *Permission
+var PermissionPrivatePlaybookMakePublic *Permission
+
+var PermissionRunCreate *Permission
+var PermissionRunManageProperties *Permission
+var PermissionRunManageMembers *Permission
+var PermissionRunView *Permission
+
// General permission that encompasses all system admin functions
// in the future this could be broken up to allow access to some
// admin functions but not others
@@ -1895,6 +1914,105 @@ func initializePermissions() {
PermissionScopeSystem,
}
+ // Playbooks
+ PermissionPublicPlaybookCreate = &Permission{
+ "playbook_public_create",
+ "",
+ "",
+ PermissionScopeTeam,
+ }
+
+ PermissionPublicPlaybookManageProperties = &Permission{
+ "playbook_public_manage_properties",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionPublicPlaybookManageMembers = &Permission{
+ "playbook_public_manage_members",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionPublicPlaybookView = &Permission{
+ "playbook_public_view",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionPublicPlaybookMakePrivate = &Permission{
+ "playbook_public_make_private",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionPrivatePlaybookCreate = &Permission{
+ "playbook_private_create",
+ "",
+ "",
+ PermissionScopeTeam,
+ }
+
+ PermissionPrivatePlaybookManageProperties = &Permission{
+ "playbook_private_manage_properties",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionPrivatePlaybookManageMembers = &Permission{
+ "playbook_private_manage_members",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionPrivatePlaybookView = &Permission{
+ "playbook_private_view",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionPrivatePlaybookMakePublic = &Permission{
+ "playbook_private_make_public",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionRunCreate = &Permission{
+ "run_create",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
+ PermissionRunManageProperties = &Permission{
+ "run_manage_properties",
+ "",
+ "",
+ PermissionScopeRun,
+ }
+
+ PermissionRunManageMembers = &Permission{
+ "run_manage_members",
+ "",
+ "",
+ PermissionScopeRun,
+ }
+
+ PermissionRunView = &Permission{
+ "run_view",
+ "",
+ "",
+ PermissionScopeRun,
+ }
+
SysconsoleReadPermissions = []*Permission{
PermissionSysconsoleReadAboutEditionAndLicense,
PermissionSysconsoleReadBilling,
@@ -2108,6 +2226,8 @@ func initializePermissions() {
PermissionViewTeam,
PermissionViewMembers,
PermissionInviteGuest,
+ PermissionPublicPlaybookCreate,
+ PermissionPrivatePlaybookCreate,
}
ChannelScopedPermissions := []*Permission{
@@ -2163,12 +2283,32 @@ func initializePermissions() {
PermissionSysconsoleWriteCompliance,
}
+ PlaybookScopedPermissions := []*Permission{
+ PermissionPublicPlaybookManageProperties,
+ PermissionPublicPlaybookManageMembers,
+ PermissionPublicPlaybookView,
+ PermissionPublicPlaybookMakePrivate,
+ PermissionPrivatePlaybookManageProperties,
+ PermissionPrivatePlaybookManageMembers,
+ PermissionPrivatePlaybookView,
+ PermissionPrivatePlaybookMakePublic,
+ PermissionRunCreate,
+ }
+
+ RunScopedPermissions := []*Permission{
+ PermissionRunManageProperties,
+ PermissionRunManageMembers,
+ PermissionRunView,
+ }
+
AllPermissions = []*Permission{}
AllPermissions = append(AllPermissions, SystemScopedPermissionsMinusSysconsole...)
AllPermissions = append(AllPermissions, TeamScopedPermissions...)
AllPermissions = append(AllPermissions, ChannelScopedPermissions...)
AllPermissions = append(AllPermissions, SysconsoleReadPermissions...)
AllPermissions = append(AllPermissions, SysconsoleWritePermissions...)
+ AllPermissions = append(AllPermissions, PlaybookScopedPermissions...)
+ AllPermissions = append(AllPermissions, RunScopedPermissions...)
ChannelModeratedPermissions = []string{
PermissionCreatePost.Id,