Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to pass empty values to Set-PnPTenantCdnPolicy #3937

Merged
merged 2 commits into from
May 23, 2024

Conversation

jackpoz
Copy link
Contributor

@jackpoz jackpoz commented May 5, 2024

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #3935

What is in this Pull Request ?

Change Set-PnPTenantCdnPolicy to allow PolicyValue parameter to be an empty string or $null, while still being mandatory. Users will still need to specify -PolicyValue parameter.
This is the same behavior as when calling Tenant.SetTenantCdnPolicy(..) in CSOM.

Example with IncludeFileExtensions:
image
image

Example with ExcludeRestrictedSiteClassifications:
image

Example with ExcludeIfNoScriptDisabled:
image

$null is replaced with an empty string to avoid a runtime exception. This was the error happening without the replacement:
null error

jackpoz and others added 2 commits May 5, 2024 22:21
Change Set-PnPTenantCdnPolicy to allow PolicyValue to be an empty string or $null, while still being mandatory.
@gautamdsheth gautamdsheth merged commit 99dd39b into pnp:dev May 23, 2024
2 checks passed
@gautamdsheth
Copy link
Collaborator

Thanks @jackpoz , awesome stuff , merged it !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Set-PnPTenantCdnPolicy doesn't accept null policy values
2 participants