Bug 33681 - School wizard ignores license
School wizard ignores license
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 3.2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 Errata
Assigned To: Florian Best
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-09 09:41 CET by Florian Best
Modified: 2014-05-05 08:43 CEST (History)
2 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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2013-12-09 09:41:50 CET
On a Master School DC the license check is not working. I am able to e.g. create objects via the schoolwizards-module.

>>> from ucsschool.lib.schoolldap import check_license
>>> check_license()
23.11.13 22:45:18.337  MODULE      ( WARN    ) : LDAP_Connection: unable to identify ou of this account - showing all OUs!
23.11.13 22:45:18.692  MODULE      ( INFO    ) : LDAP_Connection: availableSchools=['realschule', 'gymnasium', 'hauptschule']
23.11.13 22:45:18.692  DEBUG_INIT
>>>
Comment 1 Alexander Kläser univentionstaff 2013-12-17 10:17:19 CET
The wizards rely on the school-import-scripts where no license check is being done.
Comment 2 Florian Best univentionstaff 2013-12-19 08:39:36 CET
(In reply to Alexander Kläser from comment #1)
> The wizards rely on the school-import-scripts where no license check is
> being done.
The school import scripts doesn't do a license check because they are CLI tools.
But there is an explicit license check in the module itself:

schoolwizards/__init__.py:
 56 »   »   if not self._check_license(request):
 57 »   »   »   return
Comment 3 Florian Best univentionstaff 2014-01-20 08:57:57 CET
The code to check the license checked the returncodes of the license status manually but ignored unknown returncodes. Since License Version 2 there are new returncodes.

The new returncodes are now handled.

Package: ucs-school-lib
Version: 4.0.1-1.81.201401200842
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2014-01-23 15:53:21 CET
(In reply to Florian Best from comment #0)
> >>> from ucsschool.lib.schoolldap import check_license
> >>> check_license()
> 23.11.13 22:45:18.337  MODULE      ( WARN    ) : LDAP_Connection: unable to
> identify ou of this account - showing all OUs!
> 23.11.13 22:45:18.692  MODULE      ( INFO    ) : LDAP_Connection:
> availableSchools=['realschule', 'gymnasium', 'hauptschule']
> 23.11.13 22:45:18.692  DEBUG_INIT
> >>>

The debug messages are ok. The warning is always printed if the library cannot determine automatically the school of the account that is used to establish the LDAP connection (e.g. by members of Domain Admins or other global users).

(In reply to Florian Best from comment #3)
> The code to check the license checked the returncodes of the license status
> manually but ignored unknown returncodes. Since License Version 2 there are
> new returncodes.

OK: code change
OK: behaviour (as usual the license limit only become effective after relogin 
    to UMC)
REOPEN: changelog entry is missing
Comment 5 Florian Best univentionstaff 2014-01-23 15:54:30 CET
(In reply to Sönke Schwardt-Krummrich from comment #4)
> (In reply to Florian Best from comment #0)
> > >>> from ucsschool.lib.schoolldap import check_license
> > >>> check_license()
> > 23.11.13 22:45:18.337  MODULE      ( WARN    ) : LDAP_Connection: unable to
> > identify ou of this account - showing all OUs!
> > 23.11.13 22:45:18.692  MODULE      ( INFO    ) : LDAP_Connection:
> > availableSchools=['realschule', 'gymnasium', 'hauptschule']
> > 23.11.13 22:45:18.692  DEBUG_INIT
> > >>>
> 
> The debug messages are ok. The warning is always printed if the library
> cannot determine automatically the school of the account that is used to
> establish the LDAP connection (e.g. by members of Domain Admins or other
> global users).
Yes, that was only there to make clear that no exception is raised!
Comment 6 Florian Best univentionstaff 2014-01-23 16:49:44 CET
Changelog added.
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2014-02-03 17:50:28 CET
OK: changelog
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2014-02-07 13:51:30 CET
UCS@school 3.2v2 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2v2-de.pdf

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