Univention Bugzilla – Bug 45252
S4C: Fixup `con_other_attribute` sync (e.g. telephoneNumber)
Last modified: 2020-07-02 10:35:05 CEST
Created attachment 9140 [details] 35903-s4c-test-telephone-421.patch The attached patch fixes the `con_other_attribute` sync in the S4 Connector. This the same as in bug #36480 comment 5. See the new test-case `52_s4connector/502_other_attribute_sync.py` or the following comment from univention-s4-connector/modules/univention/s4connector/s4/__init__.py for details: > # This is the case, where we map from a multi-valued UCS attribute to two S4 attributes. > # telephoneNumber/otherTelephone (S4) to telephoneNumber (UCS) would be an example. > # > # In Active Directory, for attributes that are split in two the administrator is > # responsible for keeping a value in `telephoneNumber`. Imagine the following: > # (a) telephoneNumber = '123', otherTelephone = ['123', '456'] > # In this case, if the administrator deletes the value of `telephoneNumber`, > # Active Directory does NOT automatically pull a new value from `otherTelephone`. > # > # This is impossible to support with the connector. Imagine again case (a). If > # we delete `123` from `phone` via UDM, AD would be synced into the following > # state: (b) telephoneNumber = '', otherTelephone = ['456'] > # From now on, whenever we add a new value to `phone` via UDM, for example: > # (c) phone = ['456', '789'] it MUST be synced as > # (d) telephoneNumber = '', otherTelephone = ['456', '789'] as '456' came > # before '789' and '456' is definitely in `otherTelephone`. > # > # We therefore implement, that `telephoneNumber` is never empty, as long as there > # are values in `otherTelephone`. If a modification would delete the value of > # `telephoneNumber` and at least one value exists in `otherTelephone`, the > # connector duplicates the first entry of `otherTelephone` into > # `telephoneNumber`.
*** Bug 35903 has been marked as a duplicate of this bug. ***
Created attachment 9176 [details] 45252-s4c-test-telephone-422.patch Committed the test case (skipped) as r82686/r82687. Revert r82687 if this is fixed.
Code rebased on 4.2-2 in branch loyen/45252-s4c-con-other-sync-422.