Skip to content

Commit

Permalink
[Validate-AzsdkCodeOwner] Missing permission display (#8524)
Browse files Browse the repository at this point in the history
* [Validate-AzsdkCodeOwner] Missing permission display

The focus of these changes is to fix a mistake when displaying required permissions that are missing.   The current implementation displays the permission held by the user rather than the required permission that is missing, causing it to be unclear what permission is needed.

* Update tools/github/scripts/Validate-AzsdkCodeOwner.ps1
  • Loading branch information
jsquire authored Jul 1, 2024
1 parent eaa42a7 commit 28d9005
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/github/scripts/Validate-AzsdkCodeOwner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@ if ($permission -eq "admin" -or $permission -eq "write") {
Write-Host "`t$([char]0x2713) $($permission) " -ForegroundColor Green
$hasPermissions = $true
} else {
Write-Host "`tx $($permission)" -ForegroundColor Red
Write-Host "`tx write" -ForegroundColor Red
}

# Write the other permissions for the user, if
# verbose output is enabled.
Write-Verbose ""
Write-Verbose "Other Permissions:"
Write-Verbose "`t$($permission) (not required)"

# Validate the user and write the results.
$isValid = ($hasOrgs -and $hasPermissions)

Expand Down

0 comments on commit 28d9005

Please sign in to comment.