shiro权限
判断条件是当前用户如果拥有sys:user:edit或sys:user:delete其中的一个就可展示th
先使用的这个方法
<shiro:hasAnyRoles name="sys:user:delete,sys:user:edit"> <th>操作</th> </shiro:hasAnyRoles>
导致的结果就是当前用户即使拥有两个权限也不能展示th
然后使用这种看起来比价烦的方式才出现的结果
<shiro:hasPermission name="sys:user:edit"> <shiro:hasPermission name="sys:user:delete"> <th>操作</th> </shiro:hasPermission> </shiro:hasPermission> <shiro:hasPermission name="sys:user:edit"> <shiro:lacksPermission name="sys:user:delete"> <th>操作</th> </shiro:lacksPermission> </shiro:hasPermission> <shiro:hasPermission name="sys:user:delete"> <shiro:lacksPermission name="sys:user:edit"> <th>操作</th> </shiro:lacksPermission> </shiro:hasPermission>