Copied to clipboard

Flag this post as spam?

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


  • Xavi Ruiz 1 post 71 karma points
    Oct 05, 2017 @ 13:14
    Xavi Ruiz
    0

    Granular permissions

    Hi, I use new Umbraco 7.7.2 and I have a problem with Granular permissions in Umbraco grups. I have a group created in Umbraco that has permissions in a node to create new children ( and update ) , Users in group can create the children in this node but after can not edit the new node created.

    Is it an error of the new version that does not inherit the permissions of the parent node?

    I have thought about overwriting the ContentService_Saving method of IApplicationEventHandler and thus be able to assign permissions to the node

    But I do not know if it's the right way to do it or I'm doing something wrong

     private void ContentService_Saving(IContentService contentService, Umbraco.Core.Events.SaveEventArgs<IContent> eventArgs)
        {
            List<int> grups = new List<int>();
            grups.Add(6);
            foreach (var contentItem in eventArgs.SavedEntities)
            {
                ApplicationContext.Current.Services.ContentService.AssignContentPermission(contentItem, 'B;U', grups);
            }
        }
    

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft