Skip to content

Commit

Permalink
* syntax fix for compatibility with PS5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Sluzhivoy committed May 10, 2024
1 parent 4e80f64 commit ed0d8aa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions PSTableauREST/PSTableauREST.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -9251,11 +9251,14 @@ Param(
$response = Invoke-TableauRestMethod -Uri (Get-TableauRequestUri -Endpoint Setting -Param extensions) -Body $xml.OuterXml -Method Put -ContentType 'application/xml'
return $response.tsResponse.extensionsSiteSettings
}
} else {
} else { # legacy API
Assert-TableauRestVersion -AtLeast 3.11
if (-not $AllowSandboxed) {
$AllowSandboxed = 'true'; # override to true, this parameter is required in legacy API
}
$options = @{
extensions_enabled=$Enabled;
allow_sandboxed = $AllowSandboxed ? $AllowSandboxed : 'true'; # this parameter is required in legacy API
allow_sandboxed = $AllowSandboxed
}
if ($SafeListLegacyAPI) {
$options.safe_list_items = $SafeListLegacyAPI
Expand Down

0 comments on commit ed0d8aa

Please sign in to comment.