Univention Bugzilla – Attachment 9946 Details for
Bug 46089
computerroom/room/acquire: ldapError: Insufficient access
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
46089.patch (text/plain), 1.66 KB, created by
Florian Best
on 2019-03-29 16:56:22 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2019-03-29 16:56:22 CET
Size:
1.66 KB
patch
obsolete
>diff --git a/ucs-school-lib/python/schoolldap.py b/ucs-school-lib/python/schoolldap.py >index 4fecd9a8a..5e37e0c66 100644 >--- a/ucs-school-lib/python/schoolldap.py >+++ b/ucs-school-lib/python/schoolldap.py >@@ -45,11 +45,12 @@ > from functools import wraps > import re > import inspect >+import ldap > from ldap.filter import escape_filter_chars, filter_format > > from univention.management.console.config import ucr > from univention.management.console.log import MODULE >-from univention.management.console.ldap import get_machine_connection, get_admin_connection, get_user_connection # , reset_cache as reset_connection_cache >+from univention.management.console.ldap import get_machine_connection, get_admin_connection, get_user_connection, reset_cache as reset_connection_cache > from univention.management.console.modules import Base, UMC_Error > from univention.management.console.modules.decorators import sanitize > from univention.management.console.modules.sanitizers import StringSanitizer >@@ -143,14 +144,14 @@ def wrapper_func(*args, **kwargs): > school = LDAP_Connection._school > kwargs['search_base'] = School.get_search_base(school) > return func(*args, **kwargs) >- return wraps(func)(wrapper_func) >-# def decorated(*args, **kwargs): >-# try: >-# return wrapper_func(*args, **kwargs) >-# except ldap.INVALID_CREDENTIALS: >-# reset_connection_cache() >-# return wrapper_func(*args, **kwargs) >-# return wraps(func)(decorated) >+ >+ def decorated(*args, **kwargs): >+ try: >+ return wrapper_func(*args, **kwargs) >+ except ldap.LDAPError: >+ reset_connection_cache() >+ return wrapper_func(*args, **kwargs) >+ return wraps(func)(decorated) > return inner_wrapper > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46089
: 9946 |
9969
|
10021