-
Notifications
You must be signed in to change notification settings - Fork 961
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
权限相关,通过角色限制菜单,未起到作用 #297
Comments
我是按照官网里面的东西进行调整了的 路由: 后端返回菜单:
后端返回权限: basic原来的校验js稍微改动了下 然后再用的v-auth 我不是写前端的,不知道你们写前端的是不是这样的,我是现在能和官网说的那样子实现粒度级权限控制 |
我是通过修改源码,把读取路由变成读取localStorage的role数据来鉴权 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在路由配置角色验证
加载菜单仍然会显示,经过筛查,发现 hasPermission方法权限验证通过了,由于 route.meta.pAuthorities 给了 * 的权限,现在想用角色来实现菜单权限控制有什么好的解决办法? 我目前想到的解决办法是在 routerUtil.js文件中在给pAuthorities 赋值时判断 authority 中是否存在 role 限制, 如果存在赋值 pAuthorities 下 permission 值为空字符串,目前测试可以实现预期效果,请问是否有其他方式解决这个问题
The text was updated successfully, but these errors were encountered: