Hello folks
Currently I’m having a task on a v13.9 site where I need to hide the built in Redirect Dashboard (Umbraco’s own to handle internal 301 redirects) and also the Skybrud Redirects Dashboard.
Following the documentation I managed to hide the built in dashboard using this code
public class DashboardDefaultSettings : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
// Unregister Umbraco's Redirect Url Dashboard
builder.Dashboards().Remove<RedirectUrlDashboard>();
// Re-register Umbraco's Redirect Url Dashboard using an override
builder.Dashboards().Add<RedirectUrlDashboardOverride>();
}
}
public class RedirectUrlDashboardOverride : RedirectUrlDashboard, IDashboard
{
IAccessRule[] IDashboard.AccessRules { get; } = new IAccessRule[]
{
new AccessRule {Type = AccessRuleType.Grant, Value = Constants.Security.AdminGroupAlias}
};
}
This is all good and works like a charm I only see the Dashboard whenever I’m logged in as an administrator.
However I can’t seem to figure out how to do the same with the Skybrud Redirects Dashboard - I have been reading this thread on Discord Hide Skybrud Redirects dashboard from custom user group Umbraco #help-with-umbraco
But I can’t seem to add the Skybrud namespace in my Composer, like it’s showcased in the examples and the Skybrud Redirects documentation. According to ChatGPT a recent change in Skybrud v13 means that the Class is now internal and therefore can’t be reached as usual.
So I’m wondering if there is another way around this? I have not been able to figure it out - Also I’m usually a frontend developer so I’m a bit out of my comfort zone here and I might have gotten things in the wrong order… Who knows
/Jan