Fixed check for internal user (#1739)
This commit is contained in:
commit
21c733b812
3 changed files with 4 additions and 6 deletions
|
@ -67,8 +67,6 @@ const galleryGridSpacing = 2.0;
|
|||
|
||||
const searchSectionLimit = 7;
|
||||
|
||||
bool isInternalUser = false;
|
||||
|
||||
const blackThumbnailBase64 = '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEB' +
|
||||
'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQ' +
|
||||
'EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARC' +
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
Loading…
Add table
Reference in a new issue