mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-14751] Adds group_constrained filter to user list and search endpoints (#10678)
This commit is contained in:
committed by
GitHub
parent
beb7592c93
commit
098dbc84cc
@@ -12,6 +12,8 @@ type UserGetOptions struct {
|
||||
InChannelId string
|
||||
// Filters the users not in the channel
|
||||
NotInChannelId string
|
||||
// Filters the users group constrained
|
||||
GroupConstrained bool
|
||||
// Filters the users without a team
|
||||
WithoutTeam bool
|
||||
// Filters the inactive users
|
||||
|
||||
@@ -13,15 +13,16 @@ const USER_SEARCH_DEFAULT_LIMIT = 100
|
||||
|
||||
// UserSearch captures the parameters provided by a client for initiating a user search.
|
||||
type UserSearch struct {
|
||||
Term string `json:"term"`
|
||||
TeamId string `json:"team_id"`
|
||||
NotInTeamId string `json:"not_in_team_id"`
|
||||
InChannelId string `json:"in_channel_id"`
|
||||
NotInChannelId string `json:"not_in_channel_id"`
|
||||
AllowInactive bool `json:"allow_inactive"`
|
||||
WithoutTeam bool `json:"without_team"`
|
||||
Limit int `json:"limit"`
|
||||
Role string `json:"role"`
|
||||
Term string `json:"term"`
|
||||
TeamId string `json:"team_id"`
|
||||
NotInTeamId string `json:"not_in_team_id"`
|
||||
InChannelId string `json:"in_channel_id"`
|
||||
NotInChannelId string `json:"not_in_channel_id"`
|
||||
GroupConstrained bool `json:"group_constrained"`
|
||||
AllowInactive bool `json:"allow_inactive"`
|
||||
WithoutTeam bool `json:"without_team"`
|
||||
Limit int `json:"limit"`
|
||||
Role string `json:"role"`
|
||||
}
|
||||
|
||||
// ToJson convert a User to a json string
|
||||
@@ -53,6 +54,8 @@ type UserSearchOptions struct {
|
||||
AllowFullNames bool
|
||||
// AllowInactive configures whether or not to return inactive users in the search results.
|
||||
AllowInactive bool
|
||||
// Narrows the search to the group constrained users
|
||||
GroupConstrained bool
|
||||
// Limit limits the total number of results returned.
|
||||
Limit int
|
||||
// Filters for the given role
|
||||
|
||||
Reference in New Issue
Block a user