View | Details | Raw Unified | Return to bug 51647
Collapse All | Expand All

(-)a/services/univention-ad-connector/modules/univention/connector/__init__.py (-3 / +6 lines)
 Lines 326-336   class configsaver: Link Here 
326
326
327
class attribute:
327
class attribute:
328
328
329
	def __init__(self, ucs_attribute='', ldap_attribute='', con_attribute='', con_other_attribute='', required=0, single_value=False, compare_function='', con_value_merge_function='', mapping=(), reverse_attribute_check=False, sync_mode='sync'):
329
	def __init__(self, ucs_attribute='', ldap_attribute='', con_attribute='', con_other_attribute='', required=0, single_value=False, compare_function='', con_value_merge_function='', mapping=(), reverse_attribute_check=False, sync_mode='sync', con_depends=''):
330
		self.ucs_attribute = ucs_attribute
330
		self.ucs_attribute = ucs_attribute
331
		self.ldap_attribute = ldap_attribute
331
		self.ldap_attribute = ldap_attribute
332
		self.con_attribute = con_attribute
332
		self.con_attribute = con_attribute
333
		self.con_other_attribute = con_other_attribute
333
		self.con_other_attribute = con_other_attribute
334
		self.con_depends = con_depends
334
		self.required = required
335
		self.required = required
335
		self.compare_function = compare_function
336
		self.compare_function = compare_function
336
		self.con_value_merge_function = con_value_merge_function
337
		self.con_value_merge_function = con_value_merge_function
 Lines 1095-1101   class ucs: Link Here 
1095
				changed_attributes = object.get('changed_attributes', [])
1096
				changed_attributes = object.get('changed_attributes', [])
1096
				changed = not changed_attributes or \
1097
				changed = not changed_attributes or \
1097
					attribute.con_attribute in changed_attributes or \
1098
					attribute.con_attribute in changed_attributes or \
1098
					attribute.con_other_attribute in changed_attributes
1099
					attribute.con_other_attribute in changed_attributes or \
1100
					attribute.con_depends in changed_attributes
1099
1101
1100
				if changed:
1102
				if changed:
1101
					ud.debug(ud.LDAP, ud.INFO,
1103
					ud.debug(ud.LDAP, ud.INFO,
 Lines 1115-1121   class ucs: Link Here 
1115
				changed_attributes = object.get('changed_attributes', [])
1117
				changed_attributes = object.get('changed_attributes', [])
1116
				changed = not changed_attributes or \
1118
				changed = not changed_attributes or \
1117
					attribute.con_attribute in changed_attributes or \
1119
					attribute.con_attribute in changed_attributes or \
1118
					attribute.con_other_attribute in changed_attributes
1120
					attribute.con_other_attribute in changed_attributes or \
1121
					attribute.con_depends in changed_attributes
1119
1122
1120
				if changed:
1123
				if changed:
1121
					ud.debug(ud.LDAP, ud.INFO,
1124
					ud.debug(ud.LDAP, ud.INFO,
(-)a/services/univention-ad-connector/modules/univention/connector/ad/__init__.py (+9 lines)
 Lines 994-999   class ad(univention.connector.ucs): Link Here 
994
					if not getattr(attr, 'con_other_attribute') and attr.con_attribute in self.single_valued_ad_attributes:
994
					if not getattr(attr, 'con_other_attribute') and attr.con_attribute in self.single_valued_ad_attributes:
995
						attr.single_value = True
995
						attr.single_value = True
996
996
997
		for mapping_key, mapping_property in self.property.items():
998
			for attr_type in ('attributes', 'post_attributes'):
999
				con_attributes = getattr(mapping_property, attr_type)
1000
				if not con_attributes:
1001
					continue
1002
				for attr_key, attr in con_attributes.items():
1003
					if attr.ldap_attribute == 'mailPrimaryAddress':
1004
						attr.con_depends = 'mail'
1005
997
		# Log the active mapping
1006
		# Log the active mapping
998
		if ud.get_level(ud.LDAP) >= ud.INFO:
1007
		if ud.get_level(ud.LDAP) >= ud.INFO:
999
			mapping_lines = ["Mapping:"]
1008
			mapping_lines = ["Mapping:"]

Return to bug 51647