Skip to content

AccessDeniedHandler cannot handle exception thrown from AuthorizationManagerBeforeMethodInterceptor #12951

@insight720

Description

@insight720

Expected Behavior
The AccessDeniedHandler should be able to handle all AccessDeniedException.

Current Behavior
The AccessDeniedException thrown from the AuthorizationManagerBeforeMethodInterceptor does not appear to have been processed by the ExceptionTranslationFilter. Is this normal, a point that needs enhancement, or a bug? I am not sure. Please help me with my doubts, thank you.

Context
As shown in the figure, I correctly configured the AccessDeniedHandler, but the AccessDeniedException thrown due to using @ PreAuthorize will not be processed by it.
QQ截图20230331154029

Metadata

Metadata

Assignees

Labels

in: coreAn issue in spring-security-corestatus: invalidAn issue that we don't feel is valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions