I'm trying to work out how i'd retrieve a list of node protected node ids.. I need to filter Umbraco Examine's results so once it has completed it's search then find out if a member is logged in and if they are then that's fine and all nodes from the search can be displayed.. but if they're not logged in i need to remove the nodes by ID that are protected..
1. use getUser and then use Access.HasAccces(n.Id, m.UniqueId); If node is protected
2. Get the member groups.. then i was thinking of trying to find a way to get all nodes available to that group display them using some linq or something but am not sure how to get a list of nodes belonging to a specific group programatically..
Get Nodes For a Member
Hi Guys,
I'm trying to work out how i'd retrieve a list of node protected node ids.. I need to filter Umbraco Examine's results so once it has completed it's search then find out if a member is logged in and if they are then that's fine and all nodes from the search can be displayed.. but if they're not logged in i need to remove the nodes by ID that are protected..
Cheers,
Tom
Can't you just use the umbraco.library.IsLoggedOn()/IsProtected() method for each node you're iterating in xslt (or even from your c# code)?
Cheers,
/Dirk
Actually I'd suggest that you use the ASP.NET Membership Provider stuff to work it out. It should provide you with what you need - http://our.umbraco.org/wiki/how-tos/membership-providers
Hi Slace,
At looking at it I could think of 2 approaches..
1. use getUser and then use Access.HasAccces(n.Id, m.UniqueId); If node is protected
2. Get the member groups.. then i was thinking of trying to find a way to get all nodes available to that group display them using some linq or something but am not sure how to get a list of nodes belonging to a specific group programatically..
will keep looking
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.