-
Notifications
You must be signed in to change notification settings - Fork 13
Extending Backoffice UI
Dennis Heutinck edited this page Oct 9, 2022
·
1 revision
The dashboard is registered with dependency injection, so you can customise the dashboard permissions just like any native Umbraco dashboard. Follow Umbraco's documentation on customising dashboard permissions, but use UrlTracker.Backoffice.UI.UrlTrackerDashboard
. You may end up with something similar to this:
public class MyDashboardComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.Dashboards()
// Remove the default
.Remove<UrlTrackerDashboard>()
// Add the overridden one
.Add<MyCustomUrlTrackerDashboard>();
}
}
public class MyCustomUrlTrackerDashboard : UrlTrackerDashboard, IDashboard
{
IAccessRule[] IDashboard.AccessRules { get; } = new IAccessRule[]
{
new AccessRule {Type = AccessRuleType.Deny, Value = Constants.Security.WriterGroupAlias},
new AccessRule {Type = AccessRuleType.Grant, Value = Constants.Security.AdminGroupAlias},
new AccessRule {Type = AccessRuleType.Grant, Value = "marketing"}
};
}
This documentation is up-to-date with version 10.2.0-beta.1 and higher. For older versions, please check the documentation history. If something is missing or some information is incorrect, please create an issue in our issue tracker to let us know! If you have any questions, feel free to check out our discussions.