I have a custom page type which needs to be created with the following default security settings (as they would appear in the CMS:
Who can view this page?
Only these people(choose from list)
Administrators, Content Authors
In the Datamodel this would involve CanViewType = OnlyTheseUsers in SiteTree - and two rows in SiteTree_ViewerGroups where SiteTreeID = ID and GroupID = 1 & 2 respectively.
Is there a way of doing this via the framework or should I directly manipulate the database using OnBeforeWrite?