Protecting controller commands

All controller commands require a role-based access control policy in order to be executed. A controller or task command also requires a resource-level policy if the command is doing resource-level checking.

About this task

For more information see Protecting resources. The following example displays a role-based policy for controller commands:

<Policy Name="SellersExecuteSellersCmdResourceGroup"

The ActionGroupName, ExecuteCommandActionGroup, indicates that this is a role-based policy for controller commands. The policy states that users in the Sellers access group can execute the commands in the SellersCmdResourceGroup, resource group.

The following is an example of the SellersCmdResourceGroup resource group definition:

<ResourceGroup Name="SellersCmdResourceGroup"

The preceding example shows the following three resources in the resource group, that each correspond to a controller command:


The following is a sample definition of a resource:



        <ResourceAction Name="ExecuteCommand"/>

The Name attribute,, is used as a tag to refer to the resource in the XML file. The ResourceAction Name, ExecuteCommand, is used to specify the actions that can operate on the resource. This information is used in the Administration console when using access control policies to populate the Action selection box that corresponds to a particular resource. In this case, the action Execute is specified. The Execute action is defined in the following:

<Action Name="ExcecuteCommand CommandName="Execute">
Note: The interface name of the controller command must match the ResourceBeanClass in the resource definition. The value of the ResourceBeanClass is stored in the RESCLASSNAME column of the ACRESCGRY table. These commands can be used as resources because they extend the ControllerCommand interface, which extends the AccCommand interface, which in turn extends the Protectable interface.