Skip to content

Commit

Permalink
Bug Fix 8626 Export-DbaUser (dataplat#8641)
Browse files Browse the repository at this point in the history
switched to objectPermissions instead of databasePermissions, previous was resulting in missing value.

Co-authored-by: MrTCS <turnoff.seafood_05@icloud.com>
  • Loading branch information
potatoqualitee and MrTCS authored Nov 11, 2022
1 parent 8ecd33d commit 45b54cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/Export-DbaUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ function Export-DbaUser {
if ($Template) {
$grantee = "{templateUser}"
} else {
$grantee = $databasePermission.Grantee
$grantee = $objectPermission.Grantee
}

$outsql += "$grantObjectPermission $($objectPermission.PermissionType) ON $object TO [$grantee]$withGrant AS [$($objectPermission.Grantor)];"
Expand Down

0 comments on commit 45b54cb

Please sign in to comment.