How to get nodes a member has access to, programatically
Hi,
I have a usercontrol in a 4.7.1 site. I have a starting node id and a currently-logged-in member. I want to return all of the child nodes of the starting node to which the member has access permissions.
Could anyone suggest how this can be done, as I can't find this type of thing in the documentation?
I don't know if this is the best way but here's how I solved this, for the record:
List permittedParentNodeIds = new List();
foreach (Node childNode in node.Children)
{
var child = childNode;
if (umbraco.library.HasAccess(child.Id, child.Path) == true)
{
permittedParentNodeIds.Add(child.Id.ToString());
}
}
How to get nodes a member has access to, programatically
Hi,
I have a usercontrol in a 4.7.1 site. I have a starting node id and a currently-logged-in member. I want to return all of the child nodes of the starting node to which the member has access permissions.
Could anyone suggest how this can be done, as I can't find this type of thing in the documentation?
Thanks!
I don't know if this is the best way but here's how I solved this, for the record:
is working on a reply...