diff --git a/config/router.config.js b/config/router.config.js index 20785023552f726c8be503bde0a92999949940cc..7a5f266b6f28d3d5e275d4e8f5ad9b6f6fe83cc4 100644 --- a/config/router.config.js +++ b/config/router.config.js @@ -25,7 +25,6 @@ module.exports = [ routes: [ { path: '/dashboard/analysis', - authority: ['admin'], name: 'analysis', component: './Dashboard/Analysis', }, @@ -173,6 +172,7 @@ module.exports = [ path: '/account/settings', name: 'settings', component: './Account/Settings/Info', + // authority: ['admin'], routes: [ { path: '/account/settings', diff --git a/src/pages/Authorized.js b/src/pages/Authorized.js index 625f8206d98e162bf66a3404f2e430bd444f3e75..cfd86d997ee1b20ed653c4b74c3e99e9c11b0250 100644 --- a/src/pages/Authorized.js +++ b/src/pages/Authorized.js @@ -3,7 +3,7 @@ import RenderAuthorized from '@/components/Authorized'; import Exception from '@/components/Exception'; import { matchRoutes } from 'react-router-config'; -const Authorized = RenderAuthorized('user'); +const Authorized = RenderAuthorized(['admin', 'user']); const noMatch = ; export default ({ children, route, location }) => {