-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inclusion from LDAP data sources supports RFC 2696 Paged Results control (#57) #1733
Conversation
still to do: - make it optional; should it be an option, such as "pagesize" ? - make it work for LDAP2 - let the server know when we had an abnormal exit (see example in https://metacpan.org/pod/Net::LDAP::Control::Paged ) - try to move it to DatabaseDriver::LDAP instead ? not easy..
it was causing the search for the first page to happen twice (altough it wasn't changing the results)
What is the cause of the inability to apply pagination to LDAP two-level data source? I think it would be better to be able to do it because of less astonishments for users.
I agree. In fact, it does not seem that pagination would be necessary for LDAP use by Sympa other than as a data source. |
I got it.
Your change for pagination uses this mechanism to repeatedly read multiple pages. As a result, it breaks the two-level data source. @farialima , I would like to make one suggestion. How about once I refactor the current code and change it to use callbacks, you can submit your changes to it again? |
Yes, exactly. I think I have it working, but I don't have a test setup yet for testing it... will take a few days.
I'm really not sure that using a callback improves things, but I will look at it. |
now done - ready for review
I was indeed able to implemented two-level LDAP with very few changes, so I'd rather not refactor thing, because really the changes are minimal. But I've entered #1738 as a follow-up, I'll look at it |
OK. If we confirm that existing unit test for LDAP2 without pagination passes, i.e. at least the changes won't break existing feature, this PR may be merged. |
@farialima , I have one more question. Currently, unless the administrator sets |
I've been hesitating indeed to automatically use paging if it's available. But I don't find a generic way to query the MaxPageSize of AD, so I couldn't get to decide what default value to use... I agree it's one more small complexity [for the administrator], but at least at first, I'd rather make it manual.. If you have any idea of how it could work, I'd be a taker, but I haven't found a way to do it, in a way I would find reliable enough... |
I don't have a good idea either... All right, let's start with manual onfiguration first. |
Fix for #57
It includes a new configuration setting "page size" that's used both to enable paging, and to define the page size. I tried to integrate a description in the setting, as I think it's good to keep the documentation in/next to the functionality, but I'd suppose that the description/documentation can be improved, feedback really welcome on this.
Now, The code for the LDAP data sources is quite convoluted, difficult to read, etc... It took me a looong time to understand that "two-level" was practically working out of the box once I had implemented "one-level", LOL). I've the feeling that it could be simplified. I've entered a different ticket on this: #1738 , as this is clearly not part of #57 .