Univention Bugzilla – Attachment 3539 Details for
Bug 23738
Patches aus UCS 2.4-3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
umc_2.4-3.patch
umc_2.4-3.patch (text/plain), 33.33 KB, created by
Stefan Gohmann
on 2011-09-21 14:48 CEST
(
hide
)
Description:
umc_2.4-3.patch
Filename:
MIME Type:
Creator:
Stefan Gohmann
Created:
2011-09-21 14:48 CEST
Size:
33.33 KB
patch
obsolete
>--- management/univention-management-console/debian/changelog (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/debian/changelog (.../release-ucs-2.4-3) (Revision 27072) >@@ -1,3 +1,81 @@ >+univention-management-console (3.0.111-1) unstable; urgency=low >+ >+ * Fix handling of init_umccmd for modules that hide the category list; >+ Bug #19576 >+ >+ -- Andreas Büsching <buesching@univention.de> Mon, 29 Aug 2011 12:53:40 +0200 >+ >+univention-management-console (3.0.110-1) unstable; urgency=low >+ >+ * added handling of readonly UCR variables (Bug #22755) >+ >+ -- Sönke Schwardt-Krummrich <schwardt@univention.de> Wed, 27 Jul 2011 10:13:53 +0200 >+ >+univention-management-console (3.0.109-1) unstable; urgency=low >+ >+ * added value checks for "basis" wizard (Bug #22591) >+ >+ -- Sönke Schwardt-Krummrich <schwardt@univention.de> Fri, 22 Jul 2011 14:26:08 +0200 >+ >+univention-management-console (3.0.108-1) unstable; urgency=low >+ >+ * fix processing of umc/web/timeout/presession (Bug #21982) >+ >+ -- Janek Walkenhorst <walkenhorst@univention.de> Thu, 21 Jul 2011 10:25:49 +0200 >+ >+univention-management-console (3.0.107-1) unstable; urgency=low >+ >+ * make lifetime of session, when not logged in, configureable via UCR (Bug #21982) >+ >+ -- Janek Walkenhorst <walkenhorst@univention.de> Wed, 06 Jul 2011 10:47:33 +0200 >+ >+univention-management-console (3.0.106-1) unstable; urgency=low >+ >+ * reduce lifetime of session, when not logged in, from 30s to 5s (Bug #21982) >+ >+ -- Janek Walkenhorst <walkenhorst@univention.de> Wed, 29 Jun 2011 16:45:17 +0200 >+ >+univention-management-console (3.0.105-1) unstable; urgency=low >+ >+ * added option to prevent concurrent ajax calls in umcd.RefreshFrame (Bug #22594) >+ >+ -- Sönke Schwardt-Krummrich <schwardt@univention.de> Fri, 10 Jun 2011 17:58:23 +0200 >+ >+univention-management-console (3.0.104-1) unstable; urgency=low >+ >+ * increase maximum recursive depth for UMC module processes; Bug #22594 >+ >+ -- Andreas Büsching <buesching@univention.de> Fri, 10 Jun 2011 16:00:00 +0200 >+ >+univention-management-console (3.0.103-1) unstable; urgency=low >+ >+ * ensure that incoming requests for a currently starting process will >+ not get lost; Bug #22364 >+ >+ -- Andreas Büsching <buesching@univention.de> Tue, 03 May 2011 09:45:02 +0200 >+ >+univention-management-console (3.0.102-1) unstable; urgency=low >+ >+ * Fix AJAX-RefreshFrame (Bug #22268). >+ * Fix and add source code comments. >+ >+ -- Philipp Hahn <hahn@univention.de> Tue, 19 Apr 2011 15:36:22 +0200 >+ >+univention-management-console (3.0.101-2) unstable; urgency=low >+ >+ * Wizard, Page: buttons should not close the dialog; Bug #22275 >+ >+ -- Andreas Büsching <buesching@univention.de> Wed, 20 Apr 2011 09:45:10 +0200 >+ >+univention-management-console (3.0.100-1) unstable; urgency=low >+ >+ * if there is no dialog returned and the status code of the last reponse >+ is 201 or 301 and there is a referrer set it is shown instead of an >+ info message; Bug #22264 >+ * bump version for UCS 2.4-3 >+ >+ -- Andreas Büsching <buesching@univention.de> Tue, 19 Apr 2011 11:20:13 +0200 >+ > univention-management-console (3.0.83-2) unstable; urgency=low > > * fixed typo in UCR description (Bug #21586) >Index: management/univention-management-console/modules/frontend/pages/module.py >=================================================================== >--- management/univention-management-console/debian/univention-management-console.univention-config-registry-variables (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/debian/univention-management-console.univention-config-registry-variables (.../release-ucs-2.4-3) (Revision 27072) >@@ -4,6 +4,12 @@ > Type=str > Categories=management-umc > >+[umc/web/timeout/presession] >+Description[de]=Laufzeit von Univention Management Console Sitzungen ohne Anmeldung (Anmeldung trotzdem möglich) >+Description[en]=Timout of Univention Management Console session without login (login still possible) >+Type=str >+Categories=management-umc >+ > [umc/web/debug/level] > Description[de]=Debug-Level für das Web-Frontend von UMC > Description[en]=Debug level of the UMC web frontend >Index: management/univention-management-console/debian/changelog >=================================================================== >--- management/univention-management-console/modules/frontend/pages/module.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/frontend/pages/module.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -116,19 +116,26 @@ > umc_tools.SIZE_SMALL ) > self.__startups = startup.List() > self.active = ActiveProcess() >+ init_req = None > for name, cmd in module[ 'commands' ].items(): >- if cmd[ 'startup' ] or name == init_cmd: >+ if cmd[ 'startup' ]: > req = umcp.Command( args = [ name ], incomplete = True ) > # add returns the position of new startup command >- pos = self.__startups.add( req, cmd[ 'short_description' ], cmd[ 'long_description' ], >+ self.__startups.add( req, cmd[ 'short_description' ], cmd[ 'long_description' ], > cmd[ 'priority' ], cmd[ 'caching' ] ) > # if current command is init_cmd then select this as new active tab >- if name == init_cmd: >- self.selected = pos >+ elif name == init_cmd: >+ init_req = umcp.Command( args = [ name ], incomplete = True ) >+ if not self.categorylist_hide: >+ self.selected = self.__startups.add( init_req, cmd[ 'short_description' ], cmd[ 'long_description' ], >+ cmd[ 'priority' ], cmd[ 'caching' ] ) > > # run command of first category >- cmd = self.__startups[ self.selected ] >- self.active.single( client.request_send( cmd.request ) ) >+ if init_req and self.categorylist_hide: >+ self.active.single( client.request_send( init_req ) ) >+ else: >+ cmd = self.__startups[ self.selected ] >+ self.active.single( client.request_send( cmd.request ) ) > self.categories = self.__startups.categories() > > def focused( self ): >@@ -262,9 +269,13 @@ > ud.debug( ud.ADMIN, ud.INFO, 'Module.layout: check last response message: %s' % str( last_resp.arguments ) ) > # if there is no dialog > if len( last_resp.dialog ) == 1 and list.__getitem__( last_resp.dialog, 0 ) == None: >- ud.debug( ud.ADMIN, ud.INFO, 'Module.layout: info layout' ) >+ ud.debug( ud.ADMIN, ud.INFO, 'Module.layout: no dialog found' ) >+ # ... check if there is a referrer and popup_infos >+ if last_resp.status() in ( 201, 301 ) and self.__restore_referrer: >+ self.__layout = cmd.cache >+ self.__restore_referrer = False > # ... display simple info message if report is set >- if last_resp.report: >+ elif last_resp.report: > self.__layout = cmd.info_message( last_resp.report ) > # ... re-invoke startup command or show cache > else: >Index: management/univention-management-console/modules/frontend/univention-console-frontend.py >=================================================================== >--- management/univention-management-console/modules/frontend/univention-console-frontend.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/frontend/univention-console-frontend.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -49,7 +49,10 @@ > > watchdog = time.time() > watchdog_timeout = 60 * 5 >-watchdog_timeout_short = 30 >+try: >+ watchdog_timeout_short = abs(int(configRegistry.get('umc/web/timeout/presession', ''))) >+except ValueError: >+ watchdog_timeout_short = 5 > > THREAD_ERRORS = [] > >Index: management/univention-management-console/modules/univention/management/console/wizards/basis/__init__.py >=================================================================== >--- management/univention-management-console/modules/univention/management/console/dialog/ajax.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/dialog/ajax.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -35,7 +35,7 @@ > import random > > class RefreshFrame( base.HTML ): >- def __init__( self, sessionid, command, opts = {}, attributes = {}, maxlen=300000, refresh_interval=3000 ): >+ def __init__( self, sessionid, command, opts = {}, attributes = {}, maxlen=300000, refresh_interval=3000, no_concurrency=False ): > """ > Returns a frame with specified geometry and refreshes its content every 'refresh_interval' miliseconds by calling > specified 'command' and passing 'opts' as command options. >@@ -46,6 +46,12 @@ > attributes: dictionary with widget attributes (colspan, width (in pixel), height (in pixel)) > maxlen: maximum length of data shown in frame (don't use too large values - it will slow down your browser) > refresh_interval: interval in miliseconds >+ no_concurrency: if set to False, RefreshFrame will send out at regulary interval (refresh_interval) a new >+ request regardless of any outstanding requests. >+ If set to True, a new request will be sent after refresh_interval miliseconds after the last >+ request has been answered. >+ Note: in this case if your request requires 1 seconds to be answered and the refresh_interval >+ is 3 seconds, then a new request is sent every 4 seconds! If an answer get > > Example for revamp: > result.add_row( [ umcd.RefreshFrame( self._sessionid, 'some/command', { 'foo1': 3, 'ding': 'dong' }, attributes = { 'colspan': '3', 'width': '750', 'height': '400' }, refresh_interval=1000) ] ) >@@ -93,43 +99,58 @@ > var umc = {}; > umc.ajax = {}; > umc.ajax.refreshframe = {}; >+umc.ajax.refreshframe.concurrency = %(concurrency)s; > umc.ajax.refreshframe.updateData = function(refreshurl, wndid, dataid, maxlen) { >- var xhrArgs = { >- url: refreshurl, >- handleAs: 'json', >- preventCache: true, >- load: function(data) { >- if (!(data['contentappend'] === undefined)) { >- var newdata = dojo.byId( dataid ).innerHTML + data['contentappend']; >- if (newdata.length > maxlen) { >- newdata = newdata.substr(newdata.length - maxlen, maxlen); >+ var xhrArgs = { >+ url: refreshurl, >+ handleAs: 'json', >+ preventCache: true, >+ load: function(data) { >+ try { >+ var contentappend = data['contentappend']; >+ if (contentappend !== undefined && contentappend.length > 0) { >+ var dataobj = dojo.byId(dataid); >+ var newdata = dataobj.innerHTML + contentappend; >+ if (newdata.length > maxlen) { >+ newdata = newdata.substr(newdata.length - maxlen, maxlen); >+ } >+ dataobj.innerHTML = newdata; >+ var winobj = dojo.byId(wndid); >+ winobj.scrollTop = winobj.scrollHeight; > } >- dojo.byId( dataid ).innerHTML = newdata; >- if (data['contentappend'].length > 0) { >- dojo.byId( wndid ).scrollTop = dojo.byId( wndid ).scrollHeight; >+ } catch(err) { ; } >+ try { >+ var content = data['content']; >+ if (content !== undefined && content.length > 0) { >+ var dataobj = dojo.byId(dataid); >+ dataobj.innerHTML = content; >+ var winobj = dojo.byId(wndid); >+ winobj.scrollTop = winobj.scrollHeight; > } >- } >- if (!(data['content'] === undefined)) { >- dojo.byId( dataid ).innerHTML = data['content']; >- if (data['contentappend'].length > 0) { >- dojo.byId( wndid ).scrollTop = dojo.byId( wndid ).scrollHeight; >- } >- } >+ } catch(err) { ; } > for (var curdataid in data) { >- if ((curdataid != 'contentappend') && (curdataid != 'content')) { >- dojo.byId( curdataid ).innerHTML = data[curdataid]; >+ if ((curdataid != 'contentappend') && (curdataid != 'content')) { >+ try { >+ var dataobj = dojo.byId(curdataid); >+ dataobj.innerHTML = data[curdataid]; >+ } catch(err) { ; } > } > } >- }, >- } >- var deferred = dojo.xhrGet(xhrArgs); >+ if ( umc.ajax.refreshframe.concurrency === false ) { >+ window.setTimeout( function() { umc.ajax.refreshframe.updateData(refreshurl, wndid, dataid, maxlen);}, %(interval)s); >+ } >+ } >+ }; >+ var deferred = dojo.xhrGet(xhrArgs); > }; > dojo.addOnLoad (function() { >- url = 'ajax.py?session_id=%(sessionid)s&umcpcmd=%(command)s&%(options)s'; >- wndid = 'wnd%(identifier)s'; >- dataid = 'data%(identifier)s'; >+ var url = 'ajax.py?session_id=%(sessionid)s&umcpcmd=%(command)s&%(options)s'; >+ var wndid = 'wnd%(identifier)s'; >+ var dataid = 'data%(identifier)s'; > umc.ajax.refreshframe.updateData(url, wndid, dataid, %(maxlen)d); >- window.setInterval( function() { umc.ajax.refreshframe.updateData(url, wndid, dataid, %(maxlen)d);}, %(interval)s); >+ if ( umc.ajax.refreshframe.concurrency ) { >+ window.setInterval( function() { umc.ajax.refreshframe.updateData(url, wndid, dataid, %(maxlen)d);}, %(interval)s); >+ } > }); > </script> > """ % { 'sessionid': sessionid, >@@ -138,6 +159,7 @@ > 'options': url_options, > 'interval': refresh_interval, > 'identifier': identifier, >+ 'concurrency': str(bool(not(no_concurrency))).lower(), > } > > html = '%s%s' % (txt_div, txt_javascript) >Index: management/univention-management-console/modules/univention/management/console/handlers/baseconfig/_revamp.py >=================================================================== >--- management/univention-management-console/modules/univention/management/console/dialog/wizard.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/dialog/wizard.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -44,6 +44,7 @@ > _ = locales.Translation( 'univention.management.console.dialog' ).translate > > class Wizard( Element ): >+ """Low-level graphical representation for a Wizard page.""" > def __init__( self, title = '' ): > Element.__init__( self ) > self._title = title >@@ -51,12 +52,15 @@ > self._image = None > > def set_image( self, image ): >+ """Set top-left image to instance of umcd.Image.""" > self._image = image > > def add_option( self, text, option ): >+ """Add widget to this Wizard page.""" > self._content.add_row( [ option, text ] ) > > def add_buttons( self, *args ): >+ """Add buttons to this Wizard page.""" > if self._image: > self._content.add_row( [ Fill( 2 ) ] ) > self._content.add_row( [ '', args ] ) >@@ -65,6 +69,7 @@ > self._content.add_row( [ args ] ) > > def setup( self ): >+ """Convert Wizard to dialog element.""" > if self._image: > self._image[ 'width' ] = '100' > return Frame( [ List( content = [ [ Cell( self._image, { 'valign' : 'top' } ), self._content ] ], attributes = { 'width' : '100%' } ) ], self._title ) >@@ -77,6 +82,7 @@ > # dialog class above. An example can be found in the UVMM UMC module > > class Page( object ): >+ """High-level implementation of a wizard page.""" > def __init__( self, title = '', description = '' ): > self.title = title > self.description = description >@@ -86,6 +92,7 @@ > self.hint = None > > def setup( self, command, options, prev = True, next = True, finish = False, cancel = True ): >+ """Convert this page into graphical representation. Returns a Wizard instance containing description, hint, options and buttons.""" > wizard = Wizard( self.title ) > # add description > if self.description: >@@ -129,7 +136,7 @@ > if next: > opts = copy_module.copy( options ) > opts[ 'action' ] = 'next' >- next_btn = Button( _( 'Next' ), actions = ( Action( umcp.SimpleCommand( command, opts ), items ), ), attributes = { 'class' : 'button_right' }, default = True ) >+ next_btn = Button( _( 'Next' ), actions = ( Action( umcp.SimpleCommand( command, opts ), items ), ), attributes = { 'class' : 'button_right' }, default = True, close_dialog = False ) > elif finish: > opts = copy_module.copy( options ) > opts[ 'action' ] = 'finish' >@@ -153,7 +160,7 @@ > opts[ 'action' ] = 'prev' > prev = umcp.SimpleCommand( command, opts ) > prev.verify_options = False >- prev_btn = Cell( Button( _( 'Previous' ), actions = ( Action( prev, items ), ), attributes = { 'class' : 'cancel' } ), attributes = { 'type' : 'button_padding' } ) >+ prev_btn = Cell( Button( _( 'Previous' ), actions = ( Action( prev, items ), ), attributes = { 'class' : 'cancel' }, close_dialog = False ), attributes = { 'type' : 'button_padding' } ) > else: > prev_btn = '' > >@@ -166,14 +173,17 @@ > return wizard.setup() > > class WizardResult( object ): >+ """Encapsulate result of a Wizard page. value=True to continue to next page, value=False & text to stay on the current page.""" > def __init__( self, value =True, text = '' ): > self.value = value > self.text = text > > def __nonzero__( self ): >+ """Return True, if the Wizard page in complete and the next Wizard should switch to the next page.""" > return self.value > > class IWizard( list ): >+ """High-level implementation of a wizard containing a list of wizard pages, stacked on top of each other in card layout fashion.""" > def __init__( self, command = '' ): > list.__init__( self ) > self.current = None >@@ -182,13 +192,16 @@ > self._result = None > > def replace_title( self, title ): >+ """Set title of all pages.""" > for page in self: > page.title = title > > def result( self ): >+ """Return the result storged by the last Wizard page.""" > return self._result > > def action( self, object ): >+ """Call the function responsible for handling the action (object.options['action']), falling back to 'next'.""" > if 'action' in object.options: > action = object.options[ 'action' ] > del object.options[ 'action' ] >@@ -201,17 +214,18 @@ > return WizardResult( False, 'Unknown wizard action: %s' % action ) > > def setup( self, object, prev = None, next = None, finish = None, cancel = None ): >+ """Create graphical representation for the current Wizard page.""" > if prev == True: > force_prev = True > else: > force_prev = False >- if prev == None: >+ if prev is None: > prev = True >- if next == None: >+ if next is None: > next = True >- if finish == None: >+ if finish is None: > finish = False >- if cancel == None: >+ if cancel is None: > cancel = True > if self.current == ( len( self ) - 1 ): # last page > next = False >@@ -219,12 +233,16 @@ > finish = True > elif not self.current: > prev = force_prev >- return self[ self.current ].setup( self.command, object.options, prev = prev, next = next, finish = finish, cancel = cancel ) > >+ page = self[self.current] >+ return page.setup(self.command, object.options, prev=prev, next=next, finish=finish, cancel=cancel) >+ > def finish( self, object ): >+ """Convert the internally collected data of this Wizard into the external representation.""" > return WizardResult( False, 'finish is not implemented!' ) > > def next( self, object ): >+ """Transition to the next Wizard page.""" > if self.current == None: > self.current = 0 > elif self.current == ( len( self ) - 1 ): >@@ -234,8 +252,8 @@ > > return WizardResult() > >- > def prev( self, object ): >+ """Transition to the previous Wizard page.""" > if self.current == 0: > return None > else: >@@ -244,9 +262,10 @@ > return WizardResult() > > def cancel( self, object ): >+ """Cancel the complete Wizard.""" > return WizardResult( False, 'cancel is not implemented!' ) > > def reset( self ): >+ """Reset Wizard back to initial values.""" > self.current = None > self._result = None >- >Index: management/univention-management-console/modules/univention/management/console/dialog/ajax.py >=================================================================== >--- management/univention-management-console/modules/univention/management/console/handlers/baseconfig/de.po (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/handlers/baseconfig/de.po (.../release-ucs-2.4-3) (Revision 27072) >@@ -30,127 +30,134 @@ > msgstr "" > "Project-Id-Version: PACKAGE VERSION\n" > "Report-Msgid-Bugs-To: \n" >-"POT-Creation-Date: 2009-02-16 10:46+0100\n" >-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" >+"POT-Creation-Date: 2011-07-27 10:10+0200\n" >+"PO-Revision-Date: 2011-07-27 11:12+0200\n" > "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" > "Language-Team: LANGUAGE <LL@li.org>\n" > "MIME-Version: 1.0\n" > "Content-Type: text/plain; charset=UTF-8\n" > "Content-Transfer-Encoding: unicode\n" > >-#: _revamp.py:81 _types.py:90 >+#: __init__.py:56 >+msgid "Univention Configuration Registry" >+msgstr "" >+ >+#: __init__.py:57 >+msgid "Add, modify and search Univention Configuration Registry variables" >+msgstr "Hinzufügen, Beareiten und Suchen von Configuration Registry Variablen" >+ >+#: __init__.py:62 >+msgid "Add" >+msgstr "Hinzufügen" >+ >+#: __init__.py:63 >+msgid "Add a new configuration registry variable" >+msgstr "Hinzufügen einer neuen Configuration Registry Variable" >+ >+#: __init__.py:74 >+msgid "Show" >+msgstr "Anzeigen" >+ >+#: __init__.py:75 >+msgid "Display information about a configuration registry variable" >+msgstr "Anzeigen von Informationen zu einer Configuration Registry Variable" >+ >+#: __init__.py:80 >+msgid "Remove" >+msgstr "Entfernen" >+ >+#: __init__.py:81 >+msgid "Unset a configuration registry value" >+msgstr "Entfernen eines Configuration Registry Wertes" >+ >+#: __init__.py:86 >+msgid "Search" >+msgstr "Suchen" >+ >+#: __init__.py:87 >+msgid "Search for a configuration registry value" >+msgstr "Suchen eines Configuration Registry Wertes" >+ >+#: __init__.py:157 >+#, python-format >+msgid "" >+"ERROR: UCR variable <i>%s</i> is read-only! Variable has not been created or " >+"changed!" >+msgstr "ERROR: Die UCR-Variable <i>%s</i> darf nicht verändert werden! Die Variable wurde nicht angelegt oder modifiziert." >+ >+#: _revamp.py:83 _types.py:94 > msgid "Variable" > msgstr "Variable" > >-#: _revamp.py:81 _types.py:90 _types.py:98 >+#: _revamp.py:83 _types.py:94 _types.py:102 > msgid "Value" > msgstr "Wert" > >-#: _revamp.py:81 _revamp.py:188 _types.py:91 _types.py:104 >+#: _revamp.py:83 _revamp.py:196 _types.py:95 _types.py:108 > msgid "Description" > msgstr "Beschreibung" > >-#: _revamp.py:82 >+#: _revamp.py:84 > msgid "Categories" > msgstr "Kategorien" > >-#: _revamp.py:124 >+#: _revamp.py:126 > #, python-format > msgid "Variable: %(key)s" > msgstr "Variable: %(key)s" > >-#: _revamp.py:128 >+#: _revamp.py:130 > msgid "No configuration registry variables were found." > msgstr "Es wurden keine Configuration Registry Variablen gefunden." > >-#: _revamp.py:130 >-msgid "Search result" >+#: _revamp.py:132 >+msgid "Search results" > msgstr "Suchergebnis" > >-#: _revamp.py:188 _types.py:105 >+#: _revamp.py:196 _types.py:109 > msgid "Language" > msgstr "Sprache" > >-#: _revamp.py:203 >+#: _revamp.py:211 > msgid "Modify Configuration Registry variable" > msgstr "Bearbeiten einer Configuration Registry Variable" > >-#: _revamp.py:205 >+#: _revamp.py:213 > msgid "Add Configuration Registry variable(s)" > msgstr "Hinzufügen einer Configuration Registry Variable" > >-#: __init__.py:54 >-msgid "Univention Configuration Registry" >-msgstr "" >- >-#: __init__.py:55 >-msgid "Add, modify and search Univention Configuration Registry variables" >-msgstr "Hinzufügen, Beareiten und Suchen von Configuration Registry Variablen" >- >-#: __init__.py:60 >-msgid "Add" >-msgstr "Hinzufügen" >- >-#: __init__.py:61 >-msgid "Add a new configuration registry variable" >-msgstr "Hinzufügen einer neuen Configuration Registry Variable" >- >-#: __init__.py:72 >-msgid "Show" >-msgstr "Anzeigen" >- >-#: __init__.py:73 >-msgid "Display information about a configuration registry variable" >-msgstr "Anzeigen von Informationen zu einer Configuration Registry Variable" >- >-#: __init__.py:78 >-msgid "Remove" >-msgstr "Entfernen" >- >-#: __init__.py:79 >-msgid "Unset a configuration registry value" >-msgstr "Entfernen eines Configuration Registry Wertes" >- >-#: __init__.py:84 >-msgid "Search" >-msgstr "Suchen" >- >-#: __init__.py:85 >-msgid "Search for a configuration registry value" >-msgstr "Suchen eines Configuration Registry Wertes" >- >-#: _types.py:41 >+#: _types.py:45 > msgid "Category" > msgstr "Kategorie" > >-#: _types.py:62 >+#: _types.py:66 > msgid "All (incl. not registered)" > msgstr "Alle (inkl. nicht registrierter)" > >-#: _types.py:63 >+#: _types.py:67 > msgid "All" > msgstr "Alle" > >-#: _types.py:71 >+#: _types.py:75 > msgid "List of categories" > msgstr "Liste der Kategorien" > >-#: _types.py:78 >+#: _types.py:82 > msgid "Types" > msgstr "Typen" > >-#: _types.py:81 >+#: _types.py:85 > msgid "String" > msgstr "Zeichenkette" > >-#: _types.py:87 >+#: _types.py:91 > msgid "Search key" > msgstr "Suchmaske" > >-#: _types.py:96 >+#: _types.py:100 > msgid "Key" > msgstr "Schlüssel" > >-#: _types.py:106 >+#: _types.py:110 > msgid "Multilinugal description" > msgstr "Mehrsprachige Beschreibung" >Index: management/univention-management-console/modules/univention/management/console/handlers/baseconfig/__init__.py >=================================================================== >--- management/univention-management-console/modules/univention/management/console/handlers/baseconfig/__init__.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/handlers/baseconfig/__init__.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -129,28 +129,47 @@ > info.add_variable( options[ 'key' ], var ) > info.write_customized() > >+ def is_readonly( self, key ): >+ ucrinfo_system = ConfigRegistryInfo( registered_only=False, load_customized=False ) >+ var = ucrinfo_system.get_variable( key ) >+ if var: >+ return var.get('readonly') in ['yes','1','true'] >+ return False >+ > def baseconfig_set( self, object ): > success = True >+ report = None > > ud.debug( ud.ADMIN, ud.INFO, 'Baseconfig.set: options: %s' % str( object.options ) ) > if object.incomplete: > object.status( 200 ) > elif object.options.has_key( 'key' ) and \ > object.options.has_key( 'value' ): >+ > value = object.options[ 'value' ] > if value == None: > value = '' >- arg = [ '%s=%s' % ( object.options[ 'key' ].encode(), value.encode() ) ] >- univention.config_registry.handler_set( arg ) >- if object.options.get( 'descriptions', '' ) or object.options.get( 'type', '' ) or \ >- object.options.get( 'categories', '' ): >- self.__create_variable_info( object.options ) >- object.status( 200 ) >+ >+ ucr = univention.config_registry.ConfigRegistry() >+ ucr.load() >+ if self.is_readonly(object.options['key']) and not(value == ucr.get(object.options['key'],'')): >+ # fail if existing UCR variable shall be created >+ report = _('ERROR: UCR variable <i>%s</i> is read-only! Variable has not been created or changed!') % object.options['key'] >+ success = False >+ object.status( 201 ) >+ else: >+ # edit existing UCR variable >+ arg = [ '%s=%s' % ( object.options[ 'key' ].encode(), value.encode() ) ] >+ univention.config_registry.handler_set( arg ) >+ if object.options.get( 'descriptions', '' ) or object.options.get( 'type', '' ) or \ >+ object.options.get( 'categories', '' ): >+ self.__create_variable_info( object.options ) >+ object.status( 200 ) > else: > success = False > object.status( 403 ) > >- self.finished( object.id(), None, success = success ) >+ self.finished( object.id(), [ None, None ], success = success, report = report ) > > def baseconfig_unset( self, object ): > if object.options.has_key( 'key' ): >@@ -163,15 +182,16 @@ > """this method returns a dictionary of configuration registry variables > found by searching for the (wildcard) expression defined by the UMCP > request. Additionally a list of configuration registry categories can be defined""" >+ key = object.options['key'] > if not object.incomplete: > baseInfo = ConfigRegistryInfo( registered_only = False ) > vars = baseInfo.get_variables() >- if vars.has_key( object.options[ 'key' ] ): >- self.finished( object.id(), vars[ object.options[ 'key' ] ] ) >+ if vars.has_key(key): >+ self.finished( object.id(), [ vars[key], self.is_readonly(key) ] ) > else: >- self.finished( object.id(), None, success = False ) >+ self.finished( object.id(), [ None, None ], success = False ) > else: >- self.finished( object.id(), None, success = False ) >+ self.finished( object.id(), [ None, None ], success = False ) > > def baseconfig_search( self, object ): > """this method returns a dictionary of configuration registry variables >Index: management/univention-management-console/modules/univention/management/console/handlers/__init__.py >=================================================================== >--- management/univention-management-console/modules/univention/management/console/handlers/baseconfig/_revamp.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/handlers/baseconfig/_revamp.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -139,7 +139,8 @@ > form = umcd.List() > > ud.debug( ud.ADMIN, ud.INFO, 'Baseconfig.show: options: %s' % str( res.dialog ) ) >- variable = res.dialog >+ variable, is_readonly = res.dialog >+ > # name > if variable != None: > varname = umcd.make_readonly( self[ 'baseconfig/set' ][ 'key' ], >@@ -149,7 +150,10 @@ > > # value > if variable != None: >- value = umcd.make( self[ 'baseconfig/set' ][ 'value' ], default = variable.value ) >+ if is_readonly: >+ value = umcd.make_readonly( self[ 'baseconfig/set' ][ 'value' ], default = variable.value ) >+ else: >+ value = umcd.make( self[ 'baseconfig/set' ][ 'value' ], default = variable.value ) > else: > value = umcd.make( self[ 'baseconfig/set' ][ 'value' ] ) > form.add_row( [ varname, value ] ) >Index: management/univention-management-console/modules/univention/management/console/handlers/baseconfig/de.po >=================================================================== >--- management/univention-management-console/modules/univention/management/console/handlers/__init__.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/handlers/__init__.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -265,7 +265,7 @@ > > > def revamped( self, id, res, rawresult = False ): >- """this method should in invoked by '_revamp' functions that are >+ """this method should be invoked by '_revamp' functions that are > called after a command was successfully processed. It should be > used to modify the result dialog to fit the specified client > interface""" >Index: management/univention-management-console/modules/univention/management/console/protocol/session.py >=================================================================== >--- management/univention-management-console/modules/univention/management/console/protocol/session.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/protocol/session.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -105,6 +105,8 @@ > self.signal_new( 'result' ) > self.signal_new( 'finished' ) > self.name = module >+ self.running = False >+ self._queued_requests = [] > > def __del__( self ): > ud.debug( ud.ADMIN, ud.PROCESS, 'ModuleProcess: dying' ) >@@ -326,7 +328,11 @@ > notifier.timer_add( 50, cb ) > else: > ud.debug( ud.ADMIN, ud.INFO, 'passing new request to running module %s' % module_name ) >- self.__processes[ module_name ].request( msg ) >+ proc = self.__processes[ module_name ] >+ if proc.running: >+ proc.request( msg ) >+ else: >+ proc._queued_requests.append( msg ) > > def _mod_connect( self, mod, msg ): > ud.debug( ud.ADMIN, ud.PROCESS, 'trying to connect' ) >@@ -343,6 +349,7 @@ > return True > else: > ud.debug( ud.ADMIN, ud.INFO, 'ok') >+ mod.running = True > > # send acls > acls = self.acls.acls >@@ -368,6 +375,9 @@ > mod.request( req ) > > mod.request( msg ) >+ for req in mod._queued_requests: >+ mod.request( req ) >+ mod._queued_requests = [] > > return False > >Index: management/univention-management-console/usr/sbin/univention-management-console-module.py >=================================================================== >--- management/univention-management-console/modules/univention/management/console/wizards/basis/__init__.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/modules/univention/management/console/wizards/basis/__init__.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -67,10 +67,10 @@ > short_description = _( 'Base configuration' ), > long_description = _( 'Set base configuration' ), > method = 'basis_set', >- values = { 'hostname' : umc.String( _( 'Hostname' ) ), >- 'domainname' : umc.String( _( 'Domain name' ) ), >- 'windows_domain' : umc.String( _( 'Windows domain' ) ), >- 'ldap_base' : umc.String( _( 'LDAP base' ) ), }, >+ values = { 'hostname' : umc.String( _( 'Hostname' ), regex = r'^[a-z]([a-z0-9-]*[a-z0-9])*$' ), >+ 'domainname' : umc.String( _( 'Domain name' ), regex = r'^([a-z0-9]([a-z0-9-]*[a-z0-9])*[.])*[a-z0-9]([a-z0-9-]*[a-z0-9])*$' ), >+ 'windows_domain' : umc.String( _( 'Windows domain' ), regex = r'^([a-z]([a-z0-9-]*[a-z0-9])*[.])*[a-z]([a-z0-9-]*[a-z0-9])*$' ), >+ 'ldap_base' : umc.String( _( 'LDAP base' ), regex = r'^((dc|cn|c|o|l)=[^ ,=]+,)*(dc|cn|c|o|l)=[^ ,=]+$' ), }, > ), > } > >Index: management/univention-management-console/modules/univention/management/console/dialog/wizard.py >=================================================================== >--- management/univention-management-console/usr/sbin/univention-management-console-module.py (.../release-ucs-2.4-2/ucs) (Revision 27072) >+++ management/univention-management-console/usr/sbin/univention-management-console-module.py (.../release-ucs-2.4-3) (Revision 27072) >@@ -49,7 +49,7 @@ > sys.stderr.write( '%s must be started as root\n' % os.path.basename( sys.argv[ 0 ] ) ) > sys.exit( 1 ) > >- notifier.init( notifier.GENERIC ) >+ notifier.init( notifier.GENERIC, recursive_depth = 50 ) > > parser = OptionParser( usage = "usage: %prog [options]" ) > parser.add_option( '-s', '--socket', type = 'string', action = 'store', >Index: management/univention-ldap/schema/samba.schema >===================================================================
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 23738
: 3539