diff --git a/mobile/lib/services/collections_service.dart b/mobile/lib/services/collections_service.dart index dab510580..d8f089b7d 100644 --- a/mobile/lib/services/collections_service.dart +++ b/mobile/lib/services/collections_service.dart @@ -32,6 +32,7 @@ import "package:photos/models/files_split.dart"; import "package:photos/models/metadata/collection_magic.dart"; import 'package:photos/services/app_lifecycle_service.dart'; import "package:photos/services/favorites_service.dart"; +import "package:photos/services/feature_flag_service.dart"; import 'package:photos/services/file_magic_service.dart'; import 'package:photos/services/local_sync_service.dart'; import 'package:photos/services/remote_sync_service.dart'; @@ -1161,6 +1162,9 @@ class CollectionsService { await _addToCollection(dstCollectionID, splitResult.ownedByCurrentUser); } if (splitResult.ownedByOtherUsers.isNotEmpty) { + if (!FeatureFlagService.instance.isInternalUserOrDebugBuild()) { + throw ArgumentError('Cannot add files owned by other users'); + } late final List filesToCopy; late final List filesToAdd; (filesToAdd, filesToCopy) = (await _splitFilesToAddAndCopy(