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?
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
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
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?
I'm having the same problem. Have you found a solution?
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!
is working on a reply...