You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I misunderstood the poster, because now we are facing this. The issue is not about multiple annotation inheritance which is forbidden by design now, but the fact that AuthorizationAnnotationUtils.findMergedAnnotations is detecting as duplicate the same exact annotation on same class (as different instances). In our case this happens exactly in the same scenario, when our child repository is a @RestResourceRepository and contains a @PreAuthorize in save() method. Indeed our subinterface is called SecuredRepository and its whole purpose is creating an abstraction so all saves() are Preauthorized. Theres no other @PreAuthorize in the class hierarchy in either custom or spring classes that we are aware of
This issue is similar to #13132
But for repository methods going through proxies.
Example code :
Then in
AuthorizationAnnotationUtils#findUniqueAnnotation
, themergedAnnotations
contains 2 PreAuthorize :Which results in an
AnnotationConfigurationException
The text was updated successfully, but these errors were encountered: