Bug 43099 - Remove workarounds for settings/cn
Remove workarounds for settings/cn
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-02 11:05 CET by Florian Best
Modified: 2022-11-10 11:16 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-12-02 11:05:14 CET
There are various workarounds for settings/cn which is specified in all settings/- modules as superordinate-module.

(The (probably) only object of settings/cn is cn=univention,$ldap_base.)

All objects which reference settings/cn as superordinate don't give --superordinate as argument to the __init__ method, causing that it need special treatment:

management/univention-management-console-module-udm/umc/python/udm/__init__.py:
  1046 »   »   »   if superordinate and superordinate.module == 'settings/cn':
  1047 »   »   »   »   # false positive detected superordinate; Bug #32843
  1048 »   »   »   »   superordinate = None

management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py:
   602 »   »   »   if superordinate_names == set(['settings/cn']):
   603 »   »   »   »   univention.debug.debug(univention.debug.ADMIN, univention.debug.WARN, 'No settings/cn superordinate was given.')
   604 »   »   »   »   return   # settings/cn might be misued as superordinate, don't risk currently

Either we should remove:
superordinate = 'settings/cn'
from all these modules (as it actually has no effect except that we need the workarounds from above)

Or we should adjust the __init__ of settings/cn.py:object to do something like:
if not superordinate:
    superordinate_dn = position.getDn() if position else lo.parentDn(dn)
    superordinate = univention.admin.objects.get('settings/cn', superordinate_dn)
super(object, self).__init__(..., superordinate=superordinate)
Comment 1 Stefan Gohmann univentionstaff 2019-01-03 07:21:40 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Comment 2 Florian Best univentionstaff 2022-11-10 11:16:49 CET
Actually specifying `superordinate = 'settings/cn` is required that the module is shown in the drop down list of modules which can be created underneath of any container in "cn=univention,$ldap_base" (in the UMC LDAP directory module).