Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
621299e7
Commit
621299e7
authored
Aug 30, 2018
by
afc163
Committed by
偏右
Aug 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default authorize
parent
631483e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
config/router.config.js
config/router.config.js
+1
-1
src/pages/Authorized.js
src/pages/Authorized.js
+1
-1
No files found.
config/router.config.js
View file @
621299e7
...
@@ -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
'
,
...
...
src/pages/Authorized.js
View file @
621299e7
...
@@ -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
})
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment