Closed IMJLA closed 10 months ago
bug resolved in 0.0.176 which incorporates v0.0.63 of the Permission module
workaround implemented was to send a dummy object down the pipeline
closing bug, but adding new issue as enhancement to dig deeper into this behavior and implement a better solution
# Bugfix #48 https://github.com/IMJLA/Export-Permission/issues/48
# Sending a dummy object down the line to avoid errors
# TODO: More elegant solution needed. Downstream code should be able to handle null input.
# TODO: Why does this suppress errors, but the object never appears in the tables?
if ($null -eq $FilteredAccounts) {
$FilteredAccounts = [pscustomobject]@{
'Name' = 'NoAccountsMatchingCriteria'
'Group' = [pscustomobject]@{
'IdentityReference' = '.'
'Access' = '.'
'Name' = '.'
'Department' = '.'
'Title' = '.'
}
}
}
Expected Behavior
No errors, just a report with no identities listed due to filtering
Current Behavior
Steps to Reproduce (for bugs)