Skip to content

Latest commit

 

History

History
40 lines (22 loc) · 1.98 KB

README.md

File metadata and controls

40 lines (22 loc) · 1.98 KB

RoleLayerRule

RoleLayerRule.OrchardCore is an Orchard Core CMS Module that adds a GlobalMethod, called role. The method returns true if the current user is in the specfified role, otherwise false.

role("Administrator")

This method can be used as part of a layer rule to specify that widgets in a layer only be displayed to users in certain roles.

Status

Build status Status

Getting Started

Add the NuGet package, RoleLayerRule.OrchardCore, to the Orchard Core CMS Website. Launch the website and sign in as an administrator to enable the module from the dashboard under Configuration -> Features.

RoleLayerRule.OrchardCore

Create a new layer and specify that widgets in the layer are only visible to Administrators using the new role layer rule.

Role Layer Rule

Create a widget in a visible zone and specify that it is in the restricted layer created above. In this case, I created a liquid widget in the Content zone and placed it in the new Admin layer.

Orchard Core CMS Widget

Browse to a route displaying the zone and verify that the widget is only displayed to users in the Administrators role.

Bugs

There are no known bugs.

Road map

There are no plans to add any additional features.

Credits

RoleLayerRule.OrchardCore is created and maintained by David Hayden.