-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
PreAuthorizeExpressionAttributeRegistry#resolveAttribute can't find annotation on class when method is declared on superclass #13783
Labels
Comments
Well, I was wondering if there are any updates on this? /**
* @see org.springframework.security.authorization.method.PostAuthorizeExpressionAttributeRegistry#findPostAuthorizeAnnotation
*/
private PostAuthorize findPostAuthorizeAnnotation(Method method) {
PostAuthorize postAuthorize = AuthorizationAnnotationUtils.findUniqueAnnotation(method, PostAuthorize.class);
// org.springframework.security.authorization.method.PostAuthorizeExpressionAttributeRegistry#resolveAttribute
// Use `targetClass`(from calling method argument) instead of `method.getDeclaringClass()`.
return (postAuthorize != null) ? postAuthorize
: AuthorizationAnnotationUtils.findUniqueAnnotation(targetClass, PostAuthorize.class);
} |
kse-music
added a commit
to kse-music/spring-security
that referenced
this issue
Jan 22, 2024
kse-music
added a commit
to kse-music/spring-security
that referenced
this issue
Jan 22, 2024
kse-music
added a commit
to kse-music/spring-security
that referenced
this issue
Feb 1, 2024
kse-music
added a commit
to kse-music/spring-security
that referenced
this issue
Feb 1, 2024
jzheaux
pushed a commit
that referenced
this issue
Feb 1, 2024
jzheaux
pushed a commit
that referenced
this issue
May 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the bug
Using @PreAuthorize annotation on Class is not found when method is declared on superclass.
To Reproduce
Create a class and define methods like:
Create a controller:
The text was updated successfully, but these errors were encountered: