This is exactly what I am implementing
right now. Funny, that this is the first post I see when I joined the list. I
am creating a series of custom voters: ·
SimpleRoleVoter – will grant
access if the user has the role in question, deny otherwise ·
EntityRoleVoter – will grant
access if any of the user’s roles matches any of the roles of the entity
being accessed, deny otherwise. ·
OwnerRelationshipVoter –
will grant access if the entity being accessed is owned by the user, deny otherwise ·
Maybe another type of relationship
as well. I am not creating my own
AccessDecisionManager. In order to plug in to existing authentication, I am
implementing a custom provider and token. Anything about this seem
not right? We are going to use the method invocation interceptor but it might
be useful to write a custom one in the future. From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stefan D Sookraj Actually, that is
exactly what I was stating. He needs to know whether an employee is a CEO or a
regular employee since both use the same Employee object. What I was eluding to
is that currently, even if you added a property in the Employee object to
determine if it is a CEO or not, I was not sure if the Method security would be
able to decide upon that attribute. But I think your suggestions regarding using
a voter or other way may just work. I am also now starting to integrate Acegi
with my application so I am no expert and have not looked into writing a custom
voter. I have written a custom provider, custom processing filter and custom
filter entry point. I will need to give this some more thought since I have
came across this scenario many times and sure will in this current application.
Thank uyou.
|
- [Acegisecurity-developer] Instance based security Andy Depue
- [Acegisecurity-developer] Instance based security Ben Alex
- Re: [Acegisecurity-developer] Instance based securit... Stefan D Sookraj
- Re: [Acegisecurity-developer] Instance based sec... steve . storey
- Re: [Acegisecurity-developer] Instance based securit... Stefan D Sookraj
- RE: [Acegisecurity-developer] Instance based securit... March, Andres
- RE: [Acegisecurity-developer] Instance based securit... March, Andres
- RE: [Acegisecurity-developer] Instance based securit... March, Andres
- RE: [Acegisecurity-developer] Instance based securit... March, Andres
- RE: [Acegisecurity-developer] Instance based securit... March, Andres
- RE: [Acegisecurity-developer] Instance based securit... March, Andres
- RE: [Acegisecurity-developer] Instance based securit... March, Andres