This project is read-only.

Installing the Extension

This extension is installed just as any other module or provider through the Host->Extensions menu option. Note that the provider requires DotNetNuke version 6.1.2 or greater; ensure that your installation meets this minimum requirement before proceeding.

To Install:

  1. Log in as a host user,
  2. Install the DotNetNuke Role-Based Control Panels install package,
  3. Visit Host->Host Settings->Other Settings and change the selected control panel to the Demultiplexing option.

Configuration and Usage

Associations between roles and control panels is maintained via metadata in the web.config file. Upon installation, a new node will be created at configuration/dotnetnuke/controlPanels. Two nodes will initially exist:

<add name="null" 
     type="BrandonHaynes.Providers.ControlPanel.NullControlPanel, BrandonHaynes.Providers.ControlPanel" />
<add name="administrators" 
     type="BrandonHaynes.Providers.ControlPanel.RuntimeControlPanel, BrandonHaynes.Providers.ControlPanel" 
     path="admin/ControlPanel/RibbonBar.ascx" />

These nodes serve to maintain the existing mapping to the default DotNetNuke control panel, and a mapping that is used as fallback control if no other association is made for a given user. These associations should not be removed, though it is reasonable to select an alternate control panel.

Adding a new mapping is straightforward. For example, assume that our installation contains a role named "Power Users" in portal 0. We may associate a control panel that displays only the Admin menu to those users via the following entry:

<add name="powerUsers" 
     roles="Power Users" 
     type="BrandonHaynes.Providers.ControlPanel.RuntimeControlPanel, BrandonHaynes.Providers.ControlPanel" 
     path="DesktopModules/BrandonHaynes/ControlPanel/AdminMenuControlPanel.ascx" />

The "portals" attribute is optional; if omitted the mapping applies across all portals.

Referencing Your Own Custom Control Panels

In the above example, we leveraged the RuntimeControlPanel and specified a path to the control which is loaded and inserted into the control hierarchy at runtime. It is also possible to specify a control that exists within an assembly, as:

<add name="myAssociation" 
     roles="Awesome Users" 
     type="MyNamespace.MyType, MyAssembly" />

Included Control Panel Types

The extension includes a sample control panel named "AdminMenuControlPanel" that functions in a manner similar to the DotNetNuke control panel but displays only the administrator menu. As one would expect, the set of available options are circumscribed to those visible to the requesting user. If the user does not have view access to the "Admin" menu, no options are available.

Last edited Mar 2, 2012 at 2:57 PM by BrandonHaynes, version 1


No comments yet.