diff --git a/scripts/migrate_nextcloud_backup_account.py b/scripts/migrate_nextcloud_backup_account.py index 2b8735e..e32fd8e 100644 --- a/scripts/migrate_nextcloud_backup_account.py +++ b/scripts/migrate_nextcloud_backup_account.py @@ -105,10 +105,13 @@ def run(args, receipt): if matches: share = matches[0] else: - share = ocs(auth, method='POST', fields={'path':FOLDER,'shareType':3,'permissions':4,'publicUpload':'true','label':LABEL,'sendMail':'false'}) + share = ocs(auth, method='POST', fields={'path':FOLDER,'shareType':3,'permissions':4,'label':LABEL,'sendMail':'false'}) created = True share_id = str(share['id']) receipt['share_id'] = share_id + receipt['observed_permissions'] = int(share['permissions']) + receipt['owner_matches'] = share.get('uid_owner') == 'Backup' + receipt['path_matches'] = share.get('path') == FOLDER if share.get('uid_owner') != 'Backup' or share.get('path') != FOLDER or int(share['permissions']) != 4: if created: ocs(auth, '/' + share_id, 'DELETE')