Univention Bugzilla – Attachment 9592 Details for
Bug 46470
S4-Connector syncs back (to_ucs) old group membership of moved users
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug46470-move.patch
bug46470-move.patch (text/plain), 3.15 KB, created by
Arvid Requate
on 2018-07-11 19:24:13 CEST
(
hide
)
Description:
bug46470-move.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2018-07-11 19:24:13 CEST
Size:
3.15 KB
patch
obsolete
>diff --git a/services/univention-s4-connector/modules/univention/s4connector/__init__.py b/services/univention-s4-connector/modules/univention/s4connector/__init__.py >index a1ef180c33..36e1db546c 100644 >--- a/services/univention-s4-connector/modules/univention/s4connector/__init__.py >+++ b/services/univention-s4-connector/modules/univention/s4connector/__init__.py >@@ -837,8 +837,8 @@ class ucs: > change_type = "modify" > ud.debug(ud.LDAP, ud.INFO, "__sync_file_from_ucs: object was modified") > if old_dn and not old_dn == dn: >+ change_type = "move" > ud.debug(ud.LDAP, ud.INFO, "__sync_file_from_ucs: object was moved") >- # object was moved > new_object = {'dn': unicode(dn, 'utf8'), 'modtype': change_type, 'attributes': new} > old_object = {'dn': unicode(old_dn, 'utf8'), 'modtype': change_type, 'attributes': old} > if self._ignore_object(key, new_object): >@@ -862,7 +862,7 @@ class ucs: > return True > else: > if old_dn and not old_dn == dn: >- change_type = "modify" >+ change_type = "move" > ud.debug(ud.LDAP, ud.INFO, "__sync_file_from_ucs: object was moved") > else: > change_type = "add" >@@ -885,7 +885,7 @@ class ucs: > else: > object = {'dn': unicode(dn, 'utf8'), 'modtype': change_type, 'attributes': new} > >- if change_type == 'modify' and old_dn: >+ if change_type in ('modify', 'move') and old_dn: > object['olddn'] = unicode(old_dn, 'utf8') # needed for correct samaccount-mapping > > if not self._ignore_object(key, object) or ignore_subtree_match: >@@ -1497,6 +1497,7 @@ class ucs: > ud.debug(ud.LDAP, ud.INFO, "sync_to_ucs ignored, sync_mode is %s" % self.property[property_type].sync_mode) > return True > >+ # Update modtype if necessary > ucs_object_dn = object.get('olddn', object['dn']) > old_object = self.get_ucs_object(property_type, ucs_object_dn) > if old_object and object['modtype'] == 'add': >diff --git a/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py b/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >index ba9d456dee..303d42338b 100644 >--- a/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >+++ b/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >@@ -2499,7 +2500,7 @@ class s4(univention.s4connector.ucs): > # > # ADD > # >- if (object['modtype'] == 'add' and not s4_object) or (object['modtype'] == 'modify' and not s4_object): >+ if not s4_object and object['modtype'] in ('add', 'modify', 'move'): > ud.debug(ud.LDAP, ud.INFO, "sync_from_ucs: add object: %s" % object['dn']) > > ud.debug(ud.LDAP, ud.INFO, "sync_from_ucs: lock UCS entryUUID: %s" % entryUUID) >@@ -2602,7 +2603,7 @@ class s4(univention.s4connector.ucs): > # > # MODIFY > # >- elif (object['modtype'] == 'modify' and s4_object) or (object['modtype'] == 'add' and s4_object): >+ elif s4_object and object['modtype'] in ('add', 'modify', 'move'): > ud.debug(ud.LDAP, ud.INFO, "sync_from_ucs: modify object: %s" % object['dn']) > ud.debug(ud.LDAP, ud.INFO, "sync_from_ucs: old_object: %s" % old_ucs_object) > ud.debug(ud.LDAP, ud.INFO, "sync_from_ucs: new_object: %s" % new_ucs_object)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46470
: 9592