-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/rbac #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/rbac #120
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
72973ce
feat(router): implement route permissions mapping
fulleni 77f1cd6
feat(router): implement role-based access control (RBAC)
fulleni af0328b
feat(app_shell): implement role-based navigation filtering
fulleni cd4d0ac
feat(l10n): add unauthorized access redirect message
fulleni f81bfd0
build: l10n
fulleni 5370336
docs(README): add role-based access control description
fulleni 67ac4d8
refactor(app): improve navigation item filtering and selection
fulleni ae0a829
fix(l10n): remove redundant "Redirecting:" from access denial messages
fulleni 0446ede
style: format
fulleni 25a00ee
refactor(router): remove unused localization and snackbar redirect
fulleni 8631472
refactor(l10n): remove unauthorized access redirect localization
fulleni c021c5f
build: l10n
fulleni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import 'package:core/core.dart'; | ||
| import 'package:flutter_news_app_web_dashboard_full_source_code/router/routes.dart'; | ||
|
|
||
| /// A centralized mapping of dashboard user roles to their permitted routes. | ||
| /// | ||
| /// This map is used by the router's redirect logic to enforce navigation | ||
| /// restrictions based on the authenticated user's role. | ||
| final Map<DashboardUserRole, Set<String>> routePermissions = { | ||
| // Admins have access to all major sections of the dashboard. | ||
| DashboardUserRole.admin: { | ||
| Routes.overviewName, | ||
| Routes.contentManagementName, | ||
| Routes.userManagementName, | ||
| Routes.appConfigurationName, | ||
| }, | ||
| // Publishers have a more restricted access, focused on content creation | ||
| // and management. | ||
| DashboardUserRole.publisher: { | ||
| Routes.overviewName, | ||
| Routes.contentManagementName, | ||
| }, | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.