Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Have a look at the <code>AffirmativeBased</code> - DecisionManager. You can enhance it an add some additional information to the <code>AccessDeniedException</code>. But it seams to be not so easy to get the reasons from the <code>Voter</code>s why they dendied the access. (I hope you will find some naming pattern, or you have even to extend the voters).</p> <p>And this is an example how to configure your custom DecisionManager</p> <pre><code> &lt;security:http auto-config="true" access-decision-manager-ref="myDecisionManager"&gt; &lt;bean id="myAccessDecisionManager" class="MyAffirmativeBasedDecisionManager"&gt; &lt;constructor-arg name="decisionVoters"&gt; &lt;list&gt; &lt;ref bean="roleVoter" /&gt; &lt;ref bean="authenticatedVoter" /&gt; &lt;ref bean="preAdviceVoter" /&gt; &lt;/list&gt; &lt;/constructor-arg&gt; &lt;/bean&gt; &lt;bean id="roleVoter" class="org.springframework.security.access.vote.RoleVoter" /&gt; &lt;bean id="authenticatedVoter" class="org.springframework.security.access.vote.AuthenticatedVoter" /&gt; &lt;bean id="preAdviceVoter" class="org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter"&gt; &lt;constructor-arg ref="exprPreInvocationAdvice" /&gt; &lt;/bean&gt; &lt;bean class="org.springframework.security.access.expression.method.ExpressionBasedPreInvocationAdvice" id="exprPreInvocationAdvice"&gt; &lt;property name="expressionHandler" ref="methodExprHandler" /&gt; &lt;/bean&gt; &lt;bean id="methodExprHandler" class="org.springframework.security.access.expression.method.ExtensibleMethodSecurityExpressionHandler"&gt; &lt;property name="methodSecurityExpressionRootFactory"&gt; &lt;bean class="com.queomedia.infrastructure.security.spring.MethodSecurityExpressionRootFactoryImpl" /&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload