Bug 38222 - favorites / UMC user preferences not saved when no objectClass univentionPerson is set
favorites / UMC user preferences not saved when no objectClass univentionPers...
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Florian Best
Alexander Kläser
Depends on: 37447
  Show dependency treegraph
Reported: 2015-04-09 11:28 CEST by Florian Best
Modified: 2015-04-16 10:48 CEST (History)
5 users (show)

See Also:
What kind of report is it?: ---
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):
Max CVSS v3 score:

patch (1.44 KB, patch)
2015-04-09 11:28 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-04-09 11:28:17 CEST
Created attachment 6814 [details]

This had the side effect that favorites aren't saved if the object has no univentionPerson object class.

Could not set given option: ldapError("Object class violation: attribute 'univentionUMCProperty' not allowed",)

Attached patch fixes this.

+++ This bug was initially created as a clone of Bug #37447 +++

I found a traceback in the UMC server:

      File "/usr/sbin/univention-management-console-server", line 209, in <module>
      File "/usr/lib/pymodules/python2.7/daemon/runner.py", line 186, in do_action
      File "/usr/sbin/univention-management-console-server", line 142, in _restart
      File "/usr/lib/pymodules/python2.7/daemon/runner.py", line 131, in _start
      File "/usr/sbin/univention-management-console-server", line 192, in run
      File "/usr/lib/pymodules/python2.7/notifier/nf_generic.py", line 284, in loop
      File "/usr/lib/pymodules/python2.7/notifier/nf_generic.py", line 271, in step
        not __sockets[ cond ][ fd ]( sock_obj ):
      File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/server.py", line 168, in _receive
        self._handle(state, msg)
      File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/server.py", line 286, in _handle
      File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session.py", line 289, in request
      File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/session.py", line 573, in handle_request_set
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 364, in modify
        return self._modify(modify_childs,ignore_license=ignore_license)
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 823, in _modify
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1940, in _ldap_modlist
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 659, in _ldap_modlist
        diff_ml = self.diff()
      File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 127, in diff
        if self.descriptions[key].multivalue:
    KeyError: 'owncloudEnabled'

Seems to happen when the app was already installed, uninstalled. In a fresh session (where at the start owncloudEnabled is not yet known) ownCloud is installed again. Right after the installation, the frontend sends a SET PREFERENCES and this crashes the whole server.

Not so sure how to fix it. One could add a KeyError in the except clause, but this leads to error messages and preferences not being saved (although irrelevant at this point).

Maybe it is better to:
  udm_modules.init(self.lo, self.po, users_module, force_reload=True)
every time in univention/management/console/protocol/session.py's _get_user_obj(). Not sure about the performance though. On the other hand, this is done in any UDM module all the time...
Comment 1 Florian Best univentionstaff 2015-04-09 12:22:35 CEST
Fix: svn r59666, r59667
YAML: 2015-04-09-univention-management-console.yaml
univention-management-console 7.1.63-16.858.201504091208
Comment 2 Alexander Kläser univentionstaff 2015-04-09 12:24:44 CEST
Changes: OK, I could reproduce the error, the new changes are working fine

Comment 3 Janek Walkenhorst univentionstaff 2015-04-16 10:48:36 CEST