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

[Ldap] Entry move support #29448

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
6 participants
@kevans91

kevans91 commented Dec 4, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? no (see [1])
Fixed tickets N/A
License MIT
Doc PR N/A (see [2])

Add Move support to the ldap EntryManagerInterface and the ExtLdap adapter. This is used to re-parent an entry to another part of the directory. The interface to do so need not be complicated, requiring only the entry to be moved and the parent DN to be moved to.

Underlying implementations may require a 'newrdn' attribute -- this is generally the RDN w.r.t. the immediate parent of the entry, which is easily parsed.

I've attempted to implement it as the rename functionality was originally implemented: adding an interface to be deprecated effective immediately, presumably to allow it to be backported without breaking existing interfaces, and then implementing this interface in the ExtLdap adapter.

[1] I do not have the capacity to run the ldap tests for this locally due to current $work situation; I have no reason to believe this test will fail as written, though. This functionality has been used as currently implemented (against Windows ADS) for some time in my production environment, so it has been functionally tested otherwise.

[2] No doc PR has been created for this feature addition, since it's a minor addition. The LDAP documentation should likely be amended to include rename functionality as well as this.

@kevans91 kevans91 force-pushed the kevans91:ldap-move branch from 2942cec to 25ba77b Dec 4, 2018

@kevans91 kevans91 force-pushed the kevans91:ldap-move branch from 25ba77b to a1b10e0 Dec 4, 2018

@nicolas-grekas nicolas-grekas added this to the next milestone Dec 6, 2018

kevans91 added some commits Dec 4, 2018

symfony/ldap: Implement move support
Moving DNs is not supported by the current rename operation, due to
explicitly passing 'null' as the new parent. It is also sensible to
split moving out into a separate function that does *only* moving,
despite using the same underlying ldap operation.

This implementation explicitly will not support renaming a DN that has
children. Such matters require more care that should be placed on the
consumer.

@kevans91 kevans91 force-pushed the kevans91:ldap-move branch from a1b10e0 to 4b98e60 Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment