We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
JDK 版本(必填) : 1.8.0 源码版本(必填):2.6.0 MySQL(必填): 5.7.9 Nacos(必填):1.2.1
代码生成器生成了代码, 页面没有显示新增、修改、删除等按钮? 而且一致提示“执行方法xx需要xx权限”
The text was updated successfully, but these errors were encountered:
执行方法[page]需要[hasPermit('station123:view')]权限
station123:view
station123:add
前往 “菜单管理” 页面, 选择对应的菜单, 然后在该菜单下配置资源权限. ps: 为了演示我把StationController类的注解改成了@PreAuth(replace = "station123:"), 所以提示没有station123:view 权限. 上图中,我这里配置的都是 station:* 权限, 所以会提示没有权限
@PreAuth(replace = "station123:")
点击上图的新增,编码输入station123:view , 名称输入查询.
前往“角色管理”, 将新建的权限编码station123:view分配给超管.
切换回 “岗位管理” 刷新页面, 可能访问后端数据
但此时页面上还是没有 新增、修改等按钮, 是因为前端将用户等权限缓存到了LocalStorage,所以需要用户退出后,重新登录.
通过 @PreAuth 注解拦截Controller 类方法, 判断当前请求头token中封装的用户,是否拥有权限. 代码参考:
@PreAuth
通过按钮上加自定义指令v-has-permission、v-has-any-permission、 v-has-no-permission 控制按钮的权限. 代码参考:
v-has-permission
v-has-any-permission
v-has-no-permission
Sorry, something went wrong.
No branches or pull requests
版本信息:
JDK 版本(必填) : 1.8.0
源码版本(必填):2.6.0
MySQL(必填): 5.7.9
Nacos(必填):1.2.1
问题描述:
代码生成器生成了代码, 页面没有显示新增、修改、删除等按钮? 而且一致提示“执行方法xx需要xx权限”
报错截图
重现步骤
The text was updated successfully, but these errors were encountered: