Bug 52948 - UMC does not handle duplicate phone entries
UMC does not handle duplicate phone entries
Status: RESOLVED DUPLICATE of bug 52949
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks: 52949
  Show dependency treegraph
 
Reported: 2021-03-18 10:29 CET by Daniel Tröder
Modified: 2021-03-18 11:15 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2021-03-18 10:29:09 CET
The UDM CLI handles it robustly:
-----------------------------------------------------------------------------
root@m20:~# udm users/user list --filter uid=Administrator | grep phone
root@m20:~# udm users/user modify --dn uid=Administrator,cn=users,dc=uni,dc=dtr --append phone=123 
Object modified: uid=Administrator,cn=users,dc=uni,dc=dtr
root@m20:~# udm users/user list --filter uid=Administrator | grep phone
  phone: 123
root@m20:~# udm users/user modify --dn uid=Administrator,cn=users,dc=uni,dc=dtr --append phone=123 
WARNING: cannot append 123 to phone, value exists
No modification: uid=Administrator,cn=users,dc=uni,dc=dtr
root@m20:~# udm users/user modify --dn uid=Administrator,cn=users,dc=uni,dc=dtr --append phone=456 --append phone=123 
WARNING: cannot append 123 to phone, value exists
Object modified: uid=Administrator,cn=users,dc=uni,dc=dtr
root@m20:~# udm users/user list --filter uid=Administrator | grep phone
  phone: 123
  phone: 456
-----------------------------------------------------------------------------

The UDM Python lib also:
-----------------------------------------------------------------------------
root@m20:~# python
>>> from univention.udm import UDM
>>> user_mod = UDM.admin().version(0).get('users/user')
>>> user = user_mod.get("uid=Administrator,cn=users,dc=uni,dc=dtr")
>>> user.props.phone
['123', '456']
>>> user.props.phone.append("123")
>>> user.save()
>>> user = user_mod.get("uid=Administrator,cn=users,dc=uni,dc=dtr")
>>> user.props.phone
['123', '456']
-----------------------------------------------------------------------------

But the UMC module shows an error popup when saving a duplicate phone entry:
-----------------------------------------------------------------------------
Das LDAP-Objekt konnte nicht gespeichert werden: LDAP-Fehler Type or value exists: telephoneNumber: value #0 provided more than once
-----------------------------------------------------------------------------

This behavior cannot be observed when saving duplicate "departmentNumber" entries.

The UMC should handle duplicate entries in the multi value field "email" robustly.
Comment 1 Florian Best univentionstaff 2021-03-18 11:15:57 CET

*** This bug has been marked as a duplicate of bug 52949 ***