Univention Bugzilla – Attachment 7292 Details for
Bug 39675
License import doesn't work via SAML (SSO)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
39675.patch (text/plain), 2.13 KB, created by
Florian Best
on 2015-11-12 18:01:32 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2015-11-12 18:01:32 CET
Size:
2.13 KB
patch
obsolete
>diff --git a/management/univention-management-console-module-udm/umc/python/udm/__init__.py b/management/univention-management-console-module-udm/umc/python/udm/__init__.py >index 75b4b52..c70ee92 100644 >--- a/management/univention-management-console-module-udm/umc/python/udm/__init__.py >+++ b/management/univention-management-console-module-udm/umc/python/udm/__init__.py >@@ -267,7 +267,8 @@ def license_info(self, request, ldap_connection=None, ldap_position=None): > > self.finished(request.id, license_data) > >- def license_import(self, request): >+ @LDAP_Connection >+ def license_import(self, request, ldap_connection=None, ldap_position=None): > filename = None > if isinstance(request.options, (list, tuple)) and request.options: > # file upload >@@ -298,7 +299,7 @@ def _error(msg=None): > # check license and write it to LDAP > importer = LicenseImport(fd) > importer.check(ucr.get('ldap/base', '')) >- importer.write(self._user_dn, self._password) >+ importer.write(ldap_connection) > except (ValueError, AttributeError, LDAPError) as exc: > MODULE.error('License import failed (malformed LDIF): %r' % (exc, )) > # AttributeError: missing univentionLicenseBaseDN >diff --git a/management/univention-management-console-module-udm/umc/python/udm/tools.py b/management/univention-management-console-module-udm/umc/python/udm/tools.py >index 5f03553..3f99e1e 100644 >--- a/management/univention-management-console-module-udm/umc/python/udm/tools.py >+++ b/management/univention-management-console-module-udm/umc/python/udm/tools.py >@@ -103,15 +103,13 @@ def handle(self, dn, entry): > # for atr in entry: > # self.mod_list.insert( 0, ( ldap.MOD_REPLACE, atr, entry[ atr ] ) ) > >- def write(self, user_dn, passwd): >- ldap_con = ldap.open("localhost", port=int(ucr.get('ldap/server/port', 7389))) >- ldap_con.simple_bind_s(user_dn, passwd) >+ def write(self, ldap_connection): >+ ldap_con = ldap_connection.lo.lo > try: > ldap_con.add_s(self.dn, self.addlist) > except ldap.ALREADY_EXISTS: > ldap_con.delete_s(self.dn) > ldap_con.add_s(self.dn, self.addlist) >- ldap_con.unbind_s() > > > def check_license(ldap_connection, ignore_core_edition=False):
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 39675
: 7292