Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Dec 13, 2012 @ 18:03
    Bex
    0

    Programatically Adding user permissions. Inheritance..?

    Hi All

    I am struggling to programatically create and add backend user permissions!

    I have a content structure similar to the below

    Home
    ---Explore
    -------Explore Areas
    ------------Areas
    ----------------Area 1
    -------------------Area1 Highlight1 
    -------------------Area1 Highlight2
    ----------------Area 2
    ----------------Area 3
    ----------------etc....
    
    
    

    I am adding the permissions programatically as they are based on a property of the areas node.
    Each user automatically gets view permissions to "Home", "Explore", "Explore Areas" and "Areas", but depending what options are selected in my custom admin they will have certain control over certain areas and all highlights under them.

    I have managed to assign the correct permissions to all nodes down to each area, but I need the area permission to be inheritted by the highlights nodes because the user needs to automatically have rights on them too.

    I am using  

     Permission.UpdateCruds(u, new CMSNode(nodeId), "FCA");

    but when I log in as my new user I can only see the area node but not all the highlights nodes under it.
    I can't assign permissions to each highlight node that exists when I create the user as I need it to be dynamic as the main admin may also create highlights later on and this new user needs to be able to have control over them as well.

    I hope this makes sense to someone and someone can give any advice?

     

  • Dan White 206 posts 510 karma points c-trib
    Feb 23, 2013 @ 03:22
    Dan White
    0

    I'm having the same problem. Have you found a solution?

  • Bex 444 posts 555 karma points
    Feb 24, 2016 @ 11:40
    Bex
    0

    I worked around this way back when, but now back on the same site and trying to do the same thing but in a different place.

    @Dan did you work out inheritance?

    This is a old Umbraco 4.9 site!

Please Sign in or register to post replies

Write your reply to:

Draft