yes of course its up to the content editors to set role-based protection.
But my code needs to determine the roles protecting a given node at run-time.
Hope that's clear!
ps. from memory I think I got round the issue using a combination of: Umbraco.MemberIsLoggedOn, Members.GetCurrentMember, Umbraco.IsProtected, Umbraco.MemberHasAccess
IsProtectedByMembershipRole for v7 ?
Hi all
I'm trying to find out which member groups/roles are used to protect a protected content node.
I know there used to be a method "IsProtectedByMembershipRole" which took the role as a string.
But the v7 reference doco at https://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/
doesn't seem to have anything like it anymore.
Anyone know if such a method exists in v7 or if there is another way to find out which roles protect a given content node?
Many thanks in adv!
Ian
Correct me if I'm wrong but isn't that up to you to set on the node properties?
i.e. Do Something Else > Public Access > Role Based Protection
Hi Jo
yes of course its up to the content editors to set role-based protection.
But my code needs to determine the roles protecting a given node at run-time.
Hope that's clear!
ps. from memory I think I got round the issue using a combination of:
Umbraco.MemberIsLoggedOn
,Members.GetCurrentMember
,Umbraco.IsProtected
,Umbraco.MemberHasAccess
is working on a reply...