Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.ws.rs.ForbiddenException in alert if user does not have vocabulary data source role #2568 #1902

Merged
merged 1 commit into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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