forked from shaba/openuds
fixed service login/logout
This commit is contained in:
parent
b0d4be83a4
commit
903ccf2e0a
@ -260,7 +260,9 @@ class CommonService: # pylint: disable=too-many-instance-attributes
|
||||
)
|
||||
|
||||
# On first successfull initialization request, master token will dissapear for managed hosts so it will be no more available (not needed anyway)
|
||||
platform.store.writeConfig(self._cfg)
|
||||
if self.isManaged():
|
||||
platform.store.writeConfig(self._cfg)
|
||||
|
||||
# Setup logger now
|
||||
if self._cfg.own_token:
|
||||
logger.setRemoteLogger(self._api, self._cfg.own_token)
|
||||
@ -387,6 +389,8 @@ class CommonService: # pylint: disable=too-many-instance-attributes
|
||||
self._api.logout(self._cfg.own_token, username)
|
||||
self.onLogout(username)
|
||||
|
||||
self._cfg = self._cfg._replace(own_token=None)
|
||||
|
||||
# ****************************************
|
||||
# Methods that CAN BE overriden by actors
|
||||
# ****************************************
|
||||
|
@ -72,8 +72,8 @@ class SensLogon(win32com.server.policy.DesignatedWrapPolicy):
|
||||
self._service = service
|
||||
|
||||
def Logon(self, *args):
|
||||
logger.debug('Logon event: {}'.format(args))
|
||||
self._service.login(args[0] or '')
|
||||
logger.debug('Logon event: {}'.format(args))
|
||||
|
||||
def Logoff(self, *args):
|
||||
logger.debug('Logoff event: arguments: {}'.format(args))
|
||||
|
Loading…
x
Reference in New Issue
Block a user