Walkthrough: Creating a Role Context Security Policy
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
In this topic you modify a policy to apply it to security roles.
Prerequisites
This topic continues a sequence of topics. This topic uses AOT elements that you create by completing the preceding topics. For this topic, you first must complete the preceding topics listed next:
In Walkthrough: Creating a Simple Default Security Policy you created and verified a simple default security policy.
Then in Walkthrough: Constraining Access to Table Data by Using Security Policies you constrained tables or views by enforcing a security policy on related tables.
Change the Security Policy to Specify a Security Role
Change the ContextType property on the policy node MajorCustomersPolicy to RoleName.
Set the RoleName property on the policy node to TradeSalesManager.
The following figure shows the MajorCustomersPolicy security policy property values.
The security policy property values
Verify that the Security Policy is Enforced
As an application user, you can now verify that the new security policy is enforced by the system.
Manually assign an application user to the Sales manager role by using the System administration form. For information about how to assign a user to a role, see Assign users to security roles.
Log on to the system as an application user and run the AX32.exe client application from the Command Prompt window.
Switch to company Contoso Entertainment Systems (West) (CEU).
Switch to module Accounts Receivable and open Setup > Customers > Customer groups
Verify that the application user can only view the Major customers customer group, as shown in the following image.
The customer group that the application user can view
See also
Walkthrough: Constraining Access to Table Data by Using Security Policies
Walkthrough: Creating a Role Context Security Policy
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.