Univention Bugzilla – Attachment 8914 Details for
Bug 44770
sync_to_ucs: memberserver object is handled by computers/windows
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
identify_ucs_object_module2.diff
identify_ucs_object_module2.diff (text/plain), 3.39 KB, created by
Arvid Requate
on 2017-06-12 15:38:22 CEST
(
hide
)
Description:
identify_ucs_object_module2.diff
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2017-06-12 15:38:22 CEST
Size:
3.39 KB
patch
obsolete
>Index: modules/univention/s4connector/__init__.py >=================================================================== >--- modules/univention/s4connector/__init__.py (Revision 80121) >+++ modules/univention/s4connector/__init__.py (Arbeitskopie) >@@ -1268,7 +1256,6 @@ > > def modify_in_ucs(self, property_type, object, module, position): > _d = ud.function('ldap.modify_in_ucs') >- module = self.modules[property_type] > > if 'olddn' in object: > dntype = 'olddn' >@@ -1276,6 +1263,19 @@ > dntype = 'dn' > > ucs_object_dn = object[dntype] >+ >+ if self.modules_others[property_type]: >+ ldap_object_ucs = self.get_ucs_ldap_object(ucs_object_dn) >+ if not module.identify(ucs_object_dn, ldap_object_ucs): >+ for m in self.modules_others[property_type]: >+ if m and m.identify(ucs_object_dn, ldap_object_ucs): >+ module = m >+ ud.debug(ud.LDAP, ud.INFO, "Mapping to other module: %r" % (module,)) >+ break >+ else: >+ ud.debug(ud.LDAP, ud.ERROR, "Could not identify UDM module for: %s dn: %s" % (property_type, ucs_object_dn)) >+ return False >+ > ucs_object = univention.admin.objects.get(module, None, self.lo, dn=ucs_object_dn, position='') > self.__set_values(property_type, object, ucs_object) > return ucs_object.modify() and self.__modify_custom_attributes(property_type, object, ucs_object, module, position) >@@ -1282,7 +1282,6 @@ > > def move_in_ucs(self, property_type, object, module, position): > _d = ud.function('ldap.move_in_ucs') >- module = self.modules[property_type] > try: > if object['olddn'].lower() == object['dn'].lower(): > ud.debug(ud.LDAP, ud.WARN, "move_in_ucs: cancel move, old and new dn are the same ( %s to %s)" % (object['olddn'], object['dn'])) >@@ -1294,6 +1293,19 @@ > except: # FIXME: which exception is to be caught? > ud.debug(ud.LDAP, ud.INFO, "move_in_ucs: move object in UCS") > >+ if self.modules_others[property_type]: >+ ucs_object_dn = object['dn'] >+ ldap_object_ucs = self.get_ucs_ldap_object(ucs_object_dn) >+ if not module.identify(ucs_object_dn, ldap_object_ucs): >+ for m in self.modules_others[property_type]: >+ if m and m.identify(ucs_object_dn, ldap_object_ucs): >+ module = m >+ ud.debug(ud.LDAP, ud.INFO, "Mapping to other module: %r" % (module,)) >+ break >+ else: >+ ud.debug(ud.LDAP, ud.ERROR, "Could not identify UDM module for: %s dn: %s" % (property_type, ucs_object_dn)) >+ return False >+ > ucs_object = univention.admin.objects.get(module, None, self.lo, dn=object['olddn'], position='') > ucs_object.open() > ucs_object.move(object['dn']) >@@ -1356,7 +1368,19 @@ > ud.debug(ud.LDAP, ud.PROCESS, "The windows computer %s is a Domain Controller in OpenLDAP. The deletion will be skipped." % object['dn']) > return True > >- module = self.modules[property_type] >+ if self.modules_others[property_type]: >+ ucs_object_dn = object['dn'] >+ ldap_object_ucs = self.get_ucs_ldap_object(ucs_object_dn) >+ if not module.identify(ucs_object_dn, ldap_object_ucs): >+ for m in self.modules_others[property_type]: >+ if m and m.identify(ucs_object_dn, ldap_object_ucs): >+ module = m >+ ud.debug(ud.LDAP, ud.INFO, "Mapping to other module: %r" % (module,)) >+ break >+ else: >+ ud.debug(ud.LDAP, ud.ERROR, "Could not identify UDM module for: %s dn: %s" % (property_type, ucs_object_dn)) >+ return False >+ > ucs_object = univention.admin.objects.get(module, None, self.lo, dn=object['dn'], position='') > > try:
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 44770
:
8913
| 8914