[Freeipa-devel] [PATCH] 0004 User life cycle: support of MODRDN to a new superior

thierry bordaz tbordaz at redhat.com
Wed Apr 8 13:00:06 UTC 2015


On 04/08/2015 08:34 AM, Jan Cholasta wrote:
> Hi,
>
> Dne 1.4.2015 v 17:40 thierry bordaz napsal(a):
>> Hello,
>>
>>     In user life cycle, Active entries are moved to Delete container and
>>     Delete entries can be moved back to Staging container.
>>     This requires a LDAP modrdn with new superior that is not supported
>>     in ldap2.
>
> Since update_entry_rdn() is used only in one spot in baseldap, I think 
> we can merge it and move_entry_newsuperior() into a single method 
> move_entry():
>
>     def move_entry(self, dn, new_dn, del_old=True):
>
> We can easily detect whether the superior needs to be updated by 
> comparing dn[1:] and new_dn[1:].

Hello Jan,

Yes that is a good idea to merge those two methods. They both rely on 
modrdn and a single method is enough.

>
> Maybe we can also get rid of del_old, if it's always gonna be True in 
> our code?

I think it is better to get this interface as close as possible as the 
MODRDN call, so that del_old option will be already available for future 
usage.
I agree that currently del_old is always true in case of IPA but it 
could be the default value.
>
> BTW what is the purpose of the find_entries() call? Does MODRDN 
> operation not fail with not found itself if the new superior does not 
> exist?

You are right, rename_s will detect the new supperior does not exist and 
will catch it with self.error_handler.
So this test on the superior is useless.

Thanks for your feedbacks here is an updated patch.

thanks
thierry


>
>>
>>     thanks
>>     thierry
>
> Honza
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-tbordaz-0004-2-User-life-cycle-allows-MODRDN-from-ldap2.patch
Type: text/x-patch
Size: 2824 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150408/774520ff/attachment.bin>


More information about the Freeipa-devel mailing list