London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Setting page access rights programmatically

Vote:
 

Hi,

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.

Cheers,

#54054
Sep 29, 2011 16:00
Vote:
 

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...

#54055
Sep 29, 2011 16:10
Vote:
 

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

#54056
Sep 29, 2011 16:22
Vote:
 

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

#54057
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.