@@ -25,7 +25,6 @@ import 'package:flutter_news_app_web_dashboard_full_source_code/content_manageme
2525import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/view/edit_topic_page.dart' ;
2626import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/widgets/filter_dialog/bloc/filter_dialog_bloc.dart' ;
2727import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/widgets/filter_dialog/filter_dialog.dart' ;
28- import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart' ;
2928import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/filter_local_ads/filter_local_ads_bloc.dart' ;
3029import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/view/create_local_banner_ad_page.dart' ;
3130import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/view/create_local_interstitial_ad_page.dart' ;
@@ -66,7 +65,6 @@ GoRouter createRouter({
6665 // --- Redirect Logic ---
6766 redirect: (BuildContext context, GoRouterState state) {
6867 final appStatus = context.read <AppBloc >().state.status;
69- final l10n = AppLocalizationsX (context).l10n;
7068 final currentLocation = state.matchedLocation;
7169
7270 print (
@@ -116,10 +114,12 @@ GoRouter createRouter({
116114
117115 // Universally allowed routes like 'settings' are exempt from this check.
118116 if (! isAuthorized && destinationRouteName != Routes .settingsName) {
119- ScaffoldMessenger .of (context).showSnackBar (
120- SnackBar (content: Text (l10n.unauthorizedAccessRedirect)),
117+ print (
118+ ' Action: Unauthorized access to "$destinationRouteName ". '
119+ 'Redirecting to $overviewPath .' ,
121120 );
122- // Redirect unauthorized users to the overview page.
121+ // Redirect unauthorized users to the overview page. This is a safe
122+ // redirect without side effects.
123123 return Routes .overview;
124124 }
125125 // --- End of RBAC ---
0 commit comments