Last active
December 18, 2015 02:49
-
-
Save ArveSystad/5713963 to your computer and use it in GitHub Desktop.
Episerver
Will give YSOD when publishing pages: Cannot save ACL with no page link set. This could be due to a page provider not properly setting PageLink.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Application_Start(Object sender, EventArgs e) | |
{ | |
DataFactory.Instance.PublishedPage += Publishing_Page; | |
} | |
private void Publishing_Page(object sender, PageEventArgs e) | |
{ | |
e.Page.ACL.Add(new AccessControlEntry("MyGroup", AccessLevel.FullAccess, SecurityEntityType.Role)); | |
e.Page.ACL.Save(SecuritySaveType.Replace); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment