Hi Nassos,

This is something that we've wanted for Shiro annotations for a long time,
but no one has built it yet.  I'm not sure off the top of my head how to go
about doing this, but I remember seeing Spring AOP have the ability to
reference method arguments by parameter name (this was a while ago, but I
know it is possible).  Since that information is lost at runtime, I think is
a compile time feature.  That, or you annotate method parameters that could
be accessed at runtime.

I think it would be great if someone wanted to help with this!

Cheers,

Les

On Tue, Nov 9, 2010 at 5:49 AM, Nassos A. Michas
<[email protected]>wrote:

> Hello,
>
> when using Shiro in a non-Spring webapp using the Shiro annotations and
> AspectJ (as per the Shiro sample application) is it possible to somehow have
> access to the member (or even the annotated method's) variables? For
> example, am I somehow able to write something like:
> @RequiresPermission("forum:readTopic:#forumID")
> void readTopic(String forumID) {
> ...
> }
> or even,
> @RequiresPermission("forum:readTopic:#forum.forumID")
> void readTopic(MyBean forum) {
> ...
> }
>
> If this is more of an AspectJ-related question please accept my apologies
> as I'm not a big AspectJ user.
>
>
> Thanks!
>
> -n-
>

Reply via email to