Hi,
I’m new to ldap and I need to paginate the search result that it will
return.
Is there a control that needs to be set like in offset in DB?
Or does will paginate work with ruby-net-ldap?
Thanks.
Hi,
I’m new to ldap and I need to paginate the search result that it will
return.
Is there a control that needs to be set like in offset in DB?
Or does will paginate work with ruby-net-ldap?
Thanks.
I think ruby-net-ldap automatically already uses the paged search
control
internally but uses this to populate the result returned. LDAP doesn’t
have
an offset for the paged result but instead returns a cookie, see
RFC 2696 - LDAP Control Extension for Simple Paged Results Manip (RFC2696).
What ruby-net-ldap doesn’t have that I wish it did was an implementation
of
the server side sort control or the VLC control
http://blogs.sun.com/kanthi/entry/ldap_paged_results_more.
On Tue, Aug 18, 2009 at 12:10 AM, Mx MQP
<[email protected]
Dominic S. wrote:
I think ruby-net-ldap automatically already uses the paged search
control
internally but uses this to populate the result returned. LDAP doesn’t
have
an offset for the paged result but instead returns a cookie, see
RFC 2696 - LDAP Control Extension for Simple Paged Results Manip (RFC2696).What ruby-net-ldap doesn’t have that I wish it did was an implementation
of
the server side sort control or the VLC controlhttp://blogs.sun.com/kanthi/entry/ldap_paged_results_more.
On Tue, Aug 18, 2009 at 12:10 AM, Mx MQP
Hello Dominic,
Thank you for your reply.
But I am sorry I don’t understand how to set the control.
I already have my search code, but I don’t understand how should I
incorporate the paged result returned by the server.
Code as follows:
result = ldap.search( :base => treebase, :filter => filter) do |entry|
debug "DN:#{entry.dn.inspect}"
end
Can you please give me more idea on where should I set the
“simplePageSize”
like in the sample below.
$ ./dsconfig -h localhost -p 1389 -D “cn=Directory Manager” -w password
set-access-control-
handler-prop
–add global-aci:“(targetcontrol="1.2.840.113556.1.4.319")(version
3.0; acl "Allow Simple Paged
Results Access"; allow(read) userdn =
"ldap:///uid=admin,ou=people,dc=example,dc=com";)” -n
Thanks.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs