feat:(REQ-2845) 修改政务端的鉴权逻辑,因为增加了政务端,使用提供的isGA来判断是否是政务端
This commit is contained in:
parent
d246b08585
commit
0f8340ce1c
@ -178,12 +178,21 @@ public class PermissionQueryServiceImpl implements PermissionQueryService {
|
|||||||
return navTreeList.stream().filter(t -> Objects.equals(t.getParentId(), root.getId())).collect(Collectors.toList());
|
return navTreeList.stream().filter(t -> Objects.equals(t.getParentId(), root.getId())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isGATerminal(String terminal) {
|
||||||
|
if (Objects.isNull(terminal)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
TerminalInfo tm = new TerminalInfo(terminal);
|
||||||
|
return tm.isGA();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(PermissionCheckReq req) {
|
public boolean hasPermission(PermissionCheckReq req) {
|
||||||
|
|
||||||
//这里暂时硬编码-非OMS端鉴权请求 直接转老接口处理
|
//这里暂时硬编码-非OMS端鉴权请求 直接转老接口处理
|
||||||
if (!StrUtil.equals("NT_OMS_WEB" ,req.getTerminal())
|
if (!StrUtil.equals("NT_OMS_WEB" ,req.getTerminal())
|
||||||
&& !Objects.equals(TerminalInfo.NT_PC_GA_GENERAL, req.getTerminal())) {
|
&& !isGATerminal(req.getTerminal())) {
|
||||||
if (USE_OLD_AUTH) {
|
if (USE_OLD_AUTH) {
|
||||||
log.info("user old auth");
|
log.info("user old auth");
|
||||||
return hasPermissionV2(req);
|
return hasPermissionV2(req);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user