From 4e837312a61e04a91484c54ddee8cc6c44bab07b Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Thu, 18 Jan 2024 15:39:20 +0100 Subject: [PATCH] Fix sorting --- source/Classes/002.DatabasePermission.ps1 | 2 +- source/Classes/002.ServerPermission.ps1 | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/Classes/002.DatabasePermission.ps1 b/source/Classes/002.DatabasePermission.ps1 index d8163f453..8ff0906e1 100644 --- a/source/Classes/002.DatabasePermission.ps1 +++ b/source/Classes/002.DatabasePermission.ps1 @@ -261,7 +261,7 @@ class DatabasePermission : IComparable, System.IEquatable[Object] [System.String] ToString() { - $concatenatedPermission = $this.Permission -join ', ' + $concatenatedPermission = ($this.Permission | Sort-Object) -join ', ' return ('{0}: {1}' -f $this.State, $concatenatedPermission) } diff --git a/source/Classes/002.ServerPermission.ps1 b/source/Classes/002.ServerPermission.ps1 index 5f3e06c27..c4d439a7f 100644 --- a/source/Classes/002.ServerPermission.ps1 +++ b/source/Classes/002.ServerPermission.ps1 @@ -93,7 +93,6 @@ class ServerPermission : IComparable, System.IEquatable[Object] [System.String[]] $Permission - ServerPermission () { } @@ -199,7 +198,7 @@ class ServerPermission : IComparable, System.IEquatable[Object] [System.String] ToString() { - $concatenatedPermission = $this.Permission -join ', ' + $concatenatedPermission = ($this.Permission | Sort-Object) -join ', ' return ('{0}: {1}' -f $this.State, $concatenatedPermission) }