diff --git a/mobile/lib/services/collections_service.dart b/mobile/lib/services/collections_service.dart index 8aca89c20..5761810c6 100644 --- a/mobile/lib/services/collections_service.dart +++ b/mobile/lib/services/collections_service.dart @@ -1170,6 +1170,13 @@ class CollectionsService { _logger.info("nothing to add to the collection"); return; } + final anyFileOwnedByOther = + files.any((e) => e.ownerID != null && e.ownerID != _config.getUserID()); + if (anyFileOwnedByOther) { + throw ArgumentError( + 'Cannot add files owned by other users, they should be copied', + ); + } final params = {}; params["collectionID"] = collectionID;