Univention Bugzilla – Attachment 7072 Details for
Bug 39044
Network settings page validation error on unjoined system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for /usr/share/pyshared/univention/management/console/modules/setup/__init__.py
39044.patch (text/plain), 2.73 KB, created by
Florian Best
on 2015-07-30 10:56:48 CEST
(
hide
)
Description:
patch for /usr/share/pyshared/univention/management/console/modules/setup/__init__.py
Filename:
MIME Type:
Creator:
Florian Best
Created:
2015-07-30 10:56:48 CEST
Size:
2.73 KB
patch
obsolete
>diff --git a/base/univention-system-setup/umc/python/setup/__init__.py b/base/univention-system-setup/umc/python/setup/__init__.py >index 27042eb..8fdce7e 100644 >--- a/base/univention-system-setup/umc/python/setup/__init__.py >+++ b/base/univention-system-setup/umc/python/setup/__init__.py >@@ -341,8 +341,8 @@ def cleanup(self, request): > util.cleanup() > MODULE.info('... cleanup done') > >- @simple_response >- def validate(self, values=None): >+ @simple_response(with_flavor=True) >+ def validate(self, values=None, flavor=None): > '''Validate the specified values given in the dict as option named "values". > Return a dict (with variable names as key) of dicts with the structure: > { "valid": True/False, "message": "..." }''' >@@ -351,6 +351,7 @@ def validate(self, values=None): > messages = [] > values = values or {} > orgValues = util.load_values() >+ is_wizard_mode = flavor == 'wizard' > > # determine new system role > newrole = values.get('server/role', orgValues.get('server/role', '')) >@@ -393,11 +394,12 @@ def _append(key, message): > _check('domainname', util.is_domainname, _("Please enter a valid fully qualified domain name (e.g. host.example.com).")) > hostname = allValues.get('hostname', '') > domainname = allValues.get('domainname', '') >- if len('%s%s' % (hostname, domainname)) >= 63: >- _append('domainname', _('The length of fully qualified domain name is greater than 63 characters.')) >- if hostname == domainname.split('.')[0]: >- _append('domainname', _("Hostname is equal to domain name.")) >- if not util.is_system_joined(): >+ if hostname or domainname: >+ if len('%s%s' % (hostname, domainname)) >= 63: >+ _append('domainname', _('The length of fully qualified domain name is greater than 63 characters.')) >+ if hostname == domainname.split('.')[0]: >+ _append('domainname', _("Hostname is equal to domain name.")) >+ if is_wizard_mode and not util.is_system_joined(): > if newrole == 'domaincontroller_master' and not values.get('domainname'): > _append('domainname', _("No fully qualified domain name has been specified for the system.")) > elif not values.get('hostname'): >@@ -460,7 +462,7 @@ def guess_domain(obj): > if guessed_domain: > return guessed_domain > >- if not util.is_system_joined() and (newrole not in ['domaincontroller_master', 'basesystem'] or ad_member): >+ if is_wizard_mode and not util.is_system_joined() and (newrole not in ['domaincontroller_master', 'basesystem'] or ad_member): > if all(nameserver in values and not values[nameserver] for nameserver in ('nameserver1', 'nameserver2', 'nameserver3')): > # 'nameserver1'-key exists â widget is displayed â = not in UCS/debian installer mode > if not any(interface.ip4dynamic or interface.ip6dynamic for interface in interfaces.values()):
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 39044
: 7072