MM-64330 - filter abac users in channel invite (#31219)

* MM-64330 - filter abac users in channel invite

* implement cursor functionality for abac user filtering

* remove unnecessary comments

* refactor the backend implementation simplifying the functions

* refactor api to use opts as parameters, rename function

* add missing translation

* remove unnecesary test code

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Pablo Vélez
2025-06-20 10:53:14 +02:00
коммит произвёл GitHub
родитель 968550d275
Коммит 5fc74cd401
11 изменённых файлов: 346 добавлений и 21 удалений

Просмотреть файл

@@ -243,6 +243,19 @@ type ViewUsersRestrictions struct {
Channels []string
}
//msgp:ignore GetUsersNotInChannelOptions
type GetUsersNotInChannelOptions struct {
TeamID string `json:"team_id"`
// Page-based pagination (used for non-ABAC channels)
// This will be discarded if the channel has an ABAC policy and CursorID will be used.
Page int `json:"page"`
Limit int `json:"limit"`
// Cursor-based pagination (used for ABAC channels)
// If CursorID is empty for ABAC channels, it will start from the beginning
CursorID string `json:"cursor_id"`
Etag string `json:"etag"`
}
func (r *ViewUsersRestrictions) Hash() string {
if r == nil {
return ""