Copied to clipboard

Flag this post as spam?

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


  • JoskerVemeulen 65 posts 257 karma points
    Mar 18, 2019 @ 13:12
    JoskerVemeulen
    0

    Hide "Redirect URL Management" from editors

    Hi,

    I would like to hide the Redirect URL Management tab from my clients. Any idea how to go about it in V8?

    Thanks!

  • Søren Gregersen 330 posts 1358 karma points MVP 2x c-trib
    Mar 19, 2019 @ 09:28
    Søren Gregersen
    0

    Hi,

    If I read the code correct, dashboards are now setup via DI. This means that you would have to register your own version of the dashboard (and remove the original) in order for you to change how it is setup.

    The dashboard is defined here: https://github.com/umbraco/Umbraco-CMS/blob/dev-v8/src/Umbraco.Web/Dashboards/RedirectUrlDashboard.cs

    In your composer, you would then:

    composition.Dashboards().Remove<RedirectUrlDashboard>();
    composition.Dashboards().Add<MyRedirectUrlDashboard>();
    
  • Lee 35 posts 83 karma points
    Feb 28, 2020 @ 21:16
    Lee
    0

    @Søren Gregersen, that would remove the dashboard for everyone, would it not? The OP needed to hide it from one user group: Editors.

    I have the same problem as the OP.

    I created an issue: https://github.com/umbraco/Umbraco-CMS/issues/7737

  • Søren Gregersen 330 posts 1358 karma points MVP 2x c-trib
    Feb 28, 2020 @ 21:50
    Søren Gregersen
    0

    You remove the default, replace with your own version with the new permissions :-)

    The my-version would be something like:

    [Weight(21)]
    public class MyRedirectUrlDashboard : IDashboard
    {
        public new IAccessRule[] AccessRules => Array.Empty<IAccessRule>();
    }
    

    It would need to implement a new accesrule

  • Lee 35 posts 83 karma points
    Feb 28, 2020 @ 22:00
    Lee
    0

    Thanks for the swift reply, @Søren Gregersen. Now I get what you were saying in your original reply.

    Wow, this is ridiculous on several levels! First, why are writers being shown an administrator's dashboard in the first place, necessitating my "hiding" it?! Second, in v7, all this took was:

      <section alias="StartupDashboardSection">
    <access>
      <deny>translator</deny>
      <deny>yourUserGroup</deny>
    </access>
    <areas>
      <area>content</area>
    </areas>
    <tab caption="Get Started"> ...
    

    Now, I have to go deep into code--to fix an Umbraco bug--with some hackaround of remove-it-and-it-add back? Ugh.

    Will doing so affect our many existing URL redirects?

  • Søren Gregersen 330 posts 1358 karma points MVP 2x c-trib
    Feb 28, 2020 @ 22:39
    Søren Gregersen
    0

    Managing urls is a content editor job :-)

  • Lee 35 posts 83 karma points
    Mar 01, 2020 @ 19:48
    Lee
    0

    Our users in the writer role have different Content start nodes; yet, the Redirect URL Management allows them to edit rules affecting pages outside of the content they should have access to.

    Umbraco should not give global Redirect URL Management to restricted users.

Please Sign in or register to post replies

Write your reply to:

Draft