mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix variable definition for permission in backup
This commit is contained in:
parent
e9e857c325
commit
e556d010bc
1 changed files with 7 additions and 4 deletions
|
@ -1250,7 +1250,9 @@ class RestoreManager():
|
|||
'(&(objectClass=permissionYnh)(!(cn=main.mail))(!(cn=main.metronome))(!(cn=main.sftp)))',
|
||||
['cn']):
|
||||
if not ldap.remove('cn=%s,ou=permission' % per['cn'][0]):
|
||||
raise YunohostError('permission_deletion_failed', permission=permission, app=app)
|
||||
raise YunohostError('permission_deletion_failed',
|
||||
permission=per['cn'][0].split('.')[0],
|
||||
app=per['cn'][0].split('.')[1])
|
||||
|
||||
# Restore permission for the app which is installed
|
||||
for per in old_apps_permission:
|
||||
|
@ -1379,9 +1381,10 @@ class RestoreManager():
|
|||
group_name = group.split(',')[0].split('=')[1]
|
||||
if group_name not in group_list:
|
||||
entry['groupPermission'].remove(group)
|
||||
print(entry)
|
||||
if not ldap.add('cn=%s,ou=permission' % entry['cn'][0], entry):
|
||||
raise YunohostError('apps_permission_restoration_failed', permission=permission_name, app=app_name)
|
||||
raise YunohostError('apps_permission_restoration_failed',
|
||||
permission=entry['cn'][0].split('.')[0],
|
||||
app=entry['cn'][0].split('.')[1])
|
||||
else:
|
||||
from yunohost.tools import _get_migration_by_name
|
||||
setup_group_permission = _get_migration_by_name("setup_group_permission")
|
||||
|
|
Loading…
Add table
Reference in a new issue