From 835dd2635af46e3c8604fae8c9d383a80535c29e Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 30 Oct 2021 15:17:50 +0200 Subject: Update dependencies (#1628) --- .../mattermost-server/v6/model/auditconv.go | 59 ++++++++++++++++++++++ .../mattermost-server/v6/model/version.go | 2 + 2 files changed, 61 insertions(+) (limited to 'vendor/github.com/mattermost/mattermost-server') diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go b/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go index 38b4381e..8de21124 100644 --- a/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go +++ b/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go @@ -15,44 +15,88 @@ func AuditModelTypeConv(val interface{}) (newVal interface{}, converted bool) { switch v := val.(type) { case *Channel: return newAuditChannel(v), true + case Channel: + return newAuditChannel(&v), true case *Team: return newAuditTeam(v), true + case Team: + return newAuditTeam(&v), true case *User: return newAuditUser(v), true + case User: + return newAuditUser(&v), true + case *UserPatch: + return newAuditUserPatch(v), true + case UserPatch: + return newAuditUserPatch(&v), true case *Command: return newAuditCommand(v), true + case Command: + return newAuditCommand(&v), true case *CommandArgs: return newAuditCommandArgs(v), true + case CommandArgs: + return newAuditCommandArgs(&v), true case *Bot: return newAuditBot(v), true + case Bot: + return newAuditBot(&v), true case *ChannelModerationPatch: return newAuditChannelModerationPatch(v), true + case ChannelModerationPatch: + return newAuditChannelModerationPatch(&v), true case *Emoji: return newAuditEmoji(v), true + case Emoji: + return newAuditEmoji(&v), true case *FileInfo: return newAuditFileInfo(v), true + case FileInfo: + return newAuditFileInfo(&v), true case *Group: return newAuditGroup(v), true + case Group: + return newAuditGroup(&v), true case *Job: return newAuditJob(v), true + case Job: + return newAuditJob(&v), true case *OAuthApp: return newAuditOAuthApp(v), true + case OAuthApp: + return newAuditOAuthApp(&v), true case *Post: return newAuditPost(v), true + case Post: + return newAuditPost(&v), true case *Role: return newAuditRole(v), true + case Role: + return newAuditRole(&v), true case *Scheme: return newAuditScheme(v), true + case Scheme: + return newAuditScheme(&v), true case *SchemeRoles: return newAuditSchemeRoles(v), true + case SchemeRoles: + return newAuditSchemeRoles(&v), true case *Session: return newAuditSession(v), true + case Session: + return newAuditSession(&v), true case *IncomingWebhook: return newAuditIncomingWebhook(v), true + case IncomingWebhook: + return newAuditIncomingWebhook(&v), true case *OutgoingWebhook: return newAuditOutgoingWebhook(v), true + case OutgoingWebhook: + return newAuditOutgoingWebhook(&v), true case *RemoteCluster: return newRemoteCluster(v), true + case RemoteCluster: + return newRemoteCluster(&v), true } return val, false } @@ -128,6 +172,21 @@ func newAuditUser(u *User) auditUser { return user } +type auditUserPatch struct { + Name string +} + +// newAuditUserPatch creates a simplified representation of UserPatch for output to audit log. +func newAuditUserPatch(up *UserPatch) auditUserPatch { + var userPatch auditUserPatch + if up != nil { + if up.Username != nil { + userPatch.Name = *up.Username + } + } + return userPatch +} + func (u auditUser) MarshalJSONObject(enc *gojay.Encoder) { enc.StringKey("id", u.ID) enc.StringKey("name", u.Name) 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 b75a4e9c..13170dc5 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.0.2", + "6.0.1", "6.0.0", "5.39.0", "5.38.0", -- cgit v1.2.3