Skip to content

Commit

Permalink
Merge branch 'dev' into fix/4203-allow-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamdsheth authored Nov 16, 2024
2 parents 144c5fd + 67e8c1d commit 2c1b233
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `-AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled` to `Set-PnPTenant` which allows for updating of web property bag when DenyAddAndCustomizePages is enabled [#4508](https://github.com/pnp/powershell/pull/4508)
- Added `SiteId` to the output of `Get-PnPTenantSite` [#4527](https://github.com/pnp/powershell/pull/4527)
- Added `Add-PnPFileSensitivityLabel` which allows for assigning sensitivity labels to SharePoint files [#4538](https://github.com/pnp/powershell/pull/4538)
- `Add-PnPApp` , `Publish-PnPApp` , `Remove-PnPApp` and `Unpublish-PnPApp` now have `-Force` parameter to change the site to allow scripts to be temporarily enabled.
- `Add-PnPApp` , `Publish-PnPApp` , `Remove-PnPApp` and `Unpublish-PnPApp` now have `-Force` parameter to change the site to allow scripts to be temporarily enabled. [#4554](https://github.com/pnp/powershell/pull/4554)
- Added `-CanSyncHubSitePermissions` parameter to `Set-PnPSite` cmdlet to set value of allowing syncing hub site permissions to this associated site. [#4555](https://github.com/pnp/powershell/pull/4555)

### Changed

Expand Down
15 changes: 15 additions & 0 deletions documentation/Set-PnPSite.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Set-PnPSite [-Identity <String>]
[-ExcludedBlockDownloadGroupIds <Guid[]>]
[-ListsShowHeaderAndNavigation <Boolean>]
[-RestrictContentOrgWideSearch <Boolean>]
[-CanSyncHubSitePermissions <SwitchParameter>]
[-Connection <PnPConnection>]
```

Expand Down Expand Up @@ -629,6 +630,20 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -CanSyncHubSitePermissions
Sets value if syncing hub site permissions to this associated site is allowed.
```yaml
Type: Switch Parameter
Parameter Sets: Set Properties

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Wait
Wait for the operation to complete
Expand Down
11 changes: 10 additions & 1 deletion src/Commands/Site/SetSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ public class SetSite : PnPSharePointCmdlet
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_PROPERTIES)]
public bool? HidePeoplePreviewingFiles;

[Parameter(Mandatory = false, ParameterSetName = ParameterSet_PROPERTIES)]
public SwitchParameter? CanSyncHubSitePermissions;

[Parameter(Mandatory = false, ParameterSetName = ParameterSet_LOCKSTATE)]
public SwitchParameter Wait;

Expand Down Expand Up @@ -188,6 +191,12 @@ protected override void ExecuteCmdlet()
}
}

if (ParameterSpecified(nameof(CanSyncHubSitePermissions)) && CanSyncHubSitePermissions.HasValue)
{
site.CanSyncHubSitePermissions = CanSyncHubSitePermissions.Value;
context.ExecuteQueryRetry();
}

if (ParameterSpecified(nameof(LogoFilePath)))
{
if (!System.IO.Path.IsPathRooted(LogoFilePath))
Expand Down Expand Up @@ -422,7 +431,7 @@ protected override void ExecuteCmdlet()
{
siteProperties.HidePeoplePreviewingFiles = HidePeoplePreviewingFiles.Value;
executeQueryRequired = true;
}
}

if (executeQueryRequired)
{
Expand Down

0 comments on commit 2c1b233

Please sign in to comment.