Bug 43150

Summary: simplePolicy.create() does not return DN of created object
Product: UCS Reporter: Sönke Schwardt-Krummrich <schwardt>
Component: UDM (Generic)Assignee: Johannes Keiser <keiser>
Status: CLOSED FIXED QA Contact: Florian Best <best>
Severity: normal    
Priority: P5 CC: best, gohmann
Version: UCS 4.1   
Target Milestone: UCS 4.2-1-errata   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=41694
What kind of report is it?: Bug Report What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
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.023 Enterprise Customer affected?:
School Customer affected?: Yes ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Attachments: Patch draft for create()

Description Sönke Schwardt-Krummrich univentionstaff 2016-12-09 15:35:57 CET
simplePolicy.create() does not return DN of created object. It returns always None. In contrast simpleLdap.create() always returns the DN of the new object.

This causes UCS@school to create incorrect messages, e.g.
"Created object None" and is IMHO problematic, since currently the DN of the new object can only be safely determined by a LDAP search.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2016-12-09 15:41:28 CET
Created attachment 8299 [details]
Patch draft for create()

It has to be checked if other methods like modify() are also affected.
Comment 2 Florian Best univentionstaff 2016-12-09 16:46:12 CET
Because of this there is workaround code in management/univention-directory-manager-modules/modules/univention/admincli/admin.py:
   819 »   »   »   »   if not dn:
   820 »   »   »   »   »   dn = object.dn
Comment 3 Stefan Gohmann univentionstaff 2017-04-18 08:01:33 CEST
The School Customer affected flag is set but neither a Ticket number is referenced nor a Customer ID is set. Please set a Ticket number or a Customer ID. Otherwise the School Customer affected flag will be reset.
Comment 4 Johannes Keiser univentionstaff 2017-06-20 20:05:51 CEST
r 80372
univention-directory-manager-modules (12.0.17-14) 
* Bug #43150: simplePoliy.create returns DN

YAML: r 80379
Comment 5 Johannes Keiser univentionstaff 2017-06-21 19:52:19 CEST
r 80401
univention-directory-manager-modules (12.0.17-15) 
* Bug #43150: Remove unused class

The class simpleLdapSub was also affected but it was not used.
I removed simpleLdapSub.
Comment 6 Florian Best univentionstaff 2017-06-22 11:15:52 CEST
Very nice.
Comment 7 Janek Walkenhorst univentionstaff 2017-06-28 15:33:25 CEST
<http://errata.software-univention.de/ucs/4.2/74.html>