1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 06:49:37 +02:00

Import and Export Functionality (#698)

* feat(backup): add BackupViewSet for data export and import functionality

* Fixed frontend returning corrupt binary data

* feat(import): enhance import functionality with confirmation check and improved city/region/country handling

* Potential fix for code scanning alert no. 29: Information exposure through an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Refactor response handling to use arrayBuffer instead of bytes

* Refactor image cleanup command to use LocationImage model and update import/export view to include backup and restore functionality

* Update backup export versioning and improve data restore warning message

* Enhance image navigation and localization support in modal components

* Refactor location handling in Immich integration components for consistency

* Enhance backup and restore functionality with improved localization and error handling

* Improve accessibility by adding 'for' attribute to backup file input label

---------

Co-authored-by: Christian Zäske <blitzdose@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Sean Morley 2025-06-26 10:23:37 -04:00 committed by GitHub
parent 493a13995c
commit c461f7b105
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 2843 additions and 1114 deletions

View file

@ -297,7 +297,7 @@ class ImmichIntegrationView(viewsets.ViewSet):
is_authorized = True
# Level 3: Owner access
elif request.user.is_authenticated and request.user.id == owner_id:
elif request.user.is_authenticated and request.user == owner_id:
is_authorized = True
# Level 4: Shared collection access - check if user has access to any collection
@ -314,7 +314,7 @@ class ImmichIntegrationView(viewsets.ViewSet):
}, status=status.HTTP_403_FORBIDDEN)
else:
# No LocationImage exists; allow only the integration owner
if not request.user.is_authenticated or request.user.id != owner_id:
if not request.user.is_authenticated or request.user != owner_id:
return Response({
'message': 'Image is not linked to any location and you are not the owner.',
'error': True,