Skip to content

Commit

Permalink
javax.ws.rs.ForbiddenException in alert if user does not have vocabul…
Browse files Browse the repository at this point in the history
…ary data source role #2568 (#1902)

(cherry picked from commit ebd4a5e)
  • Loading branch information
anton-abushkevich committed Jun 22, 2021
1 parent 7d8df19 commit 9f3d496
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.springframework.messaging.support.ErrorMessage;

import javax.ws.rs.BadRequestException;
import javax.ws.rs.ForbiddenException;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
Expand Down Expand Up @@ -57,7 +58,7 @@ public Response toResponse(Throwable ex) {
String cause = ex.getCause().getCause().getMessage();
cause = cause.substring(cause.indexOf(DETAIL) + DETAIL.length());
ex = new RuntimeException(cause);
} else if (ex instanceof UnauthorizedException) {
} else if (ex instanceof UnauthorizedException || ex instanceof ForbiddenException) {
responseStatus = Status.FORBIDDEN;
} else if (ex instanceof NotFoundException) {
responseStatus = Status.NOT_FOUND;
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/i18n/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@
"overwriteConfirm": "Are you sure you want to overwrite current Concept Set Expression?",
"loadingIncludedConcepts": "Loading Included Concepts",
"commonAncestors": "Common Ancestors",
"loadingIncludedSourcecodes": "Loading Included Sourcecodes"
"loadingIncludedSourcecodes": "Loading Included Sourcecodes",
"expressionResolveError": "Error occurred during resolving expression!",
"forbiddenError": "You are not authorized to view the concept set expression."
},
"conceptLegend": {
"standard": "Standard",
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/i18n/messages_ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@
"overwriteConfirm": "현재의 컨셉 세트 표현을 정말 덮어씌우시겠습니까?",
"loadingIncludedConcepts": "포함된 컨셉 로딩 중",
"commonAncestors": "공통 상위 컨셉",
"loadingIncludedSourcecodes": "포함된 소스 코드 로딩 중"
"loadingIncludedSourcecodes": "포함된 소스 코드 로딩 중",
"expressionResolveError": "Error occurred during resolving expression!",
"forbiddenError": "You are not authorized to view the concept set expression."
},
"conceptLegend": {
"standard": "표준",
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/i18n/messages_ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,9 @@
"overwriteConfirm": "Вы действительно хотите перезаписать текущее выражение набора концепций?",
"loadingIncludedConcepts": "Загрузка включенных концепций",
"commonAncestors": "Общие предки",
"loadingIncludedSourcecodes": "Загрузка включенных исходных кодов"
"loadingIncludedSourcecodes": "Загрузка включенных исходных кодов",
"expressionResolveError": "Ошибка загрузки выражения набора концепций!",
"forbiddenError": "Недостаточно прав для работы с выражением набора концепций."
},
"conceptLegend": {
"standard": "Стандартный",
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/i18n/messages_zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@
"overwriteConfirm": "您确定要覆盖当前的概念集表达式吗?",
"loadingIncludedConcepts": "加载包含的概念",
"commonAncestors": "共同祖先",
"loadingIncludedSourcecodes": "加载包含的源代码"
"loadingIncludedSourcecodes": "加载包含的源代码",
"expressionResolveError": "Error occurred during resolving expression!",
"forbiddenError": "You are not authorized to view the concept set expression."
},
"conceptLegend": {
"standard": "标准",
Expand Down

0 comments on commit 9f3d496

Please sign in to comment.