|
|
|
@ -7,6 +7,7 @@ import com.keyware.shandan.common.util.*; |
|
|
|
|
import com.keyware.shandan.frame.config.security.SecurityUtil; |
|
|
|
|
import com.keyware.shandan.frame.properties.CustomProperties; |
|
|
|
|
import com.keyware.shandan.system.entity.SysRole; |
|
|
|
|
import com.keyware.shandan.system.entity.SysUser; |
|
|
|
|
import com.keyware.shandan.system.service.SysRoleService; |
|
|
|
|
import com.keyware.shandan.system.utils.SysSettingUtil; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -97,7 +98,9 @@ public class SafetyAspect { |
|
|
|
|
ModelAndView modelAndView = (ModelAndView) result; |
|
|
|
|
modelAndView.addObject("publicKey", RsaUtil.getPublicKey()); |
|
|
|
|
modelAndView.addObject("sys", SysSettingUtil.getCurrentSysSetting()); |
|
|
|
|
modelAndView.addObject("loginUser", SecurityUtil.getLoginSysUser()); |
|
|
|
|
SysUser loginUser = SecurityUtil.getLoginSysUser(); |
|
|
|
|
loginUser.setPassword(null); |
|
|
|
|
modelAndView.addObject("loginUser", loginUser); |
|
|
|
|
//登录用户角色信息
|
|
|
|
|
List<SysRole> userRoles = sysRoleService.getUserRoles(SecurityUtil.getLoginSysUser().getUserId()); |
|
|
|
|
//当用户具有多个角色,只保留权限最大的角色
|
|
|
|
|