diff options
author | Lauris BH <lauris@nix.lv> | 2018-05-05 17:30:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-05 17:30:47 +0300 |
commit | 501fb228e6c2b4d75593fae835d59cc533a6f36b (patch) | |
tree | 748b452140e041757ee9f1efb1e53de3ed59812e /routers/admin | |
parent | 7467ff3d94537880d8d6ee3925d682b6de15ae77 (diff) | |
download | gitea-501fb228e6c2b4d75593fae835d59cc533a6f36b.tar.gz gitea-501fb228e6c2b4d75593fae835d59cc533a6f36b.zip |
Add option to use paged LDAP search when synchronizing users (#3895)
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/auths.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go index 3915c618b3..6f142d7975 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -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, |