Disable inheritance of rights on page

Vote:
 

I am trying to set the ACL on a specific page object. I'm working with

 AccessControlList myAcl = currentPage.ACL.CreateWritableClone();

and  myAcl.Save(SecuritySaveType.Replace);

Setting the rights seems to work, however if i have 'inherit rights from parent' enabled on the page, it refuses to change the ACL.

What am i doing wrong?

#142539
Dec 14, 2015 11:10
Vote:
 

Hi,

Did you changed IsInherited flag?

AccessControlList myAcl = currentPage.ACL.CreateWritableClone();
myAcl.IsInherited = false;
#142542
Dec 14, 2015 11:53
Vote:
 

I tried that as well, but when i save the ACL changes it gives an error:

'Unable to load content with id epi.cms.contentdata:///50155'

I saw some other examples as well with use the PageAccessControlList instead of de AccessControlList  and setting the contentlink, but can't get it to work yet.

#142546
Dec 14, 2015 14:00
Vote:
 

Got the solution, when i disable the 'isinherited' i have to add the previous ACL entries again. 

#142596
Dec 15, 2015 15:29