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

关于用户一个权限都没有的问题 #551

Closed
zhihuishi-rain opened this issue Nov 29, 2023 · 3 comments
Closed

关于用户一个权限都没有的问题 #551

zhihuishi-rain opened this issue Nov 29, 2023 · 3 comments

Comments

@zhihuishi-rain
Copy link

版本:

1.35.0

复现步骤:

cn.dev33.satoken.stp.StpLogic#checkPermissionAnd方法中调用的getPermissionList,当返回的权限码集合为空,用户一个权限都没有时也可以通过权限校验
image

@ly-chn
Copy link
Member

ly-chn commented Dec 4, 2023

发一下你的用法

@zhihuishi-rain
Copy link
Author

使用的是注解鉴权,自己实现了StpInterface的getPermissionList方法,业务场景是没有给当前登录用户赋予任何角色和权限,角色码和权限码集合都为空的情况,这种情况下权限校验可以通过,正常应该无权限才对,毕竟我没给用户赋任何权限
image
image

@ly-chn
Copy link
Member

ly-chn commented Dec 13, 2023

StpUtil.getPermissionList()获取当前账号所拥有的权限集合看一下返回结果

@ly-chn ly-chn closed this as completed Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants