From 621299e7c0580750865e0392c5d7e849c025e1f8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 30 Aug 2018 17:00:59 +0800 Subject: [PATCH] default authorize --- config/router.config.js | 2 +- src/pages/Authorized.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/router.config.js b/config/router.config.js index 20785023..7a5f266b 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 625f8206..cfd86d99 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 }) => { -- GitLab