Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ 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)
- Added `-CanSyncHubSitePermissions` parameter to `Set-PnPSite` cmdlet to set value of allowing syncing hub site permissions to this associated site.

### 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
Loading