[mob][photos] Add assert to ensure copy is enabled for internal users
This commit is contained in:
parent
c165b9ee9c
commit
72ddbbdf79
1 changed files with 4 additions and 0 deletions
|
@ -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<EnteFile> filesToCopy;
|
||||
late final List<EnteFile> filesToAdd;
|
||||
(filesToAdd, filesToCopy) = (await _splitFilesToAddAndCopy(
|
||||
|
|
Loading…
Add table
Reference in a new issue