新增临时角色页面
This commit is contained in:
@@ -224,4 +224,13 @@ public class SysRoleController extends BaseController {
|
||||
ajax.put("depts", deptService.selectDeptTreeList(new SysDept()));
|
||||
return R.ok(ajax);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前用户的role对象
|
||||
*/
|
||||
@GetMapping("/currentRole")
|
||||
public R<SysRole> currentRole() {
|
||||
return R.ok(roleService.getCurrentRole());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,4 +263,18 @@ public class SysUserController extends BaseController {
|
||||
return R.ok(deptService.selectDeptTreeList(dept));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户授权角色
|
||||
*
|
||||
* @param userId 用户Id
|
||||
*/
|
||||
@SaCheckPermission("system:user:edit")
|
||||
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||
@GetMapping("/tempRole")
|
||||
public R<Void> insertTempRole(Long userId) {
|
||||
Long[] roleId = roleService.selectRoleByName();
|
||||
userService.insertUserAuth(userId, roleId);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user