Skip to content

Instantly share code, notes, and snippets.

@ArveSystad
Last active December 18, 2015 02:49
Show Gist options
  • Save ArveSystad/5713971 to your computer and use it in GitHub Desktop.
Save ArveSystad/5713971 to your computer and use it in GitHub Desktop.
protected void Application_Start(Object sender, EventArgs e)
{
DataFactory.Instance.PublishedPage += Publishing_Page;
}
private void Publishing_Page(object sender, PageEventArgs e)
{
PageData pageData = DataFactory.Instance.GetPage(e.PageLink);
pageData.ACL.Add(new AccessControlEntry("MyGroup", AccessLevel.FullAccess, SecurityEntityType.Role));
pageData.ACL.Save(SecuritySaveType.Replace);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment