Univention Bugzilla – Bug 30116
Execute udm users/user list as Administrator
Last modified: 2023-03-25 06:44:38 CET
It should be checked if udm users/user list --filter uid=Administrator can be executed as user Administrator.
======================================================================== Administrator@master10:~$ /usr/sbin/udm users/user list --filter uid=Administrator uid=Administrator DN: uid=Administrator,cn=users,dc=lwadev,dc=lwaelop ARG: None homedrive: None CtxKeyboardLayout: None disabled: none postcode: None CtxWFProfilePath: None [...] ========================================================================= The user "Administrator" can execute "udm users/user list" (with or without filter).
(In reply to comment #1) > The user "Administrator" can execute "udm users/user list" (with or without > filter). Yes, that should be tested by a test script in ucs-test.
(In reply to comment #2) > (In reply to comment #1) > > The user "Administrator" can execute "udm users/user list" (with or without > > filter). > > Yes, that should be tested by a test script in ucs-test. Test has been added: 61_udm-users/99_udm_users_as_administrator. ucs-test (3.0.32-1) unstable; urgency=low * added test to determine whether 'Administrator' may execute udm/users list with filter "uid=Administrator" (which he should) (Bug #30116) svn 39889 Changelog entry for 3.1-2 has been added.
The test case should test if the command was successful. Currently the test case checks only if "Permission denied" was printed.
OK, the test now also regards the UDM return code. ucs-test (3.0.34-1) unstable; urgency=low * modified test 99_udm_users_as_administrator in order to also make it fail when the UDM return code is not equal to zero (Bug #30116) svn 39989
I've modified the package so that the test is now part of ucs-test-udm-users. Please remove the dependency to python-pexpect. I don't see why expect should be used for such test case, for example: root@master611:~# su - Administrator -c '/usr/sbin/univention-directory-manager users/user list --filter uid=Administrator | grep "^DN: uid=Administrator"' DN: uid=Administrator,cn=users,dc=deadlock61,dc=local root@master611:~#
The test does not use pexpect anymore. ucs-test (3.0.36-1) unstable; urgency=low * do not use pexpect in 99_udm_users_as_administrator (Bug #30116) svn 40068
For this bug is no separate QA needed.