feat(menu-permissions): 메뉴 API 연동으로 사이드바 권한 정비
- .env.development.example과 lib/core/config/environment.dart, lib/core/permissions/permission_manager.dart에서 PERMISSION__ 폴백을 view 전용으로 좁히고 기본 정책을 명시적으로 거부하도록 재정비했다 - lib/core/navigation/*, lib/core/routing/app_router.dart, lib/widgets/app_shell.dart, lib/main.dart에서 메뉴 매니페스트·카탈로그를 도입해 /menus 응답을 캐싱하고 라우터·사이드바·Breadcrumb가 동일 menu_code/route_path를 쓰도록 리팩터링했다 - lib/core/permissions/permission_resources.dart와 그룹 권한/메뉴 마스터 모듈을 menu_code 기반 CRUD 및 Catalog 경로 정합성 검사로 전환하고 PermissionSynchronizer·PermissionBootstrapper를 확장했다 - test/helpers/test_permissions.dart, test/widgets/app_shell_test.dart 등 신규 구조를 반영하는 테스트·골든과 doc/frontend_menu_permission_tasks.md 문서를 보강했다
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
import '../../../../../helpers/tester_extensions.dart';
|
||||
import 'package:superport_v2/core/common/models/paginated_result.dart';
|
||||
import 'package:superport_v2/core/navigation/route_paths.dart';
|
||||
import 'package:superport_v2/features/masters/customer/domain/entities/customer.dart';
|
||||
import 'package:superport_v2/features/masters/customer/domain/repositories/customer_repository.dart';
|
||||
import 'package:superport_v2/features/masters/customer/presentation/pages/customer_page.dart';
|
||||
@@ -43,7 +44,7 @@ void main() {
|
||||
dotenv.testLoad(fileInput: 'FEATURE_CUSTOMERS_ENABLED=false\n');
|
||||
|
||||
await tester.pumpWidget(
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: '/masters/customers'))),
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: inventoryCustomersRoutePath))),
|
||||
);
|
||||
await tester.pump();
|
||||
|
||||
@@ -89,7 +90,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: '/masters/customers'))),
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: inventoryCustomersRoutePath))),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -126,7 +127,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: '/masters/customers'))),
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: inventoryCustomersRoutePath))),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -159,7 +160,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: '/masters/customers'))),
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: inventoryCustomersRoutePath))),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -232,7 +233,7 @@ void main() {
|
||||
});
|
||||
|
||||
await tester.pumpWidget(
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: '/masters/customers'))),
|
||||
_buildApp(CustomerPage(routeUri: Uri(path: inventoryCustomersRoutePath))),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
@@ -297,7 +298,7 @@ void main() {
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: 320,
|
||||
child: CustomerPage(routeUri: Uri(path: '/masters/customers')),
|
||||
child: CustomerPage(routeUri: Uri(path: inventoryCustomersRoutePath)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user