1234567891011121314151617181920212223242526272829303132 |
- const routers = {
- welcome: false,
- billing: false,
- jurisdiction: false,
- administrators: false,
- mechanism: false,
- category: false,
- project: false,
- archives: false,
- }
- export default function access(initialState: { currentUser?: API.CurrentUser | undefined }) {
- const { currentUser } = initialState || {};
-
- if(!currentUser){
-
- return routers;
- }
- if(currentUser.mobile === 'admin'){
- return {}
- }else if(currentUser.mobile === 'zxs'){
-
- let mobilelv = {welcome:true}
- return {
- ...routers,
- ...mobilelv,
- }
- }
- }
|