diff --git a/management/univention-directory-manager-modules/modules/univention/admin/uexceptions.py b/management/univention-directory-manager-modules/modules/univention/admin/uexceptions.py index 1f7e72a..79012ee 100644 --- a/management/univention-directory-manager-modules/modules/univention/admin/uexceptions.py +++ b/management/univention-directory-manager-modules/modules/univention/admin/uexceptions.py @@ -263,10 +263,6 @@ class licenseWrongBaseDn(base): message = _('The license is invalid for the current base DN.') -class licenseGPLversion(base): - message = _('The license check is disabled. You are using the GPL version without any support or maintenance by Univention.') - - class licenseCoreEdition(base): message = 'UCS Core Edition.' diff --git a/management/univention-directory-manager-modules/modules/univention/admin/uldap.py b/management/univention-directory-manager-modules/modules/univention/admin/uldap.py index 0eeb316..ff369cb 100644 --- a/management/univention-directory-manager-modules/modules/univention/admin/uldap.py +++ b/management/univention-directory-manager-modules/modules/univention/admin/uldap.py @@ -37,12 +37,7 @@ import univention.uldap from univention.admin import localization import univention.config_registry - -try: - import univention.admin.license - GPLversion = False -except: - GPLversion = True +import univention.admin.license translation = localization.translation('univention/admin') _ = translation.translate @@ -327,10 +322,6 @@ def bind(self, binddn, bindpw): raise univention.admin.uexceptions.authFail(_("Authentication failed")) if self.require_license: - if GPLversion: - self.require_license = 0 - raise univention.admin.uexceptions.licenseGPLversion - res = univention.admin.license.init_select(self.lo, 'admin') self.licensetypes = univention.admin.license._license.types @@ -374,7 +365,7 @@ def requireLicense(self, require=1): self.require_license = require def _validateLicense(self): - if self.require_license and not GPLversion: + if self.require_license: univention.admin.license.select('admin') def get_schema(self): diff --git a/management/univention-management-console-module-adtakeover/umc/python/adtakeover/takeover.py b/management/univention-management-console-module-adtakeover/umc/python/adtakeover/takeover.py index 0cb684e..c69aead 100755 --- a/management/univention-management-console-module-adtakeover/umc/python/adtakeover/takeover.py +++ b/management/univention-management-console-module-adtakeover/umc/python/adtakeover/takeover.py @@ -530,15 +530,10 @@ class UCS_License_detection(): def __init__(self, ucr): self.ucr = ucr - self.GPLversion = False - try: - import univention.admin.license - self.License = univention.admin.license.License - self._license = univention.admin.license._license - self.ignored_users_list = self._license.sysAccountNames - except ImportError: # GPLversion - self.GPLversion = True - self.ignored_users_list = [] + import univention.admin.license + self.License = univention.admin.license.License + self._license = univention.admin.license._license + self.ignored_users_list = self._license.sysAccountNames def determine_license(self, lo, dn): def mylen(xs): @@ -579,9 +574,6 @@ def mylen(xs): def check_license(self, domain_info): - if self.GPLversion: - return True - binddn = self.ucr['ldap/hostdn'] with open('/etc/machine.secret', 'r') as pwfile: bindpw = pwfile.readline().strip() 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 93df6a3..ab9411d 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 @@ -115,7 +115,7 @@ def check_license(ldap_connection, ignore_core_edition=False): try: try: _check_license(ldap_connection) - except (udm_errors.freeForPersonalUse, udm_errors.licenseGPLversion): + except udm_errors.freeForPersonalUse: if ignore_core_edition: return except udm_errors.licenseNotFound: @@ -150,15 +150,9 @@ def check_license(ldap_connection, ignore_core_edition=False): raise LicenseError(_('Your license does not allow modifications. During this session add and modify are disabled.')) except udm_errors.freeForPersonalUse: raise LicenseError(_('You are currently using the "Free for personal use" edition of Univention Corporate Server.')) - except udm_errors.licenseGPLversion: - raise LicenseError(_('Your license status could not be validated. Thus, you are not eligible to support and maintenance. If you have bought a license, please contact Univention or your Univention partner.')) def _check_license(ldap_connection): - try: - import univention.admin.license - except ImportError: - raise udm_errors.licenseGPLversion mapping = { 1: udm_errors.licenseClients, 2: udm_errors.licenseAccounts, diff --git a/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py b/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py index 8373dac..f914ca3 100644 --- a/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py +++ b/management/univention-management-console-module-udm/umc/python/udm/udm_ldap.py @@ -51,6 +51,7 @@ import univention.admin.objects as udm_objects import univention.admin.syntax as udm_syntax import univention.admin.uexceptions as udm_errors +import univention.admin.mapping as udm_mapping from .syntax import widget, default_value @@ -58,12 +59,6 @@ from ldap.filter import filter_format from functools import reduce -try: - import univention.admin.license - GPLversion = False -except: - GPLversion = True - _ = Translation('univention-management-console-module-udm').translate @@ -1231,7 +1226,7 @@ def map_choices(obj_list): search_options['simple_attrs'] = ldap_attr result = module.search(**search_options) for dn, ldap_map in result: - info = univention.admin.mapping.mapDict(mapping, ldap_map) + info = udm_mapping.mapDict(mapping, ldap_map) key, label = extract_key_label(syn, dn, info) if key is None: continue