Skip to content

Commit

Permalink
654: remove verification feature flag and add camera permission
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahsporck committed Dec 5, 2022
1 parent 33d7c5d commit f581559
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 25 deletions.
3 changes: 3 additions & 0 deletions frontend/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@
<!--<uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>

<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
</manifest>
4 changes: 1 addition & 3 deletions frontend/build-configs/bayern/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ export const bayernCommon: CommonBuildConfigType = {
showcase: "https://api.entitlementcard.app",
local: "http://localhost:8000",
},
featureFlags: {
verification: true,
},
featureFlags: {},
applicationUrl: "https://bayern.ehrenamtskarte.app/apply-for-eak",
};

Expand Down
4 changes: 1 addition & 3 deletions frontend/build-configs/nuernberg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ export const nuernbergCommon: CommonBuildConfigType = {
showcase: "https://api.entitlementcard.app",
local: "http://localhost:7000",
},
featureFlags: {
verification: true,
},
featureFlags: {},
applicationUrl: "https://meinkonto.nuernberg.de/intelliform/forms/osg/standard/osg/osg-kette-starten/index?lebenslageIdAuswahl=w_500_sha_d_nuernberg-pass",
};

Expand Down
4 changes: 1 addition & 3 deletions frontend/build-configs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ type BuildConfigType = {
ios: iOSBuildConfigType,
}

export type FeatureFlagsType = {
verification: boolean
}
export type FeatureFlagsType = {}

export type ThemeType = {
primaryColor: string,
Expand Down
3 changes: 0 additions & 3 deletions frontend/lib/configuration/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ class Configuration extends InheritedWidget {
final String mapStyleUrl;
final String graphqlUrl;
final String projectId;
final bool showVerification;
final bool showDevSettings;

const Configuration({
super.key,
required this.mapStyleUrl,
required this.graphqlUrl,
required this.projectId,
required this.showVerification,
required this.showDevSettings,
required super.child,
});
Expand All @@ -22,7 +20,6 @@ class Configuration extends InheritedWidget {
mapStyleUrl != oldWidget.mapStyleUrl ||
graphqlUrl != oldWidget.graphqlUrl ||
projectId != oldWidget.projectId ||
showVerification != oldWidget.showVerification ||
showDevSettings != oldWidget.showDevSettings;

static Configuration of(BuildContext context) {
Expand Down
4 changes: 1 addition & 3 deletions frontend/lib/entry_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ class EntryWidget extends StatelessWidget {
introRouteName: (context) => IntroScreen(
onFinishedCallback: () => settings.setFirstStart(enabled: false),
),
homeRouteName: (context) => HomePage(
showVerification: configuration.showVerification,
)
homeRouteName: (context) => const HomePage()
};

final String initialRoute = settings.firstStart ? introRouteName : homeRouteName;
Expand Down
16 changes: 7 additions & 9 deletions frontend/lib/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import 'package:flutter/material.dart';
const mapTabIndex = 0;

class HomePage extends StatefulWidget {
final bool showVerification;

const HomePage({super.key, required this.showVerification});
const HomePage({super.key});

@override
_HomePageState createState() => _HomePageState();
Expand Down Expand Up @@ -44,13 +43,12 @@ class _HomePageState extends State<HomePage> {
"Suche",
GlobalKey<NavigatorState>(debugLabel: "Search tab key"),
),
if (widget.showVerification)
AppFlow(
const IdentificationPage(title: "Ausweisen"),
Icons.remove_red_eye_outlined,
"Ausweisen",
GlobalKey<NavigatorState>(debugLabel: "Auth tab key"),
),
AppFlow(
const IdentificationPage(title: "Ausweisen"),
Icons.remove_red_eye_outlined,
"Ausweisen",
GlobalKey<NavigatorState>(debugLabel: "Auth tab key"),
),
AppFlow(const AboutPage(), Icons.info_outline, "Über", GlobalKey<NavigatorState>(debugLabel: "About tab key")),
];
}
Expand Down
1 change: 0 additions & 1 deletion frontend/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Future<void> main() async {
mapStyleUrl: mapStyleUrl,
graphqlUrl: graphqlUrl,
projectId: projectId,
showVerification: buildConfig.featureFlags.verification,
showDevSettings: kDebugMode,
child: const App(),
),
Expand Down

0 comments on commit f581559

Please sign in to comment.