MM-23015: Enable or disable group mentions (#14010)
* MM-23015: Enable or disable group mentions + show them in suggestion list Co-authored-by: Catalin Tomai <catalin.tomai@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0bfb063c78
Коммит
b90f4f46e2
@@ -30,17 +30,18 @@ var groupSourcesRequiringRemoteID = []GroupSource{
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Description string `json:"description"`
|
||||
Source GroupSource `json:"source"`
|
||||
RemoteId string `json:"remote_id"`
|
||||
CreateAt int64 `json:"create_at"`
|
||||
UpdateAt int64 `json:"update_at"`
|
||||
DeleteAt int64 `json:"delete_at"`
|
||||
HasSyncables bool `db:"-" json:"has_syncables"`
|
||||
MemberCount *int `db:"-" json:"member_count,omitempty"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Description string `json:"description"`
|
||||
Source GroupSource `json:"source"`
|
||||
RemoteId string `json:"remote_id"`
|
||||
CreateAt int64 `json:"create_at"`
|
||||
UpdateAt int64 `json:"update_at"`
|
||||
DeleteAt int64 `json:"delete_at"`
|
||||
HasSyncables bool `db:"-" json:"has_syncables"`
|
||||
MemberCount *int `db:"-" json:"member_count,omitempty"`
|
||||
AllowReference bool `json:"allow_reference"`
|
||||
}
|
||||
|
||||
type GroupWithSchemeAdmin struct {
|
||||
@@ -48,10 +49,21 @@ type GroupWithSchemeAdmin struct {
|
||||
SchemeAdmin *bool `db:"SyncableSchemeAdmin" json:"scheme_admin,omitempty"`
|
||||
}
|
||||
|
||||
type GroupsAssociatedToChannelWithSchemeAdmin struct {
|
||||
ChannelId string `json:"channel_id"`
|
||||
Group
|
||||
SchemeAdmin *bool `db:"SyncableSchemeAdmin" json:"scheme_admin,omitempty"`
|
||||
}
|
||||
type GroupsAssociatedToChannel struct {
|
||||
ChannelId string `json:"channel_id"`
|
||||
Groups []*GroupWithSchemeAdmin `json:"groups"`
|
||||
}
|
||||
|
||||
type GroupPatch struct {
|
||||
Name *string `json:"name"`
|
||||
DisplayName *string `json:"display_name"`
|
||||
Description *string `json:"description"`
|
||||
Name *string `json:"name"`
|
||||
DisplayName *string `json:"display_name"`
|
||||
Description *string `json:"description"`
|
||||
AllowReference *bool `json:"allow_reference"`
|
||||
}
|
||||
|
||||
type LdapGroupSearchOpts struct {
|
||||
@@ -65,6 +77,7 @@ type GroupSearchOpts struct {
|
||||
NotAssociatedToTeam string
|
||||
NotAssociatedToChannel string
|
||||
IncludeMemberCount bool
|
||||
FilterAllowReference bool
|
||||
PageOpts *PageOpts
|
||||
}
|
||||
|
||||
@@ -83,6 +96,9 @@ func (group *Group) Patch(patch *GroupPatch) {
|
||||
if patch.Description != nil {
|
||||
group.Description = *patch.Description
|
||||
}
|
||||
if patch.AllowReference != nil {
|
||||
group.AllowReference = *patch.AllowReference
|
||||
}
|
||||
}
|
||||
|
||||
func (group *Group) IsValidForCreate() *AppError {
|
||||
|
||||
Ссылка в новой задаче
Block a user