-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Ldap] Entry move support #29448
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
[Ldap] Entry move support #29448
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OskarStark
reviewed
Dec 4, 2018
ro0NL
reviewed
Dec 4, 2018
fabpot
requested changes
Dec 10, 2018
fabpot
approved these changes
Mar 31, 2019
private function parseRdnFromEntry(Entry $entry) | ||
{ | ||
if (!preg_match('/^([^,]+),/', $entry->getDn(), $matches)) { | ||
throw new LdapException(sprintf('Entry "%s" malformed, could not parse RDN', $entry->getDn())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dot at the end of the exception message.
Thank you @kevans91. |
fabpot
added a commit
that referenced
this pull request
Mar 31, 2019
This PR was squashed before being merged into the 4.3-dev branch (closes #29448). Discussion ---------- [Ldap] Entry move support | 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. Commits ------- 32743c8 [Ldap] Entry move support
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.