Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to BreakRoleInheritance on subfolder #616

Open
MalfaitJasper opened this issue Apr 28, 2023 · 0 comments
Open

Not able to BreakRoleInheritance on subfolder #616

MalfaitJasper opened this issue Apr 28, 2023 · 0 comments
Labels
type:enhancement New feature or enhancement of existing capability type:question

Comments

@MalfaitJasper
Copy link

MalfaitJasper commented Apr 28, 2023

When trying to add specific security to folders withing a ListInstance using the BreakRoleInheritance tag, it works for parent folders, but it doesn't work for subfolders. Is this not supported using this pnp provisioning template.
Below code snippet of the full ListInstance.
<pnp:ListInstance Title="Custom ListInstance" Description="" DocumentTemplate="{site}/customlistinstance/Forms/template.dotx" OnQuickLaunch="true" TemplateType="101" Url="customlistinstance" EnableVersioning="true" MinorVersionLimit="0" MaxVersionLimit="500" DraftVersionVisibility="0" TemplateFeatureID="00bfea71-e717-4e80-aa17-d0c71b360101" EnableAttachments="false" ContentTypesEnabled="true" DefaultDisplayFormUrl="{site}/customlistinstance/Forms/DispForm.aspx" DefaultEditFormUrl="{site}/customlistinstance/Forms/EditForm.aspx" DefaultNewFormUrl="{site}/customlistinstance/Forms/Upload.aspx" ImageUrl="/_layouts/15/images/itdl.png?rev=47" IrmExpire="false" IrmReject="false" IsApplicationList="false" ValidationFormula="" ValidationMessage=""> <pnp:ContentTypeBindings> <pnp:ContentTypeBinding ContentTypeID="0x0101007258D4C98F8386419A2A5EB00895C140" Default="true" /> <pnp:ContentTypeBinding ContentTypeID="0x0101" /> <pnp:ContentTypeBinding ContentTypeID="0x0120" /> </pnp:ContentTypeBindings> <pnp:Views> <View Name="{95F91C24-3CDA-4F9A-8DDF-D0337E2A3171}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Documents" Url="{site}/customlistinstance/Forms/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=47"> <Query> <OrderBy> <FieldRef Name="FileLeafRef" /> </OrderBy> </Query> <ViewFields> <FieldRef Name="LinkFilename" /> <FieldRef Name="DocumentCategory" /> <FieldRef Name="StartDate" /> <FieldRef Name="_EndDate" /> <FieldRef Name="DocumentType" /> <FieldRef Name="DocumentStatus" /> <FieldRef Name="RecordType" /> <FieldRef Name="DocumentOrigin" /> <FieldRef Name="Author" /> <FieldRef Name="Created" /> <FieldRef Name="Editor" /> <FieldRef Name="Modified" /> </ViewFields> <RowLimit Paged="TRUE">30</RowLimit> <JSLink>clienttemplates.js</JSLink> </View> </pnp:Views> <pnp:FieldRefs> <pnp:FieldRef ID="fa564e0f-0c70-4ab9-b863-0177e6ddd247" Name="Title" DisplayName="Title" /> <pnp:FieldRef ID="810dbd02-bbf5-4c67-b1ce-5ad7c5a512b2" Name="_DCDateModified" DisplayName="Date Modified" /> <pnp:FieldRef ID="9f8b4ee0-84b7-42c6-a094-5cbde2115eb9" Name="_DCDateCreated" DisplayName="Date Created" /> <pnp:FieldRef ID="64cd368d-2f95-4bfc-a1f9-8d4324ecb007" Name="StartDate0" DisplayName="Start Date" /> <pnp:FieldRef ID="246d0907-637c-46b7-9aa0-0bb914daa832" Name="_Author" DisplayName="Author" /> <pnp:FieldRef ID="8a121252-85a9-443d-8217-a1b57020fadf" Name="_EndDate" DisplayName="End Date" /> <pnp:FieldRef ID="551cbaa1-16f4-4042-86cb-fcfb1fab822e" Name="DocumentCategory" DisplayName="Document Category" /> <pnp:FieldRef ID="13487eb4-b5d2-402c-95a6-7dcf5715142a" Name="DocumentType" DisplayName="Document Type" /> <pnp:FieldRef ID="a6d5a1ec-60fa-4585-b6cd-30252e80554d" Name="RecordType" DisplayName="Record Type" /> <pnp:FieldRef ID="8cad58fe-956b-4132-a574-025389b57503" Name="DocumentStatus" DisplayName="Document Status" /> <pnp:FieldRef ID="ee6fb4cc-3243-4717-b694-69a5779f27a0" Name="DocumentOrigin" DisplayName="Document Origin" /> </pnp:FieldRefs> <pnp:Folders> <pnp:Folder Name="Dossier"> <pnp:Folder Name="Corporate"> <pnp:Security> <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="true"> <pnp:RoleAssignment Principal="{groupsitetitle} - Contributors" RoleDefinition="{roledefinition:Reader}"/> </pnp:BreakRoleInheritance> </pnp:Security> </pnp:Folder> <pnp:Folder Name="Financial"> <pnp:Security> <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="true"> <pnp:RoleAssignment Principal="{groupsitetitle} - Contributors" RoleDefinition="{roledefinition:Reader}"/> </pnp:BreakRoleInheritance> </pnp:Security> </pnp:Folder> <pnp:Folder Name="Restricted"> <pnp:Security> <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="true"> <pnp:RoleAssignment Principal="{groupsitetitle} - Contributors" RoleDefinition="{roledefinition:Reader}"/> </pnp:BreakRoleInheritance> </pnp:Security> </pnp:Folder> <pnp:Folder Name="Legal"> <pnp:Security> <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="true"> <pnp:RoleAssignment Principal="{groupsitetitle} - Contributors" RoleDefinition="{roledefinition:Reader}"/> </pnp:BreakRoleInheritance> </pnp:Security> </pnp:Folder> <pnp:Folder Name="Open Access"> <pnp:Security> <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="true"> <pnp:RoleAssignment Principal="{groupsitetitle} - Contributors" RoleDefinition="{roledefinition:Reader}"/> </pnp:BreakRoleInheritance> </pnp:Security> </pnp:Folder> <pnp:Security> <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="true"> <pnp:RoleAssignment Principal="{groupsitetitle} - Contributors" RoleDefinition="Custom Contribute"/> </pnp:BreakRoleInheritance> </pnp:Security> </pnp:Folder> </pnp:Folders> <pnp:Security> <pnp:BreakRoleInheritance CopyRoleAssignments="false" ClearSubscopes="true"> <pnp:RoleAssignment Principal="{groupsitetitle} - Contributors" RoleDefinition="Custom Contribute"/> </pnp:BreakRoleInheritance> </pnp:Security> </pnp:ListInstance>

@PaoloPia PaoloPia added type:enhancement New feature or enhancement of existing capability type:question labels Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or enhancement of existing capability type:question
Projects
None yet
Development

No branches or pull requests

2 participants