[ 
https://issues.apache.org/jira/browse/SHIRO-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249296#comment-13249296
 ] 

Alexey Balchunas commented on SHIRO-343:
----------------------------------------

There is the same issue with guice.
It just takes a proxy guice object which of course doesn't contain the 
annotation.
It can be fixed by overriding the "createAnnotationResolver" method of 
ShiroAopModule.
Here is my fix. Don't know if it's the right way, but works for me.
http://cl.ly/1n0V1M2t1Y3L213U312m
                
> RequiresRoles annotation is not intercepting on a class level when configured 
> with Spring MVC
> ---------------------------------------------------------------------------------------------
>
>                 Key: SHIRO-343
>                 URL: https://issues.apache.org/jira/browse/SHIRO-343
>             Project: Shiro
>          Issue Type: Bug
>            Reporter: Brian M. Carr
>            Priority: Minor
>         Attachments: shiro-security-context.xml
>
>
> With the shown sanitized context definition, Shiro intercepts method 
> invocations annotated with RequiresRoles, but fails to intercept if the 
> annotation is at the class level.  This requires duplication of the 
> annotation to every method within a Controller class.  
> Les says: "[...] this is something our AOPAlliance interceptor would have to
> check for - first the method and if it has annotations, and then the
> class to see if it has annotations [...]"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to