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 удалений

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

@@ -898,8 +898,16 @@ export default class Client4 {
);
};
getProfilesNotInChannel = (teamId: string, channelId: string, groupConstrained: boolean, page = 0, perPage = PER_PAGE_DEFAULT) => {
const queryStringObj: any = {in_team: teamId, not_in_channel: channelId, page, per_page: perPage};
getProfilesNotInChannel = (teamId: string, channelId: string, groupConstrained: boolean, page = 0, perPage = PER_PAGE_DEFAULT, cursorId = '') => {
const queryStringObj: any = {in_team: teamId, not_in_channel: channelId, per_page: perPage};
// If cursorId is provided, use cursor-based pagination
if (cursorId) {
queryStringObj.cursor_id = cursorId;
} else {
// Otherwise use traditional page-based pagination
queryStringObj.page = page;
}
if (groupConstrained) {
queryStringObj.group_constrained = true;
}