Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于权限控制 #7

Open
chimisu opened this issue May 9, 2017 · 4 comments
Open

关于权限控制 #7

chimisu opened this issue May 9, 2017 · 4 comments
Labels

Comments

@chimisu
Copy link

chimisu commented May 9, 2017

看介绍说实现了基本的权限控制,能详细介绍下么?另外,如果要对菜单做权限控制,应该怎么做?

@pmg1989
Copy link
Owner

pmg1989 commented May 11, 2017

项目的权限控制,主要还是体现在菜单的设置上,具体可以查看src/utils/menu.js,菜单项的power字段就是控制权限的,至于你说的对菜单的权限控制也是在这里,当power的数组中包含1(查看菜单),即可查看菜单,反之菜单不可见。这两天有点忙,没有及时回复,感谢你的关注。

@chimisu
Copy link
Author

chimisu commented May 17, 2017

@pmg1989 这块我已经实现了,那router的动态控制有方案么?不然只控制了菜单的隐藏和显示,却能从url里面可以进页面。

@pmg1989
Copy link
Owner

pmg1989 commented May 18, 2017

可以控制的,在管理员角色页面,可以管理页面的查看权限,取消勾选后,需注销重新登录,从URL进入时页面也是无法查看了

@chimisu
Copy link
Author

chimisu commented May 18, 2017

@pmg1989 我看router.js注册了所有的路由,你说的控制,代码在哪一块?没找到。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants