@@ -184,7 +184,7 @@ public static Mono<RequestContext> deferSecured() {
184
184
if (!context .hasPrincipal ()) {
185
185
if (LOGGER .isDebugEnabled ()) {
186
186
LOGGER .debug (
187
- "Insufficient permissions for secured method ({}): "
187
+ "Insufficient permissions for secured method ({}) -- "
188
188
+ "request context ({}) does not have principal" ,
189
189
context ,
190
190
context .methodInfo ());
@@ -198,9 +198,10 @@ public static Mono<RequestContext> deferSecured() {
198
198
if (!methodInfo .allowedRoles ().contains (principal .role ())) {
199
199
if (LOGGER .isDebugEnabled ()) {
200
200
LOGGER .debug (
201
- "Insufficient permissions for secured method ({}): "
202
- + "principal role is not allowed (principal: {})" ,
201
+ "Insufficient permissions for secured method ({}) -- "
202
+ + "principal role '{}' is not allowed (principal: {})" ,
203
203
context .methodInfo (),
204
+ principal .role (),
204
205
principal );
205
206
}
206
207
throw new ForbiddenException ("Insufficient permissions" );
@@ -210,11 +211,11 @@ public static Mono<RequestContext> deferSecured() {
210
211
if (!principal .hasPermission (allowedPermission )) {
211
212
if (LOGGER .isDebugEnabled ()) {
212
213
LOGGER .debug (
213
- "Insufficient permissions for secured method ({}): "
214
- + "allowed permission: {} is missing (principal: {})" ,
214
+ "Insufficient permissions for secured method ({}) -- "
215
+ + "allowed permission '{}' is missing (principal: {})" ,
215
216
context .methodInfo (),
216
217
allowedPermission ,
217
- principal . role () );
218
+ principal );
218
219
}
219
220
throw new ForbiddenException ("Insufficient permissions" );
220
221
}
0 commit comments