afc163 7 лет назад
Родитель
Сommit
621299e7c0
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      config/router.config.js
  2. 1 1
      src/pages/Authorized.js

+ 1 - 1
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',

+ 1 - 1
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 = <Exception type="403" style={{ minHeight: 500, height: '80%' }} />;
 
 export default ({ children, route, location }) => {