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

鉴权能否支持动态获取入参,并将入参作为角色code或者权限code的前缀? #616

Closed
chf-gh opened this issue Apr 27, 2024 · 4 comments

Comments

@chf-gh
Copy link

chf-gh commented Apr 27, 2024

系统中有两个业务,用户在每个业务中的角色和权限不同,接口每次会通过路径参传入业务id:bizId,假如我想鉴定用户有没有“edit”权限。能否支持动态获取入参 bizId(比如等于“12345”),并将bizid作为权限的前缀,字符串拼接后比如等于 “12345edit”。最后校验用户有没有“12345edit” 这个权限。

@click33
Copy link
Collaborator

click33 commented May 10, 2024

String str = "xxxx" + xxx; 你先按照你的规则拼接好字符串
再调用鉴权API进行鉴权
StpUtil.checkPermission(str)

@click33 click33 closed this as completed May 10, 2024
@chf-gh
Copy link
Author

chf-gh commented May 10, 2024

String str = "xxxx" + xxx; 你先按照你的规则拼接好字符串 再调用鉴权API进行鉴权 StpUtil.checkPermission(str)

现在是这样解决的,基于注解的形式有考虑支持吗?

@click33
Copy link
Collaborator

click33 commented May 10, 2024

长远有计划,但短时间内应该不会实现,现在升级重心在SSO和OAuth2上

@chf-gh
Copy link
Author

chf-gh commented May 10, 2024

长远有计划,但短时间内应该不会实现,现在升级重心在SSO和OAuth2上

谢谢

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