Try our conversational search powered by Generative AI!

PageData.ACL not saving.

Vote:
 

 
Hi ,
 
Please help me with this.
 
I'm creating a new page, creating writableclone of it and then saving it. But the role doesn't apprear when I right click on that page accessrights at all.
 
I'm creating new role as well which when I debug I see it in the ACL list of the page.
 
  if (!slist.Exists(role => role == DealerName.ToLowerInvariant()))
                Roles.CreateRole(rolename);
 
var node = newDealerNode.CreateWritableClone();
           node.ACL.Add(
               new AccessControlEntry(node.PageName.ToLowerInvariant(), AccessLevel.Read | AccessLevel.Create | AccessLevel.Edit | AccessLevel.Publish | AccessLevel.Administer, SecurityEntityType.Role)
               );
 
 DataFactory.Instance.Save(node, SaveAction.Save);
           DataFactory.Instance.Save(node, SaveAction.Publish);
 
Hope to get some help.
 
Cheers,Kavya 
#29143
Apr 08, 2009 19:02
Vote:
 

Ok. I got this working. its

 

 PageAccessControlList acl = new PageAccessControlList(node.PageLink);
           acl.Add(new AccessControlEntry(
                     node.PageName.ToLowerInvariant(),
                     AccessLevel.Read | AccessLevel.Edit | AccessLevel.Create | AccessLevel.Delete,
                     SecurityEntityType.Role));
           acl.Save();

#29144
Apr 08, 2009 19:21
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.