Add option to use paged LDAP search when synchronizing users (#3895)

This commit is contained in:
Lauris BH authored and GitHub committed 2018-05-05 17:30:47 +03:00
1 parent 7467ff3d94
commit 501fb228e6
7 files changed
+59 -2

No files matched your search

+5
View File
@@ -91,6 +91,10 @@ func NewAuthSource(ctx *context.Context) {
}
func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig {
var pageSize uint32
if form.UsePagedSearch {
pageSize = uint32(form.SearchPageSize)
}
return &models.LDAPConfig{
Source: &ldap.Source{
Name: form.Name,
@@ -107,6 +111,7 @@ func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig {
AttributeSurname: form.AttributeSurname,
AttributeMail: form.AttributeMail,
AttributesInBind: form.AttributesInBind,
SearchPageSize: pageSize,
Filter: form.Filter,
AdminFilter: form.AdminFilter,
Enabled: true,