shiro
给接口定义 权限
控制器 定义 权限 添加权限
@ResponseBody @RequestMapping("/add") @RequiresPermissions(value = {"tui:add"}) public JSONObject add(@Valid Refund refund ,HttpSession session,HttpServletRequest request) throws Exception { JSONObject result = new JSONObject(); User user = (User) session.getAttribute("currentUser");
<div class="layui-btn-group"> <button shiro:hasPermission="pl:po" onclick="PL_po()" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon"></i>批量PO</button> <button shiro:hasPermission="pl:kuaidi" onclick="PL_kuaididan()" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon"></i>批量快递单</button> <button shiro:hasPermission="pl:kuaidixinxi" class="layui-btn layui-btn-sm layui-btn-normal" onclick="PL_kuaidi()"><i class="layui-icon"></i>批量快递信息</button> </div>
<script type="text/html" id="table_bar"> <div class="layui-btn-group"> <a shiro:hasPermission="project:update" class="layui-btn layui-btn-xs" lay-event="edit">修改</a> </div> </script>
站长微信:xiaomao0055
站长QQ:14496453