Plugin groups (#30320)
* add new pluginapi methods * SAML login hook * set ReAddRemovedMembers to true for plugin groups * change to DoLogin signature for SAML
Этот коммит содержится в:
@@ -3713,14 +3713,14 @@ export default class Client4 {
|
||||
);
|
||||
};
|
||||
|
||||
getGroupsNotAssociatedToTeam = (teamID: string, q = '', page = 0, perPage = PER_PAGE_DEFAULT, source = 'ldap') => {
|
||||
getGroupsNotAssociatedToTeam = (teamID: string, q = '', page = 0, perPage = PER_PAGE_DEFAULT, source = 'ldap', onlySyncableSources = false) => {
|
||||
return this.doFetch<Group[]>(
|
||||
`${this.getGroupsRoute()}${buildQueryString({not_associated_to_team: teamID, page, per_page: perPage, q, include_member_count: true, group_source: source})}`,
|
||||
`${this.getGroupsRoute()}${buildQueryString({not_associated_to_team: teamID, page, per_page: perPage, q, include_member_count: true, group_source: source, only_syncable_sources: onlySyncableSources})}`,
|
||||
{method: 'get'},
|
||||
);
|
||||
};
|
||||
|
||||
getGroupsNotAssociatedToChannel = (channelID: string, q = '', page = 0, perPage = PER_PAGE_DEFAULT, filterParentTeamPermitted = false, source = 'ldap') => {
|
||||
getGroupsNotAssociatedToChannel = (channelID: string, q = '', page = 0, perPage = PER_PAGE_DEFAULT, filterParentTeamPermitted = false, source = 'ldap', onlySyncableSources = false) => {
|
||||
const query = {
|
||||
not_associated_to_channel: channelID,
|
||||
page,
|
||||
@@ -3729,6 +3729,7 @@ export default class Client4 {
|
||||
include_member_count: true,
|
||||
filter_parent_team_permitted: filterParentTeamPermitted,
|
||||
group_source: source,
|
||||
only_syncable_sources: onlySyncableSources,
|
||||
};
|
||||
return this.doFetch<Group[]>(
|
||||
`${this.getGroupsRoute()}${buildQueryString(query)}`,
|
||||
|
||||
@@ -43,11 +43,22 @@ export type Group = {
|
||||
member_ids?: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Main sources for groups
|
||||
*/
|
||||
export enum GroupSource {
|
||||
Ldap = 'ldap',
|
||||
Custom = 'custom',
|
||||
}
|
||||
|
||||
/**
|
||||
* Special prefixes that can be added to group sources when they come from plugins
|
||||
* Used for identifying plugin-created groups by checking if source starts with this prefix
|
||||
*/
|
||||
export enum PluginGroupSourcePrefix {
|
||||
Plugin = 'plugin_'
|
||||
}
|
||||
|
||||
export type GroupTeam = {
|
||||
team_id: string;
|
||||
team_display_name: string;
|
||||
|
||||
Ссылка в новой задаче
Block a user