Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Armitage 414 posts 1655 karma points
    Nov 30, 2020 @ 06:05
    David Armitage
    0

    Umbraco 8 Remove Redirect Url Management Tab

    Hi Guys,

    Does anyone know how to remove the Redirect Url Management Tab. I am not really using this since I am using another package to handle all this.

    It would be great if I could either remove this for everyone or just for Editors / Writers.

    I am sure this used to be a simple config setting in Umbraco 7 but in 8 I am not so sure.

    Kind Regards

    David

  • Matthew Wise 257 posts 1182 karma points MVP c-trib
    Nov 30, 2020 @ 09:22
    Matthew Wise
    100

    Hi David, you can remove it using the following:

    YourComposer : IUserComposer
    {
        composition.Dashboards().Remove<RedirectUrlDashboard>();
    }
    

    If you want to restrict the dashboard you will need to create your own that inheirts from the RedirectUrlDashboard and override the AccessRules.

    MyRedirectUrlDashboard :  RedirectUrlDashboard
    {
        public IAccessRule[] AccessRules => new []
                                            {
                                                new AccessRule {Type = AccessRuleType.Grant, Value = Umbraco.Core.Constants.Security.AdminGroupAlias}
                                            };
    

    }

    You would then need to remove the existing and add your new one:

    YourComposer : IUserComposer
    {
        composition.Dashboards().Remove<RedirectUrlDashboard>()
        .Add<MyRedirectUrlDashboard>();
    }
    

    Documentation with the more details can be found here

    Thanks

    Matt

  • David Armitage 414 posts 1655 karma points
    Nov 30, 2020 @ 23:49
    David Armitage
    0

    Hi Matt,

    Perfect. That was just what I was looking for.

    To add I removed two dashboards

    The redirect and the getting started.

    composition.Dashboards().Remove<Umbraco.Web.Dashboards.RedirectUrlDashboard>(); //removes the Umbraco redirect dashboard
    
    
    composition.Dashboards().Remove<Umbraco.Web.Dashboards.ContentDashboard>(); //removes the Umbraco getting started dashboard
    

    Thanks for helping out so quick on this one.

    Regards

    David

  • David Armitage 414 posts 1655 karma points
    Nov 30, 2020 @ 09:32
    David Armitage
    0

    Hi Matt,

    I will give that a go tomorrow. Thanks for sharing that code.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies