Skip to content

armgit / ente

Public Imported from GitHub
0

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

Refactor isInternalUserOrDebugBuild logic

Prateek Sunala569648c3963
diff --git a/mobile/apps/auth/lib/services/flagservice.dart b/mobile/apps/auth/lib/services/flagservice.dart
index 8c29e90e0a..c96ed16c6a 100644
--- a/mobile/apps/auth/lib/services/flagservice.dart
+++ b/mobile/apps/auth/lib/services/flagservice.dart
@@ -3,11 +3,15 @@ import 'package:flutter/foundation.dart';
class FeatureFlagService {
static bool isInternalUserOrDebugBuild() {
+ if (kDebugMode) return true;
+
final String? email = Configuration.instance.getEmail();
final userID = Configuration.instance.getUserID();
+
if (email == null || userID == null) {
- return kDebugMode;
+ return false;
}
- return (email.endsWith("@ente.io")) || (userID < 1000) || kDebugMode;
+
+ return email.endsWith("@ente.io") || (userID < 6);
}
}