Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Force disable it for non internal users

Manav Rathi5ba2e35af6e7
diff --git a/web/apps/photos/src/utils/machineLearning/config.ts b/web/apps/photos/src/utils/machineLearning/config.ts
index 4d2030ca3e..30a65b8f1d 100644
--- a/web/apps/photos/src/utils/machineLearning/config.ts
+++ b/web/apps/photos/src/utils/machineLearning/config.ts
@@ -10,6 +10,7 @@ import mlIDbStorage, {
ML_SYNC_CONFIG_NAME,
ML_SYNC_JOB_CONFIG_NAME,
} from "utils/storage/mlIDbStorage";
+import { isInternalUser } from "utils/user";
export async function getMLSyncJobConfig() {
return mlIDbStorage.getConfig(
@@ -23,10 +24,15 @@ export async function getMLSyncConfig() {
}
export async function getMLSearchConfig() {
- return mlIDbStorage.getConfig(
- ML_SEARCH_CONFIG_NAME,
- DEFAULT_ML_SEARCH_CONFIG,
- );
+ if (isInternalUser()) {
+ return mlIDbStorage.getConfig(
+ ML_SEARCH_CONFIG_NAME,
+ DEFAULT_ML_SEARCH_CONFIG,
+ );
+ }
+ // Force disabled for everyone else while we finalize it to avoid redundant
+ // reindexing for users.
+ return DEFAULT_ML_SEARCH_CONFIG;
}
export async function updateMLSyncJobConfig(newConfig: JobConfig) {