MM-12488: Accepts parameters to search and filter LDAP groups. (#10418)

This commit is contained in:
Martin Kraft
2019-03-14 15:43:52 -04:00
committed by GitHub
parent e94faea383
commit 5dbf8aec7d
5 changed files with 33 additions and 4 deletions

View File

@@ -59,6 +59,9 @@ type Params struct {
SyncableId string
SyncableType model.GroupSyncableType
BotUserId string
Q string
IsLinked *bool
IsConfigured *bool
}
func ParamsFromRequest(r *http.Request) *Params {
@@ -232,5 +235,15 @@ func ParamsFromRequest(r *http.Request) *Params {
params.BotUserId = val
}
params.Q = query.Get("q")
if val, err := strconv.ParseBool(query.Get("is_linked")); err == nil {
params.IsLinked = &val
}
if val, err := strconv.ParseBool(query.Get("is_configured")); err == nil {
params.IsConfigured = &val
}
return params
}