Created
August 22, 2023 21:59
-
-
Save jcdcdev/d20514ba55fd23e7ae2d87c588e27712 to your computer and use it in GitHub Desktop.
Umbraco.Community.SimpleDashboards - Example #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Umbraco.Community.SimpleDashboards.Core; | |
// Control order of where dashboard shows | |
[Umbraco.Cms.Core.Composing.Weight(-100)] | |
public class BasicDashboard : SimpleDashboard | |
{ | |
public BasicDashboard() | |
{ | |
// Set dashboard name | |
SetName("Example Dashboard Name (default)"); | |
// Set culture specific dashboard name | |
SetName("Example Dashboard Name (en-GB)", "en-GB"); | |
// Show dashboard in the Media & Content sections | |
AddSection(Cms.Core.Constants.Applications.Media); | |
AddSection(Cms.Core.Constants.Applications.Content); | |
// Allow Editors | |
AddAccessRule(SimpleAccessRule.AllowEditorGroup); | |
// Allow custom User Group | |
Allow(x=>x.UserGroup("myGroup")); | |
// Deny custom User Group | |
Deny(x=>x.UserGroup("myOtherGroup")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment