If you need a data type attached to a specific page, as an option, of course, you can (I honestly guess):
This approach is used in the Blog package where Blog posts are stored in one global data type (although defined via the C1 Console not programmatically), manually attached to a specific page, filtered by this page's ID
- Create the IAllowedRoles as another global data type that will also have one field as a reference to C1 Page.
- Auto-attach it to each page with a Tree Definition:
<ElementStructure.AutoAttachments>
<DataType Type="Composite.Data.Types.IPage" Position="Top" />
</ElementStructure.AutoAttachments>
Please see How to Auto-Attach Applications- Filter its data elements by specific page using ParentIdFilter in the Tree Def:
<Filters>
<ParentIdFilter ParentType="Composite.Data.Types.IPage" ReferenceFieldName="PageId" />
</Filters>
Please see How to Filter Data Elements by Parent IDThis approach is used in the Blog package where Blog posts are stored in one global data type (although defined via the C1 Console not programmatically), manually attached to a specific page, filtered by this page's ID