On Mon, Feb 22, 2010 at 2:00 PM, aloleary <[email protected]> wrote:
> This sounds really interesting.. would you have an example of what the
> client code might look like ? I'm not too familiar with how to invoke
> getThis..
> do I add JoinPoint and access that way ?

getThis() is just a piece in the puzzle that you might eventually
need. But it's really up in the air how to deal with this instance
part of the permission generically as Les mentioned. Looking at the
source of PermissionAnnotationHandler and AnnotationMethodInterceptor
will give you some idea how it's currently handled but you need a bit
smarter Subject.isPermitted() to handle the case. Browsing the
javadocs might help as well (currently published at
http://incubator.apache.org/shiro/site/apidocs/index.html but url
likely going to change before the first release). For specific
implementations, the quickest way probably is to provide your own
implementation of Subject in which case you can decide how to handle
the permission check. But there's no common understanding how to
interpret the last part.

Kalle


> On Mon, Feb 22, 2010 at 8:35 PM, kaosko [via Shiro User]
> <[hidden email]> wrote:
>> I just recently added getThis() to MethodInvocation interface for this
>> purpose (see https://issues.apache.org/jira/browse/SHIRO-124) and
>> implemented it for spring-aop and aspectJ support libs. This is
>> supposed to give you the calling context - obviously still your
>> responsibility how to do the permission check but see if that would
>> help you.
>>
>> Kalle
>>
>>
>> On Mon, Feb 22, 2010 at 12:09 PM, aloleary <[hidden email]> wrote:
>>>
>>> Yes.. the Spring AOP stuff works great. And how to give the AOP context
>>> on
>>> how to execute the check is exactly what I'm trying to achieve.
>>>
>>> The proposed change is certainly heading in the right direction... just
>>> have
>>> a think about Generics when brainstorming :-)
>>>
>>>
>>> --
>>> View this message in context:
>>>
>>> http://n2.nabble.com/Security-on-Generic-interfaces-tp4607155p4614685.html
>>> Sent from the Shiro User mailing list archive at Nabble.com.
>>>
>>
>>
>> ________________________________
>> View message @
>> http://n2.nabble.com/Security-on-Generic-interfaces-tp4607155p4614803.html
>> To start a new topic under Shiro User, email
>> [hidden email]
>> To unsubscribe from Shiro User, click here.
>>
>
> ________________________________
> View this message in context: Re: Security on Generic interfaces...
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Reply via email to