Univention Bugzilla – Bug 36131
UMC-Server: rewrite decorators
Last modified: 2022-06-24 13:56:07 CEST
Created attachment 6158 [details] decorators.py - recursive to svn 54221 Attached is a rewrite of univention.managment.console.modules.decorators which split every functionality into simple small functions for reusability. The new version has some advantages, e.g. that it is possible to use the new decorator '@threaded' and that they are working together with other decorators, e.g. @LDAP_Connection. It allows lot of code branches in UDM to use the decorators now. It has also the advantage that error in thread are handled the same as non-threaded methods. In my tests every function which currently uses some of the decorators still works as before.
*** Bug 34277 has been marked as a duplicate of this bug. ***
Many - not all - cases where Bug #30258 is needed are also fixed. But it would be much more easier to implement Bug #30258 without touching that much functions as in the suggested patch there.
This would have been helpful in the Google Apps for Work / Office 365 wizard and is especially helpful in UCS@school :(.
Well... if it is needed, would it not make sense to commit, maybe as decorators2.py :) ?
(In reply to Alexander Kläser from comment #4) > Well... if it is needed, would it not make sense to commit, maybe as > decorators2.py :) ? I don't think so. We don't get rid of the duplication otherwise.
Created attachment 7894 [details] patch (relative to svn r71715) rebased patch.