Lines 267-273
def license_info(self, request, ldap_connection=None, ldap_position=None):
|
Link Here
|
---|
|
267 |
|
267 |
|
268 |
self.finished(request.id, license_data) |
268 |
self.finished(request.id, license_data) |
269 |
|
269 |
|
270 |
def license_import(self, request): |
270 |
@LDAP_Connection |
|
|
271 |
def license_import(self, request, ldap_connection=None, ldap_position=None): |
271 |
filename = None |
272 |
filename = None |
272 |
if isinstance(request.options, (list, tuple)) and request.options: |
273 |
if isinstance(request.options, (list, tuple)) and request.options: |
273 |
# file upload |
274 |
# file upload |
Lines 298-304
def _error(msg=None):
|
Link Here
|
---|
|
298 |
# check license and write it to LDAP |
299 |
# check license and write it to LDAP |
299 |
importer = LicenseImport(fd) |
300 |
importer = LicenseImport(fd) |
300 |
importer.check(ucr.get('ldap/base', '')) |
301 |
importer.check(ucr.get('ldap/base', '')) |
301 |
importer.write(self._user_dn, self._password) |
302 |
importer.write(ldap_connection) |
302 |
except (ValueError, AttributeError, LDAPError) as exc: |
303 |
except (ValueError, AttributeError, LDAPError) as exc: |
303 |
MODULE.error('License import failed (malformed LDIF): %r' % (exc, )) |
304 |
MODULE.error('License import failed (malformed LDIF): %r' % (exc, )) |
304 |
# AttributeError: missing univentionLicenseBaseDN |
305 |
# AttributeError: missing univentionLicenseBaseDN |