PowerShell / JEA

Just Enough Administration
http://aka.ms/JEAdocs
MIT License
257 stars 60 forks source link

Fix for BUG #11 #17

Closed anwather closed 7 years ago

anwather commented 7 years ago

This change is Reviewable

msftclas commented 7 years ago

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request. Thanks, Microsoft Pull Request Bot

anwather commented 7 years ago

Added logic to test if required groups is null. The line $data = $ast.Find( { $args[0] -is [System.Management.Automation.Language.HashtableAst] }, $false ) returns no object if RequiredGroups contains no values.

anwather commented 7 years ago

Agree with the elseif - was trying to avoid running the ConvertStringToHashtable ComplexObjectsEqual in this case.

anwather commented 7 years ago

@rpsqrd Please have a look at the changes added to fix the null condition