davidhayden-ci - RoleLayerRule.OrchardCore 1.0.0-rc2-4
Adds a role layer rule.
PM> Install-Package RoleLayerRule.OrchardCore -Version 1.0.0-rc2-4 -Source https://www.myget.org/F/davidhayden-ci/api/v3/index.json
> nuget.exe install RoleLayerRule.OrchardCore -Version 1.0.0-rc2-4 -Source https://www.myget.org/F/davidhayden-ci/api/v3/index.json
> dotnet add package RoleLayerRule.OrchardCore --version 1.0.0-rc2-4 --source https://www.myget.org/F/davidhayden-ci/api/v3/index.json
source https://www.myget.org/F/davidhayden-ci/api/v3/index.json
nuget RoleLayerRule.OrchardCore ~> 1.0.0-rc2-4
Copy to clipboard
> choco install RoleLayerRule.OrchardCore --version 1.0.0-rc2-4 --source https://www.myget.org/F/davidhayden-ci/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "davidhayden-ci" -SourceLocation "https://www.myget.org/F/davidhayden-ci/api/v2"
Install-Module -Name "RoleLayerRule.OrchardCore" -RequiredVersion "1.0.0-rc2-4" -Repository "davidhayden-ci" -AllowPreRelease
Copy to clipboard
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
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.

Create a new layer and specify that widgets in the layer are only visible to Administrators using the new 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.

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.
-
.NETCoreApp 3.1
- OrchardCore.Infrastructure.Abstractions (>= 1.0.0-rc2-13450)
- OrchardCore.Module.Targets (>= 1.0.0-rc2-13450)
- .NETCoreApp 3.1: 3.1.0.0
OwnersDavid Hayden |
AuthorsDavid Hayden |
Project URLhttps://github.com/davidhayden/RoleLayerRule |
LicenseMIT |
TagsRoleLayerRule OrchardCore |
Info50 total downloads |
| 50 downloads for version 1.0.0-rc2-4 |
| Download (7.73 KB) |
| Found on the current feed only |
Package history
| Version | Size | Last updated | Downloads | Mirrored? | |||
|---|---|---|---|---|---|---|---|
|
|
1.0.0-rc2-4 | 7.73 KB | Tue, 30 Jun 2020 15:28:36 GMT | 50 |
|