Skip to content

Commit

Permalink
adding sorting for principal group membership command
Browse files Browse the repository at this point in the history
  • Loading branch information
santisq committed Sep 3, 2024
1 parent 3aa3503 commit 5cdffc8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ protected override void ProcessRecord()
using PrincipalSearchResult<Principal> search = principal.GetGroups();
foreach (Principal parent in search.GetSortedEnumerable(_comparer))
{
if (ShouldExclude(parent, _exclusionPatterns))
{
continue;
}

GroupPrincipal groupPrincipal = (GroupPrincipal)parent;
TreeGroup treeGroup = new(source, null, groupPrincipal, 1);
Push(groupPrincipal, treeGroup);
Expand Down

0 comments on commit 5cdffc8

Please sign in to comment.