Закрыт доступ к удалённому профилю доменного пользователя

master-3.5 3.5.5.1
parent 8734311aed
commit 4b9f881860

@ -974,6 +974,11 @@ class Client(commandServer, encrypt, Desktop):
self.umountRemoteUserRes(True,
*self.clVars.Get('cl_client_user_mount_name'))
return True
def umountPath(self, upath):
if upath and not self.umountSleepPath(upath):
return False
return True
def getDefaultRunlevelDaemons(self):
"""

@ -240,6 +240,12 @@ class ClClientSyncLoginAction(Action):
'method': 'Client.setSyncStatus(ur_home_path,ur_uid,ur_gid,"error")',
'depend': Tasks.hasnot('success_sync', 'failed')
},
# отключить удалённый профиль
{'name': 'domain_sync:umount_unix',
'message': 'Umount {cl_client_user_mount_unix_path}',
'method': 'Client.umountPath(cl_client_user_mount_unix_path)',
'depend': Tasks.hasnot('failed')
},
# отключить ресурсы в случае ошибки
{'name': 'umount_remote_res',
'message': __("Umounting user resources"),
@ -279,6 +285,10 @@ class ClClientSyncLogoutAction(Action):
'condition': lambda Get: path.exists(Get('ur_home_path')),
'else_error': __("Home directory {ur_home_path} not found"),
},
{'name': 'domain_user:mount_local',
'method': 'Client.mountUserDomainRes(ur_login,desktop.ur_password,'
'ur_uid,ur_gid,"unix")',
},
# проверить наличие подключенных ресурсов
{'name': 'domain_user:check_mount',
'condition': lambda Get: any(x and isMount(x)

@ -488,6 +488,15 @@ class VariableClClientUserMountData(ReadonlyTableVariable):
return list(generate())
class VariableClClientUserMountUnixPath(ReadonlyVariable):
"""
Путь до подключенного unix ресурса данного пользователя
"""
def get(self):
return self.select('cl_client_user_mount_path',
cl_client_user_mount_name='unix', limit=1) or ""
class VariableClClientUserMountName(FieldValue, ReadonlyVariable):
"""
Название удаленного ресурса

Loading…
Cancel
Save