Commit 621299e7 authored by afc163's avatar afc163 Committed by 偏右

default authorize

parent 631483e6
...@@ -25,7 +25,6 @@ module.exports = [ ...@@ -25,7 +25,6 @@ module.exports = [
routes: [ routes: [
{ {
path: '/dashboard/analysis', path: '/dashboard/analysis',
authority: ['admin'],
name: 'analysis', name: 'analysis',
component: './Dashboard/Analysis', component: './Dashboard/Analysis',
}, },
...@@ -173,6 +172,7 @@ module.exports = [ ...@@ -173,6 +172,7 @@ module.exports = [
path: '/account/settings', path: '/account/settings',
name: 'settings', name: 'settings',
component: './Account/Settings/Info', component: './Account/Settings/Info',
// authority: ['admin'],
routes: [ routes: [
{ {
path: '/account/settings', path: '/account/settings',
......
...@@ -3,7 +3,7 @@ import RenderAuthorized from '@/components/Authorized'; ...@@ -3,7 +3,7 @@ import RenderAuthorized from '@/components/Authorized';
import Exception from '@/components/Exception'; import Exception from '@/components/Exception';
import { matchRoutes } from 'react-router-config'; import { matchRoutes } from 'react-router-config';
const Authorized = RenderAuthorized('user'); const Authorized = RenderAuthorized(['admin', 'user']);
const noMatch = <Exception type="403" style={{ minHeight: 500, height: '80%' }} />; const noMatch = <Exception type="403" style={{ minHeight: 500, height: '80%' }} />;
export default ({ children, route, location }) => { export default ({ children, route, location }) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment