Bug 43150 - simplePolicy.create() does not return DN of created object
simplePolicy.create() does not return DN of created object
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Johannes Keiser
Florian Best
Depends on:
  Show dependency treegraph
Reported: 2016-12-09 15:35 CET by Sönke Schwardt-Krummrich
Modified: 2017-06-28 15:33 CEST (History)
2 users (show)

See Also:
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:

Patch draft for create() (1.13 KB, patch)
2016-12-09 15:41 CET, Sönke Schwardt-Krummrich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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