Bug 34337 - UCS@school wizards for users, groups and computers do not support modify and delete actions
UCS@school wizards for users, groups and computers do not support modify and ...
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Wizards
UCS@school 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 R2
Assigned To: Dirk Wiesenthal
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-13 12:00 CET by Sönke Schwardt-Krummrich
Modified: 2014-06-12 09:20 CEST (History)
1 user (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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2014-03-13 12:00:08 CET
UCS@school wizards for users, groups and computers do not support modify and delete actions. The user has to switch to the UCS users/user, groups/group or computers/computer module for modifications or the deletion of objects.
Comment 1 Florian Best univentionstaff 2014-03-13 15:34:22 CET
Can you please add some information about what exactly should be done here?
There are multiple possible solutions:
* integrate links to the users/user etc. modules
* move the wizards into the users/user etc. modules
* add a grid view for these objects directly in the modules (aka. reimplement UDM with school fashion).
* etc?
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2014-04-15 10:08:47 CEST
A mockup has already been defined and implemented. Now the missing implementation has to be done.
Comment 3 Florian Best univentionstaff 2014-05-09 15:23:06 CEST
I ran into the following exception. My system is a slave (in district mode) which has been joined before UCS@school was installed so that the computer object exists beneath $ldap_base/computers/dc. From the exception message it is unclear which name is meant. I think the exception refers to the Slave-computer object? (The school name at least didn't exists before). If this is the case it's a regression because in the old installer the computer object has been moved into the school before.
python-ucs-school                              5.0.27-1.126.201405091346

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 204, in wrapper_func
    return func( *args, **kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolwizards/__init__.py", line 118, in _decorated
    ret = func(self, request, *a, **kw)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolwizards/__init__.py", line 196, in _create_obj
    if obj.create(ldap_user_write, validate=False):
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/base.py", line 340, in create
    success = self.create_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/school.py", line 315, in create_without_hooks
    if not self.add_domain_controllers(lo):
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/school.py", line 289, in add_domain_controllers
    self.create_dc_slave(lo, dc_name, administrative=administrative)
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/school.py", line 258, in create_dc_slave
    return dc.modify(lo)
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/base.py", line 394, in modify
    success = self.modify_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/models/base.py", line 405, in modify_without_hooks
    raise ValidationError(self.errors.copy())
ValidationError: {'name': [u'Der Name wird bereits au\xdferhalb dieser Schule genutzt. Er darf nicht zweimal vorkommen und muss ver\xe4ndert werden.']}
Comment 4 Florian Best univentionstaff 2014-05-09 16:03:49 CEST
I get again this traceback on a slave (district mode) which consists of 2 schools (in a lot of modules):
MODULE      ( INFO    ) : All Schools: school_names=['schuleaufslave', 'schule2aufslave']
MODULE      ( INFO    ) : schoolrooms.query: options: {'pattern': '', 'school': 'schuleaufslave'}
Die Ausführung des Kommandos schoolrooms/query ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 204, in wrapper_func
    return func( *args, **kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolrooms/__init__.py", line 84, in query
    objs = udm_modules.lookup( 'groups/group', None, ldap_user_read, scope = 'one', base = search_base.rooms, filter = ldapFilter)
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 801, in lookup
    tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/groups/group.py", line 1077, in lookup
    for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit):
  File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 347, in search
    raise univention.admin.uexceptions.noObject, _err2str(msg)
noObject: No such object
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2014-05-13 14:32:30 CEST
German version of the remove school popup:

"""Bitte bestätigen Sie die Löschung der Schule Dies ist die gesamtschule mitte, mit der ich jetzt etwas testen will (Diesistdiegesamtschulemittemitderichjetztetwastestenwill).

Warning: Deleting this school will also delete every teacher and student.
This action is irreversible and cannot be undone."""

→ Please add double quotes around the school name:
Bitte bestätigen Sie die Löschung der Schule "Gesamtschule Mitte" (gsmitte).

→ Please change the default button to "cancel". Please apply the default button change to all other wizards, too.
Comment 6 Dirk Wiesenthal univentionstaff 2014-05-14 01:24:17 CEST
(In reply to Florian Best from comment #3)
> I ran into the following exception. My system is a slave (in district mode)
> which has been joined before UCS@school was installed so that the computer
> object exists beneath $ldap_base/computers/dc. From the exception message it
> is unclear which name is meant. I think the exception refers to the
> Slave-computer object? (The school name at least didn't exists before). If
> this is the case it's a regression because in the old installer the computer
> object has been moved into the school before.
> python-ucs-school                              5.0.27-1.126.201405091346
> 

Hope to have fixed that

(In reply to Florian Best from comment #4)
> I get again this traceback on a slave (district mode) which consists of 2
> schools (in a lot of modules):
> MODULE      ( INFO    ) : All Schools: school_names=['schuleaufslave',
> 'schule2aufslave']
> MODULE      ( INFO    ) : schoolrooms.query: options: {'pattern': '',
> 'school': 'schuleaufslave'}

Unable to reproduce. Could you give me the name of the host? *.71 or *.72? I could not see any tracebacks there.

(In reply to Sönke Schwardt-Krummrich from comment #5)
> German version of the remove school popup:
> 
> """Bitte bestätigen Sie die Löschung der Schule Dies ist die gesamtschule
> mitte, mit der ich jetzt etwas testen will
> (Diesistdiegesamtschulemittemitderichjetztetwastestenwill).
> 
> Warning: Deleting this school will also delete every teacher and student.
> This action is irreversible and cannot be undone."""
> 
> → Please add double quotes around the school name:
> Bitte bestätigen Sie die Löschung der Schule "Gesamtschule Mitte" (gsmitte).
> 
> → Please change the default button to "cancel". Please apply the default
> button change to all other wizards, too.

Done


Additionally, the lib now passes ucs-test-ucsschool.

RESOLVED for now
Comment 7 Dirk Wiesenthal univentionstaff 2014-05-14 01:26:11 CEST
To be discussed:
 * Deletion of school - needs logic?
 * Changing subnetmask of computers (and how to retrieve it from LDAP in the first place?)

Reopen when this is specified.
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2014-05-14 08:29:53 CEST
(In reply to Dirk Wiesenthal from comment #7)
> To be discussed:
>  * Deletion of school - needs logic?

→ no additional logic required for now

>  * Changing subnetmask of computers (and how to retrieve it from LDAP in the
> first place?)

→ please disable the possibility to change the netmask for now and create a bug, to check this for future releases
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2014-05-15 11:24:32 CEST
Suggestion for improvement for the popup texts ("title text" / "body text"):

OLD: 
"Es konnte keine Schule gefunden werden" / "Möchten Sie eine erste Schule angelegen?"
NEW: 
"Keine Schule gefunden" / "Es wurde keine Schule in der Domäne gefunden. Bevor Schüler, Klassen und Rechner verwaltet werden können, muss mindestens eine Schule eingerichtet werden.<br>Es wird daher jetzt das Modul zur Verwaltung von Schulen geöffnet."
→ The popup should only contain an "OK" button and redirect in any case to the school module.
→ Ideally the popup within the "school" module does not appear. Is this possible?

OLD:
"Noch keine Schulen erstellt" / "Noch keine Schulen erstellt. Möchten Sie eine erste Schule angelegen?"
NEW:
"Keine Schule gefunden" / "Es wurde keine Schule in der Domäne gefunden. Bevor Schüler, Klassen und Rechner verwaltet werden können, muss mindestens eine Schule eingerichtet werden. Möchten Sie jetzt die erste Schule anlegen?"

OLD:
"Noch keine Rechner erstellt" / "Noch keine Rechner erstellt. Möchten Sie einen ersten Rechner angelegen?"
NEW:
"Keine Rechner gefunden" / "Es wurden keine Rechner gefunden. Möchten Sie jetzt den ersten Rechner anlegen?"

OLD:
"Noch keine Benutzer erstellt"  / "Noch keine Benutzer erstellt. Möchten Sie einen ersten Benutzer angelegen?"
NEW:
"Keine Schulbenutzer gefunden" / "Es wurden keine Schulbenutzer gefunden. Möchten Sie jetzt den ersten Schulbenutzer anlegen?"

OLD:
"Noch keine Klassen erstellt" / "Noch keine Klassen erstellt. Möchten Sie eine erste Schulklasse angelegen?"
NEW:
"Keine Klassen gefunden" / "Es wurden keine Klassen gefunden. Möchten Sie jetzt die erste Klasse anlegen?"
Comment 10 Dirk Wiesenthal univentionstaff 2014-05-15 14:26:22 CEST
(In reply to Sönke Schwardt-Krummrich from comment #8)
> (In reply to Dirk Wiesenthal from comment #7)
> > To be discussed:
> >  * Deletion of school - needs logic?
> 
> → no additional logic required for now

Ok

> 
> >  * Changing subnetmask of computers (and how to retrieve it from LDAP in the
> > first place?)
> 
> → please disable the possibility to change the netmask for now and create a
> bug, to check this for future releases

Subnet mask is now retrieved from computer.network.netmask

(In reply to Sönke Schwardt-Krummrich from comment #9)
> Suggestion for improvement for the popup texts ("title text" / "body text"):

Done
Comment 11 Sönke Schwardt-Krummrich univentionstaff 2014-05-19 21:01:42 CEST
(In reply to Dirk Wiesenthal from comment #10)
> > >  * Changing subnetmask of computers (and how to retrieve it from LDAP in the
> > > first place?)
> > 
> > → please disable the possibility to change the netmask for now and create a
> > bug, to check this for future releases
> 
> Subnet mask is now retrieved from computer.network.netmask

→ OK
 
> (In reply to Sönke Schwardt-Krummrich from comment #9)
> > Suggestion for improvement for the popup texts ("title text" / "body text"):
> 
> Done

→ s/angelegen/anlegen/ → REOPEN

There are currently discussions running about the module icons, the module name and module subtitle. When results are available, they will be added here.
Comment 12 Sönke Schwardt-Krummrich univentionstaff 2014-05-19 21:31:13 CEST
After removing a school OU, the autosearch in the school users module failed:

Die Ausführung des Kommandos schoolwizards/classes ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 204, in wrapper_func
    return func( *args, **kwargs )
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 589, in classes
    self.finished( request.id, self._groups( ldap_user_read, search_base.school, search_base.classes, request.options.get('pattern') ) )
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 581, in _groups
    groupresult = udm_modules.lookup('groups/group', None, ldap_connection, scope = scope, base = ldap_base, filter = ldapFilter)
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 801, in lookup
    tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/groups/group.py", line 1077, in lookup
    for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit):
  File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 347, in search
    raise univention.admin.uexceptions.noObject, _err2str(msg)
noObject: No such object

This may also affect other modules. After closing an reopening the school users module within the same session the traceback was gone.
Comment 13 Sönke Schwardt-Krummrich univentionstaff 2014-05-19 21:31:46 CEST
Sidenote: No other problems noticed so far within the 4 modules.
Comment 14 Dirk Wiesenthal univentionstaff 2014-05-20 01:03:34 CEST
(In reply to Sönke Schwardt-Krummrich from comment #12)
> After removing a school OU, the autosearch in the school users module failed:
> 
> This may also affect other modules. After closing an reopening the school
> users module within the same session the traceback was gone.

True, the list of school is cached in various places. All of them are potentially broken when deleting a school (and to some extend also when creating a new one).

The error messages of a deleted school are harmless but annoying. But it would be necessary to fix a lot of code in a lot of modules.

Instead I added a warning after school deletion and recommend to log out.

Deleting a school is something you only do during testing, so noone but the tester should be affected by this bug. Logging out solves all problems and the user should not be too surprised to see error messages after cancelling the "Logout?" dialogue.

(In reply to Sönke Schwardt-Krummrich from comment #11)
> → s/angelegen/anlegen/ → REOPEN

Done
Comment 15 Florian Best univentionstaff 2014-05-20 08:42:59 CEST
Wording:
The text of the delete confirmation dialog should have a trailing ".". Currently there is nothing when 1 object is selected and a "!" when multiple objects are selected.
Comment 16 Dirk Wiesenthal univentionstaff 2014-05-21 01:08:14 CEST
(In reply to Florian Best from comment #15)
> Wording:
> The text of the delete confirmation dialog should have a trailing ".".
> Currently there is nothing when 1 object is selected and a "!" when multiple
> objects are selected.

Done
Comment 17 Florian Best univentionstaff 2014-05-22 11:55:46 CEST
When changing the subnet of a computer by altering its IP address an error message pops up: 'Die angegebenen DNS-Informationen sind ungültig. Reverse Zone und IP-Adresse sind inkompatibel.'

After changing the same object afterwards again into another subnet the object will not be modified at all.
Comment 18 Dirk Wiesenthal univentionstaff 2014-05-22 13:26:56 CEST
Fixed
Comment 19 Sönke Schwardt-Krummrich univentionstaff 2014-05-23 17:52:44 CEST
Wording is ok. See product tests for results. No showblockers.
Comment 20 Sönke Schwardt-Krummrich univentionstaff 2014-06-12 09:19:26 CEST
UCS@school 3.2 R2 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2R2-de.html

If this error occurs again, please use "Clone This Bug".