Bug 39253 - Check if modify / remove / create operation is allowed for object type
Check if modify / remove / create operation is allowed for object type
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - DHCP
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Florian Best
Johannes Keiser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-24 09:56 CEST by Florian Best
Modified: 2017-07-05 13:06 CEST (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?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.43 KB, patch)
2016-10-21 15:42 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-08-24 09:56:41 CEST
We received the following traceback, 4.0-2 errata193 (Walle)

Good that we fixed Bug #34985, we now have more information. I currently don't know how this can be triggered.

Execution of command 'udm/add dhcp/dhcp' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/modules/__init__.py", line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 374, in _thread
    dn = module.create(properties, container=options.get('container'), superordinate=options.get('superordinate'))
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated
    return func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func
    return _func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func
    ret = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 491, in create
    obj.create()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 352, in create
    return self._create()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 711, in _create
    al=self._ldap_addlist()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 530, in _not_implemented_error
    raise NotImplementedError('%s() not implemented by %s.%s().' % (attr, self.__module__, self.__class__.__name__))
NotImplementedError: _ldap_addlist() not implemented by univention.admin.handlers.dhcp.dhcp.object().
Comment 1 Florian Best univentionstaff 2015-08-24 10:10:44 CEST
Here is the umc-command to trigger this error:

umc-client -U Administrator -P univention COMMAND udm/add -f dhcp/dhcp -e -o '[{"object":{"name":"foo"},"options":{"container":None,"superordinate":"None", "objectType": "dhcp/dhcp"}}]'
Comment 2 Florian Best univentionstaff 2016-10-21 15:42:46 CEST
Created attachment 8146 [details]
patch
Comment 3 Florian Best univentionstaff 2017-06-28 17:16:37 CEST
Patch with translation and human friendly error message has been applied.

univention-directory-manager-modules (12.0.17-22):
r80593 | Bug #39253: check if operation is allowed

univention-directory-manager-modules.yaml:
r80593 | Bug #39253: check if operation is allowed
Comment 4 Johannes Keiser univentionstaff 2017-06-30 11:03:23 CEST
Tested with:

(In reply to Florian Best from comment #1)
> Here is the umc-command to trigger this error:
> 
> umc-client -U Administrator -P univention COMMAND udm/add -f dhcp/dhcp -e -o
> '[{"object":{"name":"foo"},"options":{"container":None,"superordinate":
> "None", "objectType": "dhcp/dhcp"}}]'

Before patch: shows traceback
After patch: Shows human readable error message
OK

YAML: OK
-> verified
Comment 5 Janek Walkenhorst univentionstaff 2017-07-05 13:06:21 CEST
<http://errata.software-univention.de/ucs/4.2/79.html>