summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-01-18 20:24:14 +0100
committerGitHub <noreply@github.com>2022-01-18 20:24:14 +0100
commitaad60c882e16cd2c8769a49e6d9f87a040590d62 (patch)
tree3bfe1f8953b40f9beb39c69db3a7647ea6de54d2 /vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go
parentfecca575078a21dedb0cab213dde7fd97161c0fa (diff)
downloadmatterbridge-msglm-aad60c882e16cd2c8769a49e6d9f87a040590d62.tar.gz
matterbridge-msglm-aad60c882e16cd2c8769a49e6d9f87a040590d62.tar.bz2
matterbridge-msglm-aad60c882e16cd2c8769a49e6d9f87a040590d62.zip
Bump github.com/mattermost/mattermost-server/v6 from 6.1.0 to 6.3.0 (#1686)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.1.0 to 6.3.0. - [Release notes](https://github.com/mattermost/mattermost-server/releases) - [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md) - [Commits](https://github.com/mattermost/mattermost-server/compare/v6.1.0...v6.3.0) --- updated-dependencies: - dependency-name: github.com/mattermost/mattermost-server/v6 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go102
1 files changed, 66 insertions, 36 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go b/vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go
index c861c1e6..b2bc713c 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/scheme.go
@@ -14,23 +14,29 @@ const (
SchemeDescriptionMaxLength = 1024
SchemeScopeTeam = "team"
SchemeScopeChannel = "channel"
+ SchemeScopePlaybook = "playbook"
+ SchemeScopeRun = "run"
)
type Scheme struct {
- Id string `json:"id"`
- Name string `json:"name"`
- DisplayName string `json:"display_name"`
- Description string `json:"description"`
- CreateAt int64 `json:"create_at"`
- UpdateAt int64 `json:"update_at"`
- DeleteAt int64 `json:"delete_at"`
- Scope string `json:"scope"`
- DefaultTeamAdminRole string `json:"default_team_admin_role"`
- DefaultTeamUserRole string `json:"default_team_user_role"`
- DefaultChannelAdminRole string `json:"default_channel_admin_role"`
- DefaultChannelUserRole string `json:"default_channel_user_role"`
- DefaultTeamGuestRole string `json:"default_team_guest_role"`
- DefaultChannelGuestRole string `json:"default_channel_guest_role"`
+ Id string `json:"id"`
+ Name string `json:"name"`
+ DisplayName string `json:"display_name"`
+ Description string `json:"description"`
+ CreateAt int64 `json:"create_at"`
+ UpdateAt int64 `json:"update_at"`
+ DeleteAt int64 `json:"delete_at"`
+ Scope string `json:"scope"`
+ DefaultTeamAdminRole string `json:"default_team_admin_role"`
+ DefaultTeamUserRole string `json:"default_team_user_role"`
+ DefaultChannelAdminRole string `json:"default_channel_admin_role"`
+ DefaultChannelUserRole string `json:"default_channel_user_role"`
+ DefaultTeamGuestRole string `json:"default_team_guest_role"`
+ DefaultChannelGuestRole string `json:"default_channel_guest_role"`
+ DefaultPlaybookAdminRole string `json:"default_playbook_admin_role"`
+ DefaultPlaybookMemberRole string `json:"default_playbook_member_role"`
+ DefaultRunAdminRole string `json:"default_run_admin_role"`
+ DefaultRunMemberRole string `json:"default_run_member_role"`
}
type SchemePatch struct {
@@ -45,31 +51,39 @@ type SchemeIDPatch struct {
// SchemeConveyor is used for importing and exporting a Scheme and its associated Roles.
type SchemeConveyor struct {
- Name string `json:"name"`
- DisplayName string `json:"display_name"`
- Description string `json:"description"`
- Scope string `json:"scope"`
- TeamAdmin string `json:"default_team_admin_role"`
- TeamUser string `json:"default_team_user_role"`
- TeamGuest string `json:"default_team_guest_role"`
- ChannelAdmin string `json:"default_channel_admin_role"`
- ChannelUser string `json:"default_channel_user_role"`
- ChannelGuest string `json:"default_channel_guest_role"`
- Roles []*Role `json:"roles"`
+ Name string `json:"name"`
+ DisplayName string `json:"display_name"`
+ Description string `json:"description"`
+ Scope string `json:"scope"`
+ TeamAdmin string `json:"default_team_admin_role"`
+ TeamUser string `json:"default_team_user_role"`
+ TeamGuest string `json:"default_team_guest_role"`
+ ChannelAdmin string `json:"default_channel_admin_role"`
+ ChannelUser string `json:"default_channel_user_role"`
+ ChannelGuest string `json:"default_channel_guest_role"`
+ PlaybookAdmin string `json:"default_playbook_admin_role"`
+ PlaybookMember string `json:"default_playbook_member_role"`
+ RunAdmin string `json:"default_run_admin_role"`
+ RunMember string `json:"default_run_member_role"`
+ Roles []*Role `json:"roles"`
}
func (sc *SchemeConveyor) Scheme() *Scheme {
return &Scheme{
- DisplayName: sc.DisplayName,
- Name: sc.Name,
- Description: sc.Description,
- Scope: sc.Scope,
- DefaultTeamAdminRole: sc.TeamAdmin,
- DefaultTeamUserRole: sc.TeamUser,
- DefaultTeamGuestRole: sc.TeamGuest,
- DefaultChannelAdminRole: sc.ChannelAdmin,
- DefaultChannelUserRole: sc.ChannelUser,
- DefaultChannelGuestRole: sc.ChannelGuest,
+ DisplayName: sc.DisplayName,
+ Name: sc.Name,
+ Description: sc.Description,
+ Scope: sc.Scope,
+ DefaultTeamAdminRole: sc.TeamAdmin,
+ DefaultTeamUserRole: sc.TeamUser,
+ DefaultTeamGuestRole: sc.TeamGuest,
+ DefaultChannelAdminRole: sc.ChannelAdmin,
+ DefaultChannelUserRole: sc.ChannelUser,
+ DefaultChannelGuestRole: sc.ChannelGuest,
+ DefaultPlaybookAdminRole: sc.PlaybookAdmin,
+ DefaultPlaybookMemberRole: sc.PlaybookMember,
+ DefaultRunAdminRole: sc.RunAdmin,
+ DefaultRunMemberRole: sc.RunMember,
}
}
@@ -101,7 +115,7 @@ func (scheme *Scheme) IsValidForCreate() bool {
}
switch scheme.Scope {
- case SchemeScopeTeam, SchemeScopeChannel:
+ case SchemeScopeTeam, SchemeScopeChannel, SchemeScopePlaybook, SchemeScopeRun:
default:
return false
}
@@ -130,6 +144,22 @@ func (scheme *Scheme) IsValidForCreate() bool {
if !IsValidRoleName(scheme.DefaultTeamGuestRole) {
return false
}
+
+ if !IsValidRoleName(scheme.DefaultPlaybookAdminRole) {
+ return false
+ }
+
+ if !IsValidRoleName(scheme.DefaultPlaybookMemberRole) {
+ return false
+ }
+
+ if !IsValidRoleName(scheme.DefaultRunAdminRole) {
+ return false
+ }
+
+ if !IsValidRoleName(scheme.DefaultRunMemberRole) {
+ return false
+ }
}
if scheme.Scope == SchemeScopeChannel {