Copied to clipboard

Flag this post as spam?

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


  • Juan Fausd 4 posts 96 karma points
    Dec 12, 2017 @ 14:52
    Juan Fausd
    0

    Edit user groups in Umbraco 7.7

    Hi there

    Thanks in advance for your help. I created a package for Umbraco 7.7 which adds a new section to the left side bar in the backend. For some reason, it doesn't get displayed (even though I login as admininistrator).

    In previous Umbraco versions I was able to edit groups and add the section, but in this one I can't find a way to do that. Is there any way to edit groups? Please help!

    Regards

  • Kevin Jump 2317 posts 14726 karma points MVP 7x c-trib
    Dec 12, 2017 @ 15:07
    Kevin Jump
    0

    Hi

    yes it's changed a bit in Umbraco 7.7 - sections are no longer associated with the user but rather the group.

    for Umbraco 7.7 i have the following function to add a section to the default (Administrators) group:

    private void AddSectionSevenSeven(string alias)
        {
            var adminGroup = _userService.GetUserGroupByAlias("admin");
            if (adminGroup != null)
            {
                if (!adminGroup.AllowedSections.Contains(alias))
                {
                    adminGroup.AddAllowedSection(alias);
                    _userService.Save(adminGroup);
                }
            }
        }
    
  • Juan Fausd 4 posts 96 karma points
    Dec 12, 2017 @ 15:32
    Juan Fausd
    0

    Thanks Kevin! I'll test that!

  • Juan Fausd 4 posts 96 karma points
    Dec 12, 2017 @ 15:38
    Juan Fausd
    102

    Finally I think I got to the solution of my problem. It was easier than I expected. Basically, there is a Groups icon at the top that gets you into the Groups Management page. I got into that page and then I was able to edit the sections allowed for each User Group.

    enter image description here

    Thanks for your help!

Please Sign in or register to post replies

Write your reply to:

Draft