Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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 protectedAccess.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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...