diff --git a/documentation/Set-PnPTenantSite.md b/documentation/Set-PnPTenantSite.md index d819a825a..19d7c52cd 100644 --- a/documentation/Set-PnPTenantSite.md +++ b/documentation/Set-PnPTenantSite.md @@ -43,6 +43,7 @@ Set-PnPTenantSite [-Identity] [-Title ] [-LocaleId ] [- [-RequestFilesLinkExpirationInDays ] [-RequestFilesLinkEnabled ] [-OverrideSharingCapability ] [-RestrictedAccessControl ] [-ClearRestrictedAccessControl ] [-RestrictedAccessControlGroups ] [-AddRestrictedAccessControlGroups ] [-RemoveRestrictedAccessControlGroups ][-InheritVersionPolicyFromTenant ] + [-AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled ] [-Wait] [-Connection ] ``` @@ -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 diff --git a/src/Commands/Admin/SetTenantSite.cs b/src/Commands/Admin/SetTenantSite.cs index 3cb89c009..e7c2852bb 100644 --- a/src/Commands/Admin/SetTenantSite.cs +++ b/src/Commands/Admin/SetTenantSite.cs @@ -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; @@ -668,6 +671,12 @@ private void SetSiteProperties(Func timeoutFunctio updateRequired = true; } + if (ParameterSpecified(nameof(AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled))) + { + props.AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled = AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled; + updateRequired = true; + } + if (updateRequired) { var op = props.Update(); diff --git a/src/Commands/Model/SPOSite.cs b/src/Commands/Model/SPOSite.cs index 5a5f703a6..830c2bdc0 100644 --- a/src/Commands/Model/SPOSite.cs +++ b/src/Commands/Model/SPOSite.cs @@ -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 @@ -200,6 +201,7 @@ public SPOSite(SiteProperties props, bool? disableSharingForNonOwnersStatus) ReadOnlyForUnmanagedDevices = props.ReadOnlyForUnmanagedDevices; OverrideSharingCapability = props.OverrideSharingCapability; OverrideBlockUserInfoVisibility = props.OverrideBlockUserInfoVisibility; + AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled = props.AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled; } } } \ No newline at end of file