This implementation of AccessController performs access control based on a set of rules, specified via the service’s ruleSetService property. For example, suppose there is a RuleSetService named FemaleRuleSetService, configured with the following rule set:

 <rule op=eq>
    <valueof target="Gender">
    <valueof constant="female">

Set the ruleSetService property of the Access Controller to point to FemaleMembersRuleSetService. The user will be allowed access only if she is in the Female profile group. Here is the example configuration:



# Rules used to determine whether access should be allowed

# URL to redirect to if access is denied

Note that when the rules are evaluated, the user’s Profile object is used to resolve the target expressions. Note also that the rules must evaluate to a Boolean. The rules used by a RuleAccessController component use the same syntax as those used for content targeting. See the Creating Rules for Targeting Content and the Setting Up Targeting Services chapters for more information.

The optional sourceMap property, if provided, is used to resolve any bean expressions in the access control rules. If no such expressions occur in the rules, you can leave this property as null.