mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Sync permission at the end of backup
This commit is contained in:
parent
146c4093b4
commit
f999f85507
1 changed files with 5 additions and 2 deletions
|
@ -910,11 +910,12 @@ class RestoreManager():
|
||||||
service_regen_conf(names=['slapd'], force=True)
|
service_regen_conf(names=['slapd'], force=True)
|
||||||
migration_0009.migrate_LDAP_db(auth)
|
migration_0009.migrate_LDAP_db(auth)
|
||||||
|
|
||||||
def clean(self):
|
def clean(self, auth):
|
||||||
"""
|
"""
|
||||||
End a restore operations by cleaning the working directory and
|
End a restore operations by cleaning the working directory and
|
||||||
regenerate ssowat conf (if some apps were restored)
|
regenerate ssowat conf (if some apps were restored)
|
||||||
"""
|
"""
|
||||||
|
from permission import permission_sync_to_user
|
||||||
|
|
||||||
successfull_apps = self.targets.list("apps", include=["Success", "Warning"])
|
successfull_apps = self.targets.list("apps", include=["Success", "Warning"])
|
||||||
|
|
||||||
|
@ -923,6 +924,8 @@ class RestoreManager():
|
||||||
# ldap restore hooks
|
# ldap restore hooks
|
||||||
os.system('sudo yunohost app ssowatconf')
|
os.system('sudo yunohost app ssowatconf')
|
||||||
|
|
||||||
|
permission_sync_to_user(auth, force=True)
|
||||||
|
|
||||||
if os.path.ismount(self.work_dir):
|
if os.path.ismount(self.work_dir):
|
||||||
ret = subprocess.call(["umount", self.work_dir])
|
ret = subprocess.call(["umount", self.work_dir])
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
|
@ -1135,7 +1138,7 @@ class RestoreManager():
|
||||||
self._migrate_system_if_needed(auth)
|
self._migrate_system_if_needed(auth)
|
||||||
self._restore_apps(auth)
|
self._restore_apps(auth)
|
||||||
finally:
|
finally:
|
||||||
self.clean()
|
self.clean(auth)
|
||||||
|
|
||||||
def _patch_backup_csv_file(self):
|
def _patch_backup_csv_file(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue