权限控制:查看角色页面添加显示表格列权限

This commit is contained in:
suncz
2024-05-06 16:17:49 +08:00
parent 7fe7d434f0
commit eec463ac58
3 changed files with 53 additions and 23 deletions

View File

@@ -76,8 +76,10 @@ public class RoleController extends BaseController {
@RequestMapping("/view")
public String view(ModelMap modelMap, Long id) {
modelMap.addAttribute("role", roleService.find(id));
modelMap.addAttribute("authorities", roleService.find(id).getAuthorities());
Role role = roleService.find(id);
modelMap.addAttribute("role", role);
modelMap.addAttribute("authorities", role.getAuthorities());
modelMap.addAttribute("tableColumnControlAuthorityList", role.getTableColumnControlAuthorityList());
modelMap.addAttribute("dataRanges", DataRange.values());
return "/role/view";
}