Debugging access control policy

Complete flow


For a new view 


Policy xml

<Action Name="MyNewView" 
CommandName="MyNewView"> 
</Action> 

<ActionGroup Name="AllSiteUsersViews" OwnerID="RootOrganization"> 
<ActionGroupAction Name="MyNewView"/>
</ActionGroup>

By Query, you can check : 
select ACACTION_ID from ACACTION where ACTION = 'MyNewView'

select acactgrp_id from acactactgp where acaction_id in (select ACACTION_ID from ACACTION 
where ACTION = 'MyNewView')

select distinct acpolicy_id from acpolicy where acactgrp_id in (select acactgrp_id 
from acactactgp where acaction_id 
in (select ACACTION_ID from ACACTION where ACTION = 'MyNewView'))

Figure 2. Policy to Action relationship chain

For Commands


Policy File
<ResourceCategory Name="com.yourcompany.MyOrderItemAddCmdCategory" 
ResourceBeanClass=" com.yourcompany.MyOrderItemAddCmd">
   <ResourceAction Name="ExecuteCommand"/>
</ResourceCategory>

<ResourceGroup Name="MyResourceGroup" OwnerID="RootOrganization">
   <ResourceGroupResource Name=" com.yourcompany.MyOrderItemAddCmdCategory "/>
</ResourceGroup>

Query :
select distinct acrescgry_id from acrescgry 
where resclassname = 'com.yourcompany.MyOrderItemAddCmd'

select distinct acresgrp_id from acresgpres where acrescgry_id in 
(select distinct acrescgry_id from acrescgry 
where resclassname = 'com.yourcompany.MyOrderItemAddCmd')

select acpolicy_id,policyname from acpolicy where acresgrp_id in 
(select acresgrp_id from acresgpres where acrescgry_id in 
(select acrescgry_id from acrescgry 
where resclassname = 'com.yourcompany.MyOrderItemAddCmd'))

Figure 3. Policy to resource relationship chain


Comments

Popular posts from this blog

Merging / Migrating / Combining User Session Data (Cart Merge while User Logon in Websphere Commerce)

Calculation Framework in Websphere Commerce.

Websphere Commerce Catalog Subsystem