π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fixed check for internal user
Neeraj Guptab674532f1669
diff --git a/lib/core/constants.dart b/lib/core/constants.dartindex bc59fccc0e..db105a11f4 100644--- a/lib/core/constants.dart+++ b/lib/core/constants.dart@@ -67,8 +67,6 @@ const galleryGridSpacing = 2.0;const searchSectionLimit = 7;-bool isInternalUser = false;-const blackThumbnailBase64 = '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEB' +'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQ' +'EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARC' +diff --git a/lib/services/feature_flag_service.dart b/lib/services/feature_flag_service.dartindex 9da184a61c..689c7cc40e 100644--- a/lib/services/feature_flag_service.dart+++ b/lib/services/feature_flag_service.dart@@ -71,10 +71,9 @@ class FeatureFlagService {bool isInternalUserOrDebugBuild() {final String? email = Configuration.instance.getEmail();final userID = Configuration.instance.getUserID();- isInternalUser = (email != null && email.endsWith("@ente.io")) ||+ return (email != null && email.endsWith("@ente.io")) ||_internalUserIDs.contains(userID) ||kDebugMode;- return isInternalUser;}Future<void> fetchFeatureFlags() async {diff --git a/lib/utils/dialog_util.dart b/lib/utils/dialog_util.dartindex 80e69ed572..ae44256201 100644--- a/lib/utils/dialog_util.dart+++ b/lib/utils/dialog_util.dart@@ -2,10 +2,10 @@ import "package:dio/dio.dart";import "package:flutter/foundation.dart";import 'package:flutter/material.dart';import "package:flutter/services.dart";-import "package:photos/core/constants.dart";import "package:photos/generated/l10n.dart";import 'package:photos/models/button_result.dart';import 'package:photos/models/typedefs.dart';+import "package:photos/services/feature_flag_service.dart";import 'package:photos/theme/colors.dart';import 'package:photos/ui/common/loading_widget.dart';import 'package:photos/ui/common/progress_dialog.dart';@@ -91,7 +91,8 @@ String parseErrorForUI(}}// return generic error if the user is not internal and the error is not in debug mode- if (!(isInternalUser && kDebugMode)) {+ if (!(FeatureFlagService.instance.isInternalUserOrDebugBuild() &&+ kDebugMode)) {return genericError;}String errorInfo = "";