Skip to content

Ability to disable paged results for Enterprise Directory #326

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

Merged
merged 2 commits into from
Jan 13, 2018
Merged

Ability to disable paged results for Enterprise Directory #326

merged 2 commits into from
Jan 13, 2018

Conversation

bajwa-adobe
Copy link
Contributor

@bajwa-adobe bajwa-adobe commented Jan 8, 2018

If Simple Page Mode Control ( 1.2.840.113556.1.4.319) is not supported.
Use search_page_size: 0 to disable paged results from Enterprise
Directory

#324 UST throws error 'Critical extension is unavailable' for oracle directory that does not support Simple Page Mode Control

If Simple Page Mode Control ( 1.2.840.113556.1.4.319) is not supported.
Use search_page_size: 0 to disable paged results from Enterprise
Directory
@bajwa-adobe bajwa-adobe changed the title Disable paged results from Enterprise Directory Ability to disable paged results for Enterprise Directory Jan 8, 2018
Copy link
Contributor

@adobeDan adobeDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great except for one needed change (noted inline). Thanks for the patch!

if search_page_size == 0:
msgid = connection.search(base_dn, scope,
filterstr=filter_string, attrlist=attributes)
result_type, response_data, _rmsgid = connection.result2(msgid)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to set msgid = None here after retrieving results to avoid problems at GeneratorExit should one be thrown. There's no connection to abandon in this case.

Set msgid = None after getting results
Copy link
Contributor

@adobeDan adobeDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for the fix!

@adobeDan adobeDan merged commit a5b92a4 into adobe-apiplatform:v2 Jan 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants