summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/channel.go8
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/channel_sidebar.go3
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/client4.go13
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/config.go26
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go18
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/migration.go1
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/oauth.go27
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/permission.go18
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/push_notification.go1
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/role.go2
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/session.go10
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/system.go7
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/team.go13
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/version.go2
14 files changed, 110 insertions, 39 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go b/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go
index 2f353c7c..350a9230 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go
@@ -178,6 +178,14 @@ func (o *Channel) DeleteAt_() float64 {
return float64(o.DeleteAt)
}
+func (o *Channel) LastPostAt_() float64 {
+ return float64(o.LastPostAt)
+}
+
+func (o *Channel) TotalMsgCount_() float64 {
+ return float64(o.TotalMsgCount)
+}
+
func (o *Channel) DeepCopy() *Channel {
copy := *o
if copy.SchemeId != nil {
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/channel_sidebar.go b/vendor/github.com/mattermost/mattermost-server/v6/model/channel_sidebar.go
index e434e174..d5d21112 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/channel_sidebar.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/channel_sidebar.go
@@ -37,12 +37,11 @@ const (
)
// SidebarCategory represents the corresponding DB table
-// SortOrder is never returned to the user and only used for queries
type SidebarCategory struct {
Id string `json:"id"`
UserId string `json:"user_id"`
TeamId string `json:"team_id"`
- SortOrder int64 `json:"-"`
+ SortOrder int64 `json:"sort_order"`
Sorting SidebarCategorySorting `json:"sorting"`
Type SidebarCategoryType `json:"type"`
DisplayName string `json:"display_name"`
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go b/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go
index beabda82..000c0b41 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go
@@ -7931,3 +7931,16 @@ func (c *Client4) GetUsersWithInvalidEmails(page, perPage int) ([]*User, *Respon
}
return list, BuildResponse(r), nil
}
+
+func (c *Client4) GetAppliedSchemaMigrations() ([]AppliedMigration, *Response, error) {
+ r, err := c.DoAPIGet(c.systemRoute()+"/schema/version", "")
+ if err != nil {
+ return nil, BuildResponse(r), err
+ }
+ defer closeBody(r)
+ var list []AppliedMigration
+ if jsonErr := json.NewDecoder(r.Body).Decode(&list); jsonErr != nil {
+ return nil, nil, NewAppError("GetUsers", "api.unmarshal_error", nil, jsonErr.Error(), http.StatusInternalServerError)
+ }
+ return list, BuildResponse(r), nil
+}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/config.go b/vendor/github.com/mattermost/mattermost-server/v6/model/config.go
index 04dfa4f5..3920bc1e 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/config.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/config.go
@@ -93,6 +93,9 @@ const (
EmailNotificationContentsFull = "full"
EmailNotificationContentsGeneric = "generic"
+ EmailSMTPDefaultServer = "localhost"
+ EmailSMTPDefaultPort = "10025"
+
SitenameMaxLength = 30
ServiceSettingsDefaultSiteURL = "http://localhost:8065"
@@ -128,9 +131,9 @@ const (
SupportSettingsDefaultTermsOfServiceLink = "https://mattermost.com/terms-of-use/"
SupportSettingsDefaultPrivacyPolicyLink = "https://mattermost.com/privacy-policy/"
- SupportSettingsDefaultAboutLink = "https://about.mattermost.com/default-about/"
- SupportSettingsDefaultHelpLink = "https://about.mattermost.com/default-help/"
- SupportSettingsDefaultReportAProblemLink = "https://about.mattermost.com/default-report-a-problem/"
+ SupportSettingsDefaultAboutLink = "https://docs.mattermost.com/about/product.html/"
+ SupportSettingsDefaultHelpLink = "https://mattermost.com/default-help/"
+ SupportSettingsDefaultReportAProblemLink = "https://mattermost.com/default-report-a-problem/"
SupportSettingsDefaultSupportEmail = ""
SupportSettingsDefaultReAcceptancePeriod = 365
@@ -167,8 +170,8 @@ const (
SamlSettingsDefaultCanonicalAlgorithm = SamlSettingsCanonicalAlgorithmC14n
NativeappSettingsDefaultAppDownloadLink = "https://mattermost.com/download/#mattermostApps"
- NativeappSettingsDefaultAndroidAppDownloadLink = "https://about.mattermost.com/mattermost-android-app/"
- NativeappSettingsDefaultIosAppDownloadLink = "https://about.mattermost.com/mattermost-ios-app/"
+ NativeappSettingsDefaultAndroidAppDownloadLink = "https://mattermost.com/mattermost-android-app/"
+ NativeappSettingsDefaultIosAppDownloadLink = "https://mattermost.com/mattermost-ios-app/"
ExperimentalSettingsDefaultLinkMetadataTimeoutMilliseconds = 5000
@@ -778,7 +781,7 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
}
if s.ThreadAutoFollow == nil {
- s.ThreadAutoFollow = NewBool(false)
+ s.ThreadAutoFollow = NewBool(true)
}
if s.CollapsedThreads == nil {
@@ -1598,11 +1601,11 @@ func (s *EmailSettings) SetDefaults(isUpdate bool) {
}
if s.SMTPServer == nil || *s.SMTPServer == "" {
- s.SMTPServer = NewString("localhost")
+ s.SMTPServer = NewString(EmailSMTPDefaultServer)
}
if s.SMTPPort == nil || *s.SMTPPort == "" {
- s.SMTPPort = NewString("10025")
+ s.SMTPPort = NewString(EmailSMTPDefaultPort)
}
if s.SMTPServerTimeout == nil || *s.SMTPServerTimeout == 0 {
@@ -1739,7 +1742,7 @@ type SupportSettings struct {
AboutLink *string `access:"site_customization,write_restrictable,cloud_restrictable"`
HelpLink *string `access:"site_customization,write_restrictable,cloud_restrictable"`
ReportAProblemLink *string `access:"site_customization,write_restrictable,cloud_restrictable"`
- SupportEmail *string `access:"site_customization"`
+ SupportEmail *string `access:"site_notifications"`
CustomTermsOfServiceEnabled *bool `access:"compliance_custom_terms_of_service"`
CustomTermsOfServiceReAcceptancePeriod *int `access:"compliance_custom_terms_of_service"`
EnableAskCommunityLink *bool `access:"site_customization"`
@@ -2748,6 +2751,11 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) {
s.PluginStates["focalboard"] = &PluginState{Enable: true}
}
+ if s.PluginStates["com.mattermost.apps"] == nil {
+ // Enable the Apps plugin by default
+ s.PluginStates["com.mattermost.apps"] = &PluginState{Enable: true}
+ }
+
if s.EnableMarketplace == nil {
s.EnableMarketplace = NewBool(PluginSettingsDefaultEnableMarketplace)
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go b/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go
index a2fe45bd..d89dd7c3 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go
@@ -38,9 +38,6 @@ type FeatureFlags struct {
PermalinkPreviews bool
- // Enable the Global Header
- GlobalHeader bool
-
// Determine whether when a user gets created, they'll have noisy notifications e.g. Send desktop notifications for all activity
NewAccountNoisy bool
@@ -56,17 +53,11 @@ type FeatureFlags struct {
// Enable Create First Channel
GuidedChannelCreation bool
- // Determine after which duration in hours to send a second invitation to someone that didn't join after the initial invite, possible values = ("48", "72")
- ResendInviteEmailInterval string
-
// A/B test for whether radio buttons or toggle button is more effective in in-screen invite to team modal ("none", "toggle")
InviteToTeam string
CustomGroups bool
- // Enable inline post editing
- InlinePostEditing bool
-
// Enable DataRetention for Boards
BoardsDataRetention bool
@@ -77,9 +68,6 @@ type FeatureFlags struct {
// Enable special onboarding flow for first admin
UseCaseOnboarding bool
- // Enable Workspace optimization dashboard
- WorkspaceOptimizationDashboard bool
-
// Enable GraphQL feature
GraphQL bool
}
@@ -90,26 +78,22 @@ func (f *FeatureFlags) SetDefaults() {
f.CloudDelinquentEmailJobsEnabled = false
f.CollapsedThreads = true
f.EnableRemoteClusterService = false
- f.AppsEnabled = false
+ f.AppsEnabled = true
f.AppBarEnabled = false
f.PluginApps = ""
f.PluginFocalboard = ""
f.PermalinkPreviews = true
- f.GlobalHeader = true
f.NewAccountNoisy = false
f.CallsMobile = false
f.BoardsFeatureFlags = ""
f.AddMembersToChannel = "top"
f.GuidedChannelCreation = false
- f.ResendInviteEmailInterval = ""
f.InviteToTeam = "none"
f.CustomGroups = true
- f.InlinePostEditing = false
f.BoardsDataRetention = false
f.NormalizeLdapDNs = false
f.EnableInactivityCheckJob = true
f.UseCaseOnboarding = true
- f.WorkspaceOptimizationDashboard = true
f.GraphQL = false
}
func (f *FeatureFlags) Plugins() map[string]string {
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/migration.go b/vendor/github.com/mattermost/mattermost-server/v6/model/migration.go
index 16172e50..4958f80e 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/migration.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/migration.go
@@ -37,4 +37,5 @@ const (
MigrationKeyAddIntegrationsSubsectionPermissions = "integrations_subsection_permissions"
MigrationKeyAddPlaybooksPermissions = "playbooks_permissions"
MigrationKeyAddCustomUserGroupsPermissions = "custom_groups_permissions"
+ MigrationKeyAddPlayboosksManageRolesPermissions = "playbooks_manage_roles"
)
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/oauth.go b/vendor/github.com/mattermost/mattermost-server/v6/model/oauth.go
index a3d7f95f..82dd8fb2 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/oauth.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/oauth.go
@@ -18,17 +18,18 @@ const (
)
type OAuthApp struct {
- Id string `json:"id"`
- CreatorId string `json:"creator_id"`
- CreateAt int64 `json:"create_at"`
- UpdateAt int64 `json:"update_at"`
- ClientSecret string `json:"client_secret"`
- Name string `json:"name"`
- Description string `json:"description"`
- IconURL string `json:"icon_url"`
- CallbackUrls StringArray `json:"callback_urls"`
- Homepage string `json:"homepage"`
- IsTrusted bool `json:"is_trusted"`
+ Id string `json:"id"`
+ CreatorId string `json:"creator_id"`
+ CreateAt int64 `json:"create_at"`
+ UpdateAt int64 `json:"update_at"`
+ ClientSecret string `json:"client_secret"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ IconURL string `json:"icon_url"`
+ CallbackUrls StringArray `json:"callback_urls"`
+ Homepage string `json:"homepage"`
+ IsTrusted bool `json:"is_trusted"`
+ MattermostAppID string `json:"mattermost_app_id"`
}
// IsValid validates the app and returns an error if it isn't configured
@@ -83,6 +84,10 @@ func (a *OAuthApp) IsValid() *AppError {
}
}
+ if len(a.MattermostAppID) > 32 {
+ return NewAppError("OAuthApp.IsValid", "model.oauth.is_valid.mattermost_app_id.app_error", nil, "app_id="+a.Id, http.StatusBadRequest)
+ }
+
return nil
}
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 e8d9d2c3..bf1f4023 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
@@ -337,12 +337,14 @@ var PermissionSysconsoleWriteExperimentalBleve *Permission
var PermissionPublicPlaybookCreate *Permission
var PermissionPublicPlaybookManageProperties *Permission
var PermissionPublicPlaybookManageMembers *Permission
+var PermissionPublicPlaybookManageRoles *Permission
var PermissionPublicPlaybookView *Permission
var PermissionPublicPlaybookMakePrivate *Permission
var PermissionPrivatePlaybookCreate *Permission
var PermissionPrivatePlaybookManageProperties *Permission
var PermissionPrivatePlaybookManageMembers *Permission
+var PermissionPrivatePlaybookManageRoles *Permission
var PermissionPrivatePlaybookView *Permission
var PermissionPrivatePlaybookMakePublic *Permission
@@ -1970,6 +1972,13 @@ func initializePermissions() {
PermissionScopePlaybook,
}
+ PermissionPublicPlaybookManageRoles = &Permission{
+ "playbook_public_manage_roles",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
PermissionPublicPlaybookView = &Permission{
"playbook_public_view",
"",
@@ -2005,6 +2014,13 @@ func initializePermissions() {
PermissionScopePlaybook,
}
+ PermissionPrivatePlaybookManageRoles = &Permission{
+ "playbook_private_manage_roles",
+ "",
+ "",
+ PermissionScopePlaybook,
+ }
+
PermissionPrivatePlaybookView = &Permission{
"playbook_private_view",
"",
@@ -2327,10 +2343,12 @@ func initializePermissions() {
PlaybookScopedPermissions := []*Permission{
PermissionPublicPlaybookManageProperties,
PermissionPublicPlaybookManageMembers,
+ PermissionPublicPlaybookManageRoles,
PermissionPublicPlaybookView,
PermissionPublicPlaybookMakePrivate,
PermissionPrivatePlaybookManageProperties,
PermissionPrivatePlaybookManageMembers,
+ PermissionPrivatePlaybookManageRoles,
PermissionPrivatePlaybookView,
PermissionPrivatePlaybookMakePublic,
PermissionRunCreate,
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/push_notification.go b/vendor/github.com/mattermost/mattermost-server/v6/model/push_notification.go
index d46c24ec..09a645ea 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/push_notification.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/push_notification.go
@@ -17,6 +17,7 @@ const (
PushTypeClear = "clear"
PushTypeUpdateBadge = "update_badge"
PushTypeSession = "session"
+ PushTypeTest = "test"
PushMessageV2 = "v2"
PushSoundNone = "none"
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 37edec4f..081e7b68 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/role.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/role.go
@@ -836,8 +836,10 @@ func MakeDefaultRoles() map[string]*Role {
Description: "authentication.roles.playbook_admin.description",
Permissions: []string{
PermissionPublicPlaybookManageMembers.Id,
+ PermissionPublicPlaybookManageRoles.Id,
PermissionPublicPlaybookManageProperties.Id,
PermissionPrivatePlaybookManageMembers.Id,
+ PermissionPrivatePlaybookManageRoles.Id,
PermissionPrivatePlaybookManageProperties.Id,
PermissionPublicPlaybookMakePrivate.Id,
},
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/session.go b/vendor/github.com/mattermost/mattermost-server/v6/model/session.go
index 36955583..fcf8eea1 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/session.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/session.go
@@ -24,6 +24,8 @@ const (
SessionPropUserAccessTokenId = "user_access_token_id"
SessionPropIsBot = "is_bot"
SessionPropIsBotValue = "true"
+ SessionPropOAuthAppID = "oauth_app_id"
+ SessionPropMattermostAppID = "mattermost_app_id"
SessionTypeUserAccessToken = "UserAccessToken"
SessionTypeCloudKey = "CloudKey"
SessionTypeRemoteclusterToken = "RemoteClusterToken"
@@ -218,3 +220,11 @@ func (s *Session) GetCSRF() string {
return s.Props["csrf"]
}
+
+func (s *Session) CreateAt_() float64 {
+ return float64(s.CreateAt)
+}
+
+func (s *Session) ExpiresAt_() float64 {
+ return float64(s.ExpiresAt)
+}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/system.go b/vendor/github.com/mattermost/mattermost-server/v6/model/system.go
index b1b9ca19..29fef336 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/system.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/system.go
@@ -79,6 +79,8 @@ type ServerBusyState struct {
type SupportPacket struct {
ServerOS string `yaml:"server_os"`
ServerArchitecture string `yaml:"server_architecture"`
+ ServerVersion string `yaml:"server_version"`
+ BuildHash string `yaml:"build_hash,omitempty"`
DatabaseType string `yaml:"database_type"`
DatabaseVersion string `yaml:"database_version"`
LdapVendorName string `yaml:"ldap_vendor_name,omitempty"`
@@ -173,3 +175,8 @@ type WarnMetricStatus struct {
type SendWarnMetricAck struct {
ForceAck bool `json:"forceAck"`
}
+
+type AppliedMigration struct {
+ Version int `json:"version"`
+ Name string `json:"name"`
+}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/team.go b/vendor/github.com/mattermost/mattermost-server/v6/model/team.go
index a5aa7f94..7a21ffc7 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/team.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/team.go
@@ -251,3 +251,16 @@ func (o *Team) Patch(patch *TeamPatch) {
func (o *Team) IsGroupConstrained() bool {
return o.GroupConstrained != nil && *o.GroupConstrained
}
+
+// The following are some GraphQL methods necessary to return the
+// data in float64 type. The spec doesn't support 64 bit integers,
+// so we have to pass the data in float64. The _ at the end is
+// a hack to keep the attribute name same in GraphQL schema.
+
+func (o *Team) UpdateAt_() float64 {
+ return float64(o.UpdateAt)
+}
+
+func (o *Team) LastTeamIconUpdate_() float64 {
+ return float64(o.LastTeamIconUpdate)
+}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/version.go b/vendor/github.com/mattermost/mattermost-server/v6/model/version.go
index 144b0303..7400c373 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/version.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/version.go
@@ -13,6 +13,8 @@ import (
// It should be maintained in chronological order with most current
// release at the front of the list.
var versions = []string{
+ "6.6.1",
+ "6.6.0",
"6.5.0",
"6.4.0",
"6.3.0",