boolean searchAllFlag = true;
Subject subject = SecurityUtils.getSubject();
try {
// search是你需要判断的权限名称,如果没此权限,会抛出异常
subject.checkPermission("search");
} catch (Exception e) {
searchAllFlag = false
shiro在java代码里判断此用户是否有此权限
最新推荐文章于 2022-04-11 14:58:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)