|
@@ -18,7 +18,7 @@ import java.util.stream.Collectors;
|
|
18
|
|
18
|
|
|
19
|
/**
|
19
|
/**
|
|
20
|
* 请求来源拦截器
|
20
|
* 请求来源拦截器
|
|
21
|
- * 仅超级管理员、站长、质检科、科长角色可访问web端
|
|
|
|
|
|
21
|
+ * 仅超级管理员、站长、质检科、经理、大队行政、主管角色可访问web端
|
|
22
|
*
|
22
|
*
|
|
23
|
* @author ruoyi
|
23
|
* @author ruoyi
|
|
24
|
*/
|
24
|
*/
|
|
@@ -59,8 +59,8 @@ public class RequestSourceInterceptor implements HandlerInterceptor {
|
|
59
|
|
59
|
|
|
60
|
List<SysRole> sysRoleList = loginUser.getUser().getRoles();
|
60
|
List<SysRole> sysRoleList = loginUser.getUser().getRoles();
|
|
61
|
Set<String> roles = sysRoleList.stream().map(SysRole::getRoleKey).collect(Collectors.toSet());
|
61
|
Set<String> roles = sysRoleList.stream().map(SysRole::getRoleKey).collect(Collectors.toSet());
|
|
62
|
- if (!roles.contains(RoleTypeEnum.admin.getCode()) && !roles.contains(RoleTypeEnum.test.getCode()) && !roles.contains(RoleTypeEnum.zhijianke.getCode()) && !roles.contains(RoleTypeEnum.kezhang.getCode())) {
|
|
|
|
63
|
- throw new ServiceException("仅超级管理员、站长、质检科、科长角色可访问web端", HttpStatus.FORBIDDEN);
|
|
|
|
|
|
62
|
+ if (!roles.contains(RoleTypeEnum.admin.getCode()) && !roles.contains(RoleTypeEnum.test.getCode()) && !roles.contains(RoleTypeEnum.zhijianke.getCode()) && !roles.contains(RoleTypeEnum.jingli.getCode()) && !roles.contains(RoleTypeEnum.xingzheng.getCode()) && !roles.contains(RoleTypeEnum.kezhang.getCode())) {
|
|
|
|
63
|
+ throw new ServiceException("仅超级管理员、站长、质检科、经理、大队行政、主管角色可访问web端", HttpStatus.FORBIDDEN);
|
|
64
|
}
|
64
|
}
|
|
65
|
}
|
65
|
}
|
|
66
|
|
66
|
|