Problem
You have created a custom access policy file e.g. CustomACPolicies.xml, you load it using acpload, you don't get any error but still when you check the entries in database or using Organization admin console, you realize some of the entries are missing and were not loaded properly.
Fix
Make sure to review the order of the elements in the file, because the order of different section makes a whole big difference, for example a ResourceCategory or ResourceGroup can't come after a policy. Here is the order you need to follow within the XML file:
- Action
- ActionGroup
- ResourceCategory
- ResourceGroup
- Policy
- PolicyGroup
Example
The following extract from an access policy when executes, it creates the policy as well as resource group as expected, but the resource group is empty and it doesn't contain the resource com.beans,ResultDataBean.The reason is, the ResourceCategory should come before the ResourceGroup.
<ResourceGroup Name="PenguinDataBeansForCustomerServiceSupervisors" OwnerID="RootOrganization">
<ResourceGroupResource Name="com.beans.ResultDataBean"/>
</ResourceGroup>
<ResourceCategory Name="com.beans.ResultDataBean" ResourceBeanClass="com.beans.ResultDataBean">
<ResourceAction Name="DisplayDatabean"/>
</ResourceCategory>
<Policy Name="DisplayPenguinDataBeanForCustomerServiceRepresentatives"
OwnerID="RootOrganization"
UserGroup="CustomerServiceRepresentatives"
ActionGroupName="DisplayDatabeanActionGroup"
ResourceGroupName="PenguinDataBeansForCustomerServiceRepresentatives"
RelationName="owner"
PolicyType="groupableStandard">
</Policy>
No comments:
Post a Comment