update 判断管理员角色使用loginUser的isAdmin
This commit is contained in:
@@ -298,10 +298,9 @@ public class ProcessAllService extends ServiceImpl<ProcessAllMapper, ProcessAll>
|
||||
.map(ProcessApprovalRecord::getUserId)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
String loginUserId = CurrentUserUtil.getId();
|
||||
String roleIds = CurrentUserUtil.getRoles();
|
||||
LoginUser loginUser = CurrentUserUtil.getLoginUser();
|
||||
//管理员和当前流程中人员可以催办
|
||||
if (!roleIds.contains(FieldCommon.ROLE_ADMIN) && !canUrgingUserList.contains(loginUserId)){
|
||||
if (!loginUser.getIsAdmin() && !canUrgingUserList.contains(loginUser.getId())){
|
||||
throw new JeroBootException(ResultCommon.TASK_URGING_ERROR_2);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ public class LawsEvaluationNotMetController extends JeroController<LawsEvaluatio
|
||||
List<LawsEvaluationNotMet> notMets = lawsEvaluationNotMetService.listByIds(ids);
|
||||
for (LawsEvaluationNotMet notMet : notMets) {
|
||||
//管理员和设计工程师可以操作未符合项
|
||||
if (!roleIds.contains(FieldCommon.ROLE_ADMIN) && !userId.equals(notMet.getEngineerId())){
|
||||
if (!loginUser.getIsAdmin() && !userId.equals(notMet.getEngineerId())){
|
||||
throw new JeroBootException(ResultCommon.NO_PERMISSIONS_PLEASE_SELECT);
|
||||
}
|
||||
String state = notMet.getState();
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ public class LawsEvaluationNotMetServiceImpl extends ServiceImpl<LawsEvaluationN
|
||||
String roleIds = loginUser.getRoleIds();
|
||||
String userId = loginUser.getId();
|
||||
//管理员和设计工程师可以操作未符合项
|
||||
if (!roleIds.contains(FieldCommon.ROLE_ADMIN) && !userId.equals(notMet.getEngineerId())){
|
||||
if (!loginUser.getIsAdmin() && !userId.equals(notMet.getEngineerId())){
|
||||
throw new JeroBootException(ResultCommon.NO_PERMISSIONS_PLEASE_SELECT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user