Skip to main content

Posts

Showing posts with the label How to disable the access control policy

How to disable the access control policy

How to disable the access control policy: 1. Open wc-server.xml which is located in WCDE_ENT70\workspace\WC\xml\config\wc-server.xml 2. Search for "<Instance" tag 3. Add AccessControlUnitTest="true immediately after "<Instance " 4. Save the file 5. Restart the server After implementing this steps the server will not throw  "User does not have authority to execute Command/View" How to disable access control check in Commands: If you want to disable access control policy for a controller command then call setAccCheck(false) before calling execute. This method is set by the web controller to indicate whether an access control check is required for this command. For e.g OrderCreateCmd orderCreateCmd= (OrderCreateCmd ) CommandFactory.createCommand(OrderCreateCmd .NAME,   getStoreId())     orderCreateCmd.setAccCheck(false); orderCreateCmd.execute(); accessControlCheck(): This method performs a command level access control chec