Skip to content

Commit

Permalink
feature: 支持蓝鲸应用级别的权限控制跳转 TencentBlueKing#2238
Browse files Browse the repository at this point in the history
解析根异常
  • Loading branch information
jsonwan committed Jul 20, 2023
1 parent 01c6463 commit b087a10
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package com.tencent.bk.job.gateway.filter.web;

import com.tencent.bk.job.common.constant.ErrorCode;
import com.tencent.bk.job.common.exception.InternalUserManageException;
import com.tencent.bk.job.common.i18n.locale.LocaleUtils;
import com.tencent.bk.job.common.model.Response;
import com.tencent.bk.job.common.model.dto.BkUserDTO;
Expand Down Expand Up @@ -108,8 +109,13 @@ private GatewayFilter getLoginFilter() {
BkUserDTO user;
try {
user = getUserByTokenList(bkTokenList, lang);
} catch (AppPermissionDeniedException e) {
return getUserAccessAppForbiddenResp(response, e.getMessage());
} catch (InternalUserManageException e) {
Throwable cause = e.getCause();
if (cause instanceof AppPermissionDeniedException) {
return getUserAccessAppForbiddenResp(response, cause.getMessage());
} else {
throw e;
}
}
if (user == null) {
log.warn("Invalid user token");
Expand Down

0 comments on commit b087a10

Please sign in to comment.