🚫 feat(web): add 403 Forbidden page and AdminRoute guard
- Add new Forbidden page at /forbidden (`web/src/pages/Forbidden/index.js`) - Use Semi-UI Empty with IllustrationNoAccess (250x250) - Update i18n description to: '您无权访问此页面,请联系管理员~' - Align visual style with existing 404 page - Introduce `AdminRoute` in `web/src/helpers/auth.js` - Use `UserContext`/localStorage; redirect to `/forbidden` when `!user` or `user.role < 10` - Protect console/admin routes with `AdminRoute` and register `/forbidden` in `web/src/App.js` - Update `web/src/i18n/locales/en.json` - Add English translation for the new forbidden message - Remove legacy "没有权限" entry - Lint passes; no runtime errors observed
This commit is contained in:
@@ -1459,6 +1459,7 @@
|
||||
"设计与开发由": "Designed & Developed with love by",
|
||||
"演示站点": "Demo Site",
|
||||
"页面未找到,请检查您的浏览器地址是否正确": "Page not found, please check if your browser address is correct",
|
||||
"您无权访问此页面,请联系管理员": "You do not have permission to access this page. Please contact the administrator.",
|
||||
"New API项目仓库地址:": "New API project repository address: ",
|
||||
"© {{currentYear}}": "© {{currentYear}}",
|
||||
"| 基于": " | Based on ",
|
||||
|
||||
Reference in New Issue
Block a user