feat: D1 — Shopping list (Issue #30) #43
@@ -35,7 +35,7 @@ public class HouseholdRoleInterceptor implements HandlerInterceptor {
|
||||
|
||||
String actualRole = householdResolver.resolveRole(auth.getName());
|
||||
if (!annotation.value().equals(actualRole)) {
|
||||
throw new ForbiddenException("Requires household role: " + annotation.value());
|
||||
throw new ForbiddenException("Insufficient permissions");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -62,7 +62,7 @@ class HouseholdRoleInterceptorTest {
|
||||
|
||||
assertThatThrownBy(() -> interceptor.preHandle(request, response, handlerMethod))
|
||||
.isInstanceOf(ForbiddenException.class)
|
||||
.hasMessageContaining("planner");
|
||||
.hasMessage("Insufficient permissions");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user