View | Details | Raw Unified | Return to bug 38370 | Differences between
and this patch

Collapse All | Expand All

(-)a/management/univention-management-console/src/univention/management/console/protocol/server.py (-1 / +4 lines)
 Lines 207-212   def _handle(self, state, msg): Link Here 
207
				self._response(response, state)
207
				self._response(response, state)
208
		elif msg.command == 'GET' and 'newsession' in msg.arguments:
208
		elif msg.command == 'GET' and 'newsession' in msg.arguments:
209
			CORE.info('Renewing session')
209
			CORE.info('Renewing session')
210
			if state.processor:
211
				state.locale = str(state.processor.locale)
210
			state.processor = None
212
			state.processor = None
211
			res = Response(msg)
213
			res = Response(msg)
212
			res.status = SUCCESS
214
			res.status = SUCCESS
 Lines 214-220   def _handle(self, state, msg): Link Here 
214
		else:
216
		else:
215
			# inform processor
217
			# inform processor
216
			if not state.processor:
218
			if not state.processor:
217
				state.processor = Processor(**state.credentials())
219
				state.processor = Processor(locale=state.locale, **state.credentials())
220
				state.locale = None
218
				state.processor.signal_connect('success', notifier.Callback(self._response, state))
221
				state.processor.signal_connect('success', notifier.Callback(self._response, state))
219
			state.processor.request(msg)
222
			state.processor.request(msg)
220
223
(-)a/management/univention-management-console/src/univention/management/console/protocol/session.py (-1 / +5 lines)
 Lines 94-99   def __init__(self, client, socket): Link Here 
94
		self.socket = socket
94
		self.socket = socket
95
		self.processor = None
95
		self.processor = None
96
		self.authenticated = False
96
		self.authenticated = False
97
		self.locale = None
97
		self.__credentials = None
98
		self.__credentials = None
98
		self.buffer = ''
99
		self.buffer = ''
99
		self.requests = {}
100
		self.requests = {}
 Lines 214-220   class Processor(Base): Link Here 
214
	:param str password: password of the user
215
	:param str password: password of the user
215
	"""
216
	"""
216
217
217
	def __init__(self, username, password, auth_type):
218
	def __init__(self, username, password, auth_type, locale=None):
218
		Base.__init__(self, 'univention-management-console')
219
		Base.__init__(self, 'univention-management-console')
219
		self.set_credentials(username, password, auth_type)
220
		self.set_credentials(username, password, auth_type)
220
221
 Lines 235-240   def __init__(self, username, password, auth_type): Link Here 
235
		self._reload_acls_and_permitted_commands()
236
		self._reload_acls_and_permitted_commands()
236
237
237
		self.signal_new('response')
238
		self.signal_new('response')
239
		if locale:
240
			self.set_language(locale)
241
			self.i18n.set_locale(locale)
238
242
239
	def set_credentials(self, username, password, auth_type):
243
	def set_credentials(self, username, password, auth_type):
240
		self.username = username
244
		self.username = username

Return to bug 38370