Sfoglia il codice sorgente

修改角色数据权限更新会话信息

RuoYi 5 anni fa
parent
commit
8a18c46b84

+ 7 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java

@@ -135,7 +135,13 @@ public class SysRoleController extends BaseController
     @ResponseBody
     public AjaxResult authDataScopeSave(SysRole role)
     {
-        return toAjax(roleService.authDataScope(role));
+        role.setUpdateBy(ShiroUtils.getLoginName());
+        if (roleService.authDataScope(role) > 0)
+        {
+            ShiroUtils.setSysUser(userService.selectUserById(ShiroUtils.getSysUser().getUserId()));
+            return success();
+        }
+        return error();
     }
 
     @RequiresPermissions("system:role:remove")