Copied to clipboard

Flag this post as spam?

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


  • David Tregoning 63 posts 236 karma points
    Jun 11, 2018 @ 14:55
    David Tregoning
    0

    Grant permissions in dashboard.config

    Our site has recently been upgraded so that user permissions are managed via groups. Some of the settings within our dashboard.config file are set to grant/deny via the old (version of Umbraco) permissions:

    • administrator
    • Editor
    • Writer
    • Translator

    How can I grant access to dashboard components using the new Umbraco Groups (name)?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 11, 2018 @ 17:08
    Jan Skovgaard
    0

    Hi David

    I'm not quite sure I understand your question? As far as I can tell the group names have not changed in recent versions? The users section in the backoffice has however had a nice UI improvement and things have changed a bit under the hood too of course allowing for granular permissions etc.

    But I'm not sure why that should be connected to the dashboard unless I'm missing something obvious of course :-)

    But when I look in the dashboard config it seems to me like permissions for the user groups are still handled as they have been for a long time.

    So can you elaborate a bit more on how you experience the changes you're talking about? What version of Umbraco did you upgrade from and to what version? And how do you manage the dashboards? Do you have many custom dashboard setup?

    Looking forward to hearing more from you.

    /Jan

  • David Tregoning 63 posts 236 karma points
    Jun 12, 2018 @ 08:16
    David Tregoning
    0

    Hi Jan,

    Thanks for coming back to me on this. I was running v7.4.3 of Umbraco. In this version there was no 'group' capability within the users section.

    The grouping of users was based on the 4 types listed in my first post (admin, editor, writers, translator). I have now upgraded to v7.7.4 which includes 'groups' within the Users section. I have created a group called 'support' and assigned users of this group access to certain areas of my website and this works fine.

    I want to give this same 'support' group access to URL Tracker (https://our.umbraco.org/projects/developer-tools/301-url-tracker/)

    The ability to display the URL tracker is controlled via the dashboard.config file but the documentation on the Umbraco website refers to the types of users (https://our.umbraco.org/documentation/Reference/Config/dashboard/)

    From what I can see the types of user functionailty has been removed with the introduction of Groups, thus I wondered how I can now Grant/Deny access via the dashboard.config file against Groups. Unless I am missing the setting to define a group as an 'editor'?

    Does that help explain my situation better?

    Many thanks in advance David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 12, 2018 @ 08:58
    Jan Skovgaard
    0

    Hi David

    I think that the only thing that might have changed is that now there is an option to also grant access by section using the <grantBySection> element, which is mentioned here https://our.umbraco.org/documentation/Reference/Config/dashboard/#access--permissions - But I suppose you might already have seen that? :-)...And maybe it has been possible for a long time...Can't remember. However though... You should be able to grant or deny access to editor and writer as before, using the same structure as in the example.

    I just had to look on an old site to see what the user section looked like before. But The thing is of course that "User types" has been renamed to "User groups" and you can do a ton of stuff on the user group level now that you could not do before.

    But it seems like the approach of deciding, which dashboard a certain user type should be able to access is still the same. Before it was decided by the "User type" name and now it's decided by the "User group" name I think.

    So whenever you want to enable access for a section for say the "Editor" but not the "Translator" group you can write

    <section alias="StartupDashboardSection">
        <access>
            <grant>editor</grant>
            <deny>translator</deny>
        </access>
        <areas>
            <area>content</area>
        </areas>
        <tab caption="Get Started">
            <control showOnce="true" addPanel="true" panelCaption="">
                views/dashboard/default/startupdashboardintro.html
            </control>
        </tab>
    </section>
    

    Does that make sense? Or am I missing your point?

    Looking forward to hearing from you.

    /Jan

  • David Tregoning 63 posts 236 karma points
    Jun 12, 2018 @ 13:57
    David Tregoning
    100

    Hi Jan,

    Almost there with my point, but with your help I have cracked what I was trying to achieve.

    The access examples above work for the orginal 4 user types but not for any additional/custom user types.

    What is required is the Alias for that Group name to be added to the grant or deny line within the config file enter image description here

    <section alias="StartupDashboardSection">
    <access>
        <grant>support</grant>
    </access>
    <areas>
        <area>content</area>
    </areas>
    <tab caption="Get Started">
        <control showOnce="true" addPanel="true" panelCaption="">
            views/dashboard/default/startupdashboardintro.html
        </control>
    </tab>
    

    IMO the documentation needs to be padded out to reflect the addition of custom groups to the config file.

    Thanks for all your help and your quick responses.

    Kind Regards David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 12, 2018 @ 14:00
    Jan Skovgaard
    1

    Hi David

    Aaah! I see what you mean - Thanks for sharing your solution with the rest of us.

    I'll try to add a line to the documentation about making it work with custom user groups and that it's important to use the alias.

    Happy I was able to point you in the right direction at least :-)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 12, 2018 @ 14:28
    Jan Skovgaard
    0

    Hi David

    Hmm - I just tried to create a support group on a clean installation of Umbraco 7.10.4 and then I added the following to hide the Redirect management dashboard for the support group. Notice that in the below example I'm using "Support" - I don't think it's actually case sensitive since it also works when I just write "support".

      <section alias="RedirectUrlManagement">
        <areas>
          <area>content</area>
        </areas>
        <tab caption="Redirect URL Management">
            <access>
                <deny>Support</deny>
            </access>
          <control>
            views/dashboard/developer/redirecturls.html
          </control>
        </tab>
      </section>
    

    I'm guessing that the issue you have had might be because the app pool was not recycled after you made your change to the dashboard.config maybe? I touched the web.config after my changes just to make sure.

    So for now I'm not going to add to the documentation like I said above since it seems to not be case sensitive :-)

    Can you perhaps share a snippet of what your dashboard.config looke like where you have granted or denied access for the support group?

    /Jan

  • David Tregoning 63 posts 236 karma points
    Jun 12, 2018 @ 14:39
    David Tregoning
    0

    Hi Jan,

    Once I tried the group name alias within the config file I did refresh my app pool, sorry should have mentioned that part in my testing.

    Just to be safe I copied the group alias verbatim in my testing but good to know this is not a necessity. The relevant part of the dashboard.config is:

    <tab caption="Url Tracker">
      <access>
        <grant>administrator</grant>
        <grant>webSupport</grant>
      </access>
      <control addPanel="true">~/Umbraco/UrlTracker/InfoCaster.Umbraco.UrlTracker.UI.UrlTrackerManagerWrapper.ascx</control>
    </tab>
    

    Hope that helps

    Kind regards

    David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 12, 2018 @ 15:05
    Jan Skovgaard
    0

    Hi David

    Thanks for confirming this - So the casing should be insensitive in this regard :-)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft