Copied to clipboard

Flag this post as spam?

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


  • Rudolph 14 posts 84 karma points
    Jun 28, 2021 @ 09:11
    Rudolph
    0

    User with custom role to access single website gets redirect to redirect URL's page after login

    Hi

    I've setup a user with a custom group that has access to Content and Media for one site only.

    When the user login in, the first page he sees is the Redirect URL's page, which shows all the sites Redirect URL's.

    enter image description here

    Using Umbraco 8.10.1.

    Please help.

    Regards Rudolph

  • Erik Eelman 79 posts 319 karma points
    Jun 28, 2021 @ 09:58
    Erik Eelman
    100

    Hi Rudolph,

    This is the redirect url management dashboard from Umbraco. When you login to umbraco you start at "Content" and this shows you the available dashboards for the content section.

    If this specific user or usergroup is not allowed to see this, you can override the umbraco dashboard and remove it for the user or usergroup https://our.umbraco.com/documentation/Extending/Dashboards/

    Regards Erik

  • Rudolph 14 posts 84 karma points
    Jun 28, 2021 @ 11:15
    Rudolph
    0

    Thanks Erik.

    But why does it still show URL's from other content sites the user doesn't have access to?

    I would expect it to only show URL's from the allow site?

    Please let me know.

    Regards Rudolph

  • Erik Eelman 79 posts 319 karma points
    Jun 28, 2021 @ 11:22
    Erik Eelman
    0

    I believe de Dashboard only checks if the user is allowed to see the dashboard but it does not filter out any redirects. It just shows the data stored in UmbracoRedirectUrl table.

    Regards Erik

  • Rudolph 14 posts 84 karma points
    Jun 28, 2021 @ 12:01
    Rudolph
    0

    Thanks Erik.

    I got it working with package.manifest.

    But how do I hide the Redirect Url tab?

    enter image description here

  • Erik Eelman 79 posts 319 karma points
    Jun 28, 2021 @ 12:06
    Erik Eelman
    0

    Hi Rudolph,

    You can follow the example code on the page i shared above and go the the "override an umbraco dashboard section".

    namespace MyDashboardCustomization
    {
    public class MyComposer : IComposer
    {
        public void Compose(Composition composition)
        {
            composition.Dashboards()
                // Remove the default
                .Remove<RedirectUrlDashboard>()
                // Add the overridden one
                .Add<MyRedirectUrlDashboard>();
        }
    }
    
    // overridden redirect dashboard with custom rules
    public class MyRedirectUrlDashboard : RedirectUrlDashboard, IDashboard
    {
        // override explicit implementation
        IAccessRule[] IDashboard.AccessRules { get; } = new IAccessRule[]
        {
            new AccessRule {Type = AccessRuleType.Deny, Value = Umbraco.Core.Constants.Security.WriterGroupAlias},
            new AccessRule {Type = AccessRuleType.Grant, Value = Umbraco.Core.Constants.Security.AdminGroupAlias}
        };
    }
    

    }

  • Rudolph 14 posts 84 karma points
    Jun 28, 2021 @ 13:06
    Rudolph
    0

    Thanks, that did the trick of removing the Redirect URL section.

Please Sign in or register to post replies

Write your reply to:

Draft