|
@@ -71,9 +71,7 @@ const BasicLayout = props => {
|
71
|
71
|
}
|
72
|
72
|
};
|
73
|
73
|
|
74
|
|
- const findAuthority = (path) => {
|
75
|
|
- return ((props.user.menuList || []).filter(x => x.code === path)[0] || {}).roles
|
76
|
|
- }
|
|
74
|
+ const findAuthority = path => ((props.user.menuList || []).filter(x => x.code === path)[0] || {}).roles
|
77
|
75
|
|
78
|
76
|
/**
|
79
|
77
|
* use Authorized check all menu item
|
|
@@ -86,9 +84,9 @@ const BasicLayout = props => {
|
86
|
84
|
return Authorized.check(authority, localItem, null);
|
87
|
85
|
});
|
88
|
86
|
|
89
|
|
- const checkRights = (children) => {
|
|
87
|
+ const checkRights = children => {
|
90
|
88
|
const authority = findAuthority(props.location.pathname);
|
91
|
|
- return Authorized.check(authority, children, <Redirect to="/exception/403" />);
|
|
89
|
+ return Authorized.check(authority, children, <Redirect to="/403" />);
|
92
|
90
|
}
|
93
|
91
|
|
94
|
92
|
return (
|