Code to Control Display of a Business Desk Module

This example shows how to control whether the Catalog Editor module in Commerce Server Business Desk is displayed to the current user.

  1. Open the XML file corresponding to the Catalog Editor module. When the Retail Solution Site is unpackaged to the default installation directory, this file, named Catalogs_editor.xml, will be located in the folder \Inetpub\wwwroot\retailbizdesk\config.

    Commerce Server Solution Sites are available at https://go.microsoft.com/fwlink/?linkid=6491.

  2. The name of the ASP file associated with the Catalog Editor module is found in the id attribute of the module element of this file. For more information about the XML format, see Module Configuration Files.

    <module id="catalogs/editor/list_Catalogs.asp">
       <name>Catalog Editor</name> 
       <tooltip>Manage Catalog Data</tooltip> 
    </module>
    
  3. Create the BizDeskSecurity object.

    Dim oBizDeskSecurity
    Set oBizDeskSecurity = Server.CreateObject("Commerce.BizDeskSecurity")
    
  4. Pass the ASP file to the BizDeskSecurity object.

    If oBizDeskSecurity.CanUserAccess("list_Catalogs.asp") Then
       ' Display the module
    End If
    

Copyright © 2005 Microsoft Corporation.
All rights reserved.