pnp / pnp/pnpframework

Invoke-PnPSiteTemplate: <pnp:Security> Not Applied to Existing Page

Open
#427 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: powershell 🐱‍👤
Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

Reporting an Issue or Missing Feature

Invoke-PnPSiteTemplate: <pnp:Security> Not Applied to existing ClientSidePage

Expected behavior

<pnp:Security> would be applied to an existing ClientSidePage

Actual behavior

<pnp:Security> definition is not applied, trace log indicates skipped because overwrite flag not set

Steps to reproduce behavior
  1. SharePoint site with existing Site Pages, PnP Template required to deliver Security changes only, leaving page content untouched i.e. "delta" template scenario.
  2. Xml Site Template containing a <pnp:ClientSidePage> element referring to an existing page. Attribute Overwrite not specified as page content required to be retained (If Overwrite is set to True page content will be lost).
  3. Add a <pnp:Security> element within the above <pnp:ClientSidePage> but NO OTHER page elements
  4. Run Invoke-PnPSiteTemplate using this template
What is the version of the Cmdlet module you are running?

1.6.0 and also 1.6.49-nightly

Which operating system/environment are you running PnP PowerShell on?
  • Windows 10
  • PowerShell Core 7.1.3
Workaround

None

PnP Trace Log

pwsh Warning: 0 : 2021-07-26 13:26:01.3782 [ClientSidePages] [12] [Information] Page with name ClientHome.aspx did already exist and the overwrite flag was not set, so nothing happened

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Invoke-PnPSiteTemplate and the ClientSidePage provisioning path, using the trace entry showing that an existing page is skipped when Overwrite is unset. Done means a template containing only ClientSidePage and Security applies the security definition to an existing page without replacing its content.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cloud, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.