I'm trying to set public access node programmatically, but i can't find rigth method to do this.
I'm creating node (for example "organization"), for each organization node i create Member Group, and now I would like to set for this node public access only for this Member Group.
Only one example i saw using : umbraco.cms.businesslogic.web.Access.AddMemberGroupToDocument - but this method is obsolete,
if there any another umbraco method to set node public access?
set node public access programmatically
Hi all,
I'm trying to set public access node programmatically, but i can't find rigth method to do this.
I'm creating node (for example "organization"), for each organization node i create Member Group, and now I would like to set for this node public access only for this Member Group.
Only one example i saw using : umbraco.cms.businesslogic.web.Access.AddMemberGroupToDocument - but this method is obsolete,
if there any another umbraco method to set node public access?
Thanks all.
Try this:
Access.ProtectPage(false, nodeId, loginId, errorId);
Access.AddMembershipRoleToDocument(nodeId, memberGroupName);
Wow, great,
Its work,
Thank u!
is working on a reply...