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
14 changes: 14 additions & 0 deletions documentation/Set-PnPTenantSite.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Set-PnPTenantSite [-Identity] <String> [-Title <String>] [-LocaleId <UInt32>] [-
[-RequestFilesLinkExpirationInDays <Int32>] [-RequestFilesLinkEnabled <Boolean>] [-OverrideSharingCapability <Boolean>]
[-RestrictedAccessControl <Boolean>] [-ClearRestrictedAccessControl <SwitchParameter>] [-RestrictedAccessControlGroups <Guid[]>]
[-AddRestrictedAccessControlGroups <Guid[]>] [-RemoveRestrictedAccessControlGroups <Guid[]>][-InheritVersionPolicyFromTenant <SwitchParameter>]
[-AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled <Boolean>]
[-Wait]
[-Connection <PnPConnection>]
```
Expand Down Expand Up @@ -986,6 +987,19 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled
Enables or disables adding and updating web property bag values when the DenyAddAndCustomizePages is enabled.

```yaml
Type: Boolean
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
9 changes: 9 additions & 0 deletions src/Commands/Admin/SetTenantSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ public class SetTenantSite : PnPSharePointOnlineAdminCmdlet
[Parameter(Mandatory = false, ParameterSetName = ParameterSet_PROPERTIES)]
public bool RequestFilesLinkEnabled;

[Parameter(Mandatory = false, ParameterSetName = ParameterSet_PROPERTIES)]
public bool AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled;

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

Expand Down Expand Up @@ -668,6 +671,12 @@ private void SetSiteProperties(Func<TenantOperationMessage, bool> timeoutFunctio
updateRequired = true;
}

if (ParameterSpecified(nameof(AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled)))
{
props.AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled = AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled;
updateRequired = true;
}

if (updateRequired)
{
var op = props.Update();
Expand Down
2 changes: 2 additions & 0 deletions src/Commands/Model/SPOSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public class SPOSite
public bool ReadOnlyForUnmanagedDevices { get; set; }
public SiteUserInfoVisibilityPolicyValue OverrideBlockUserInfoVisibility { get; set; }
public bool OverrideSharingCapability { get; set; }
public bool AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled { get; set; }

#endregion

Expand Down Expand Up @@ -200,6 +201,7 @@ public SPOSite(SiteProperties props, bool? disableSharingForNonOwnersStatus)
ReadOnlyForUnmanagedDevices = props.ReadOnlyForUnmanagedDevices;
OverrideSharingCapability = props.OverrideSharingCapability;
OverrideBlockUserInfoVisibility = props.OverrideBlockUserInfoVisibility;
AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled = props.AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled;
}
}
}
Loading