volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Setting page access rights programmatically

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

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

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

#54056
Sep 29, 2011 16:22

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

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