Remove a role in ACL on CurrentPage

Vote:
 
if (!CurrentPage.ACL.Exists(roles.Items[i].Value)){ //This code work fin ac = new AccessControlEntry(roles.Items[i].Value, AccessLevel.Read, SecurityEntityType.Role); CurrentPage.ACL.Add(ac); CurrentPage.ACL.Save(); } But how can I remove a role from ACL on CurrentPage? //I have tryed this, but it did not work. if (CurrentPage.ACL.Exists(roles.Items[i].Value)) { CurrentPage.ACL.Remove(roles.Items[i].Value); CurrentPage.ACL.Save(); }
#15801
Mar 25, 2008 19:07
Vote:
 
Try this CurrentPage.ACL.Remove(roles.Items[i].Value); CurrentPage.ACL.Save(SecuritySaveType.Replace);
#16391
Mar 25, 2008 19:08
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.