Skip to content

Commit 9e437f4

Browse files
authored
Merge pull request dataplat#2730 from sqlcollaborative/revert-2706-fix-2525
Revert "Export permissions for ENDPOINTs"
2 parents 37f5ac9 + c3dc6fe commit 9e437f4

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

functions/Export-DbaLogin.ps1

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -313,29 +313,6 @@ function Export-DbaLogin {
313313
$credentialName = $credential.Name
314314
$outsql += "PRINT '$userName is associated with the $credentialName credential'"
315315
}
316-
317-
# Endpoint permissions
318-
foreach ($endpoint in $server.endpoints) {
319-
$perms = $endpoint.EnumObjectPermissions($userName)
320-
321-
foreach ($perm in $perms) {
322-
$permState = $perm.permissionstate
323-
$permType = $perm.PermissionType
324-
$grantor = $perm.grantor
325-
326-
if ($permState -eq "GrantWithGrant") {
327-
$grantWithGrant = "WITH GRANT OPTION"
328-
$permState = "GRANT"
329-
}
330-
else {
331-
$grantWithGrant = $null
332-
}
333-
334-
$outsql += "$permState $permType ON ENDPOINT::[$($endpoint.Name)] TO [$userName] $grantWithGrant AS [$grantor]"
335-
}
336-
337-
338-
}
339316
}
340317

341318
if ($NoDatabases -eq $false) {

0 commit comments

Comments
 (0)