Hi,
 I am writing a custom voter implementation and have a question 
regarding how configuration attributes are being fed to the voters.

 AccessDecisionVoter has a method supports(ConfigAttribute), yet vote() 
method is passed ConfigAttributeDefinition, which could potentially 
include multiple ConfigAttribute instances within it.

 I've initially assumed that voter would be given entire set of config 
attributes (e.g. "A" and "B" in the example below), but that's not the 
case - at least UnanimousBased decision manager gives voters one 
attribute at a time until the decision is made (by creating a 
ConfigAttributeDefinition that includes only one config attribute).  So 
when should voter expect multiple config attributes?

Example:
  The configuration below results in config attributes "A" and "B" being 
given to CustomVoter.vote() method one at a time. If that's how it's 
supposed to work, why vote() method doesn't take ConfigAttribute as an 
argument instead?

     <bean id="decisionManager" 
class="org.acegisecurity.vote.UnanimousBased">
        <property name="decisionVoters">
            <list>
                <bean class="CustomVoter"/>
            </list>
        </property>
    </bean>

    <bean id="portletDefinitionSecurityInterceptor" 
class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
        <property name="authenticationManager"><ref 
local="authentication"/></property>
        <property name="accessDecisionManager"><ref 
local="decisionManager"/></property>
        <property name="objectDefinitionSource">
            <value>
                myImpl.metho*=A,B
            </value>
        </property>
    </bean>

thanks in advance,
-peter.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to