Skip to content

Commit d6016d7

Browse files
fix(oracle-api): #2253 return 403 when user is not authorized (#2280)
1 parent b9cdfc7 commit d6016d7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontend/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const App: React.FC = () => {
101101
}, [signed, selectedClientRoles]);
102102

103103
const handleRedirectTo403 = () => {
104-
browserRouter.navigate('/403');
104+
browserRouter.navigate(ROUTES.FOUR_OH_THREE);
105105
};
106106

107107
return (

oracle-api/src/main/java/ca/bc/gov/oracleapi/interceptor/RoleAccessInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public boolean preHandle(
4747

4848
boolean allowed = matchUserRoleWithResourceRoles(rolesRequired, userRoles);
4949
if (!allowed) {
50-
response.setStatus(HttpStatus.UNAUTHORIZED.value());
50+
response.setStatus(HttpStatus.FORBIDDEN.value());
5151
}
5252

5353
return allowed;

0 commit comments

Comments
 (0)