Skip to content

Commit

Permalink
New-TssSecretPermission - replace parts call with command
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Aug 5, 2021
1 parent c86ab78 commit fae43be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/functions/secret-permissions/New-TssSecretPermission.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ function New-TssSecretPermission {
if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) {
. $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation
foreach ($secret in $SecretId) {
$secretInheritsPerm = (. $SearchSecrets $TssSession | Where-Object SecretId -EQ $secret).InheritsPermissions
$searchSecrets = Search-TssSecret $TssSession
$secretInheritsPerm = $searchSecrets.Where({ $_.SecretId -eq $secret}).InheritsPermissions
if (-not $secretInheritsPerm -or $tssNewParams.ContainsKey('Force')) {
$restResponse = $null
$uri = $TssSession.ApiUrl, 'secret-permissions' -join '/'
Expand Down

0 comments on commit fae43be

Please sign in to comment.