mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* MM-14138: Adding new "VIEW_MEMBERS" permissions restrict the scope of users visibility * Fixing gofmt * Fixing broken tests * Addressing PR review comments from Miguel de la Cruz * Removed hack * A bit nicer and cleaner code in the UserBelongsToChannels function * Adding cluster cache invalidation for user team ids * Checking in the correct order permissions to not leek existency information * Adding restrictions to TeamMembers and User status requests * Fixing tests * Fixing status endpoint permissions checks * Adding more tests * Fixing tests * More tests and making the restrictions query based only on joins * Adding more tests * Adding more tests * fixing merge problems * Reverting status changes to avoid performance issues * Adding more tests * Fixing test * i18n extract * Adding extra method for get restrictions for a team * Add the new elasticsearch functions to search users with restrictions * Add missing translation string * Rename restrictedChannelIds to restrictedToChannels * Remove ToDo * Adding the permission to the SystemAdmin role during permissions migrations
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
package einterfaces
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/mattermost/mattermost-server/model"
|
|
)
|
|
|
|
type ElasticsearchInterface interface {
|
|
Start() *model.AppError
|
|
Stop() *model.AppError
|
|
IndexPost(post *model.Post, teamId string) *model.AppError
|
|
SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, model.PostSearchMatches, *model.AppError)
|
|
DeletePost(post *model.Post) *model.AppError
|
|
IndexChannel(channel *model.Channel) *model.AppError
|
|
SearchChannels(teamId, term string) ([]string, *model.AppError)
|
|
DeleteChannel(channel *model.Channel) *model.AppError
|
|
IndexUser(user *model.User, teamsIds, channelsIds []string) *model.AppError
|
|
SearchUsersInChannel(teamId, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError)
|
|
SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError)
|
|
DeleteUser(user *model.User) *model.AppError
|
|
TestConfig(cfg *model.Config) *model.AppError
|
|
PurgeIndexes() *model.AppError
|
|
DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError
|
|
}
|