Can you tell if member is currently on a protected page?
Hi
I am using umbraco 6.1.6.
Although I am using the umbraco members and member groups and standard role based protection I'd like to be able to tell in code (or xslt) if a user is currently on a protected page and what role it is protected by?
Can you tell if member is currently on a protected page?
Hi
I am using umbraco 6.1.6.
Although I am using the umbraco members and member groups and standard role based protection I'd like to be able to tell in code (or xslt) if a user is currently on a protected page and what role it is protected by?
Is this possible?
Thanks
Bex
using umbraco.cms.businesslogic.web;
using umbraco.NodeFactory ;
Tells you if the page is protected
Access.IsProtected(Node.GetCurrent().NodeId, Node.GetCurrent().Path)
Get the groups that have access.
var groups = Access.GetAccessingMembershipRoles(Node.GetCurrent().Id, Node.GetCurrent().Path);
is working on a reply...