Webinar SignUp

Managing Your Admin User Menus

Operating a successful and popular AspDotNetStorefront MultiStore may often require additional Admin Users accessing the console to perform various duties, and it may be necessary to limit the menus accessible to specific Admin Users. Not to worry, as there is a method available to keep the right hands in the right places.

NOTE: For ML8 editions, follow the instructions in this KB Article.

Following these instructions can effectively limit the menus available to specific Admin Users:

1) Go to {root}/admin/controls folder and duplicate the files: AdminMenu.ascx and AdminMenu.ascx.cs adding a 2 for the new name

Duplicate and rename AdminMenu.ascx and AdminMenu.ascx.cs2) Open  the new files and change these lines accordingly:

AdminMenu2.ascx :

Modify AdminMenu2.ascx

AdminMenu2.ascx.cs :

Modify AdminMenu.ascx.cs

3) In your AdminMenu2.ascx.cs , comment out the appropriate lines below (e.g. Orders, Products, etc.) if you want to hide certain top level menus to Admin Users, using a double forward slash //

Comment out Parent menus
4) To hide specific sub-menus underneath the main menus, follow this procedure:

a) Go to the GetChildMenuItems(MenuItem Parent) method and comment out the desired lines, using a forward slash and asterisk /* and close with an asterisk forward slash */

For example, if you wish to lockout the Recurring Orders Submenu:

Comment out sub menus

5) Once your modifications are saved, in the Admin Console go to Customers -> View/Edit Customers and Users, then select the Admin User you wish to apply these restrictions to. In the “Notes” field on the customer profile frame, specify the AdminMenu2.ascx file and “Update Customer”.

6) Reset Cache in the Admin Console.

Now your Admin User will no longer have the restricted menus available. Note that they can still access the restricted functions by explicitly calling up the page URL, which can come in handy if you require someone to access a normally restricted function.

You can create as many Admin Menus as you wish, but are required to create them sequentially, starting with AdminMenu2, then AdminMenu3 and so on.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted in Developer Tips, Store Setup | Tagged , , | 1 Comment

One Response to Managing Your Admin User Menus

  1. Paul says:

    Nice tip! – would be great if it restricted access to the actual files as well. Maybe using security trimming?

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + 7 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>