Try our conversational search powered by Generative AI!

Setting page access rights programmatically



I'm looking for a way to set the access rights for a page programmatically. More specific, I want to set which groups can access the page from my code. So e.g. when an editor creates a new page she should be able to choose from available groups in a drop down list (page property) and apply that to the page she is creating/updating. Is there someone who can give me a hint on how to accomplish this? I've been testing out a few things so far but I haven't yet fully succeeded.


Sep 29, 2011 16:00

And almost directly after I had published this post I realized what I had forgot and got it to work! So now I can update the group access rights...

Sep 29, 2011 16:10

What was the step you forgot? Maybe others have the same problem as you did.

Sep 29, 2011 16:22

Yes, you are right. I simply missed calling Save() on the page ACL after I had modified it.

Sep 29, 2011 16:27
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.