Browse Source

权限调整

RuoYi 4 years ago
parent
commit
7a6a109a8c

+ 0 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -25,7 +25,6 @@ import com.ruoyi.common.utils.ShiroUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.shiro.service.SysPasswordService;
-import com.ruoyi.framework.shiro.util.AuthorizationUtils;
 import com.ruoyi.system.service.ISysPostService;
 import com.ruoyi.system.service.ISysRoleService;
 import com.ruoyi.system.service.ISysUserService;
@@ -177,7 +176,6 @@ public class SysUserController extends BaseController
             return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
         }
         user.setUpdateBy(ShiroUtils.getLoginName());
-        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return toAjax(userService.updateUser(user));
     }
 
@@ -233,7 +231,6 @@ public class SysUserController extends BaseController
     public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
     {
         userService.insertUserAuth(userId, roleIds);
-        AuthorizationUtils.clearAllCachedAuthorizationInfo();
         return success();
     }
 

+ 1 - 1
ruoyi-admin/src/main/resources/templates/system/user/profile/avatar.html

@@ -134,7 +134,7 @@
 	<div class="row container">
 		<div class="col-md-10">
 			<div class="imageBox">
-				<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='../../../img/profile.jpg'">
+				<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="'this.src=\'' + @{'/img/profile.jpg'} + '\''">
 			</div>
 			<div class="action">
 				<div class="new-contentarea tc">

+ 1 - 1
ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html

@@ -16,7 +16,7 @@
                 </div>
                 <div class="ibox-content">
                     <div class="text-center">
-                        <p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='../../img/profile.jpg'"></p>
+                        <p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="'this.src=\'' + @{'/img/profile.jpg'} + '\''"></p>
                         <p><a href="javascript:avatar()">修改头像</a></p>
                     </div>
                     <ul class="list-group list-group-striped">