Skip to content

Commit

Permalink
Fix column privilege ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasHafner committed Mar 16, 2024
1 parent ea1e8a2 commit 839456a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public static ResultSet buildFromColumnPrivileges( List<Column> columns, String

private static List<GenericMetaContainer> createDummyColumnPrivileges( Column colum, String userName ) {
// This method is used to create a dummy full rights result set for a column because the requested information does not exist on the server side.
List<String> accessRights = Arrays.asList( "SELECT", "INSERT", "UPDATE", "REFERENCE" );
List<String> accessRights = Arrays.asList( "INSERT", "REFERENCE", "SELECT", "UPDATE" );
return accessRights.stream().map( a -> new GenericMetaContainer(
colum.getDatabaseName(),
colum.getNamespaceName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class MetaResultSetComparators {
.thenComparing( ( GenericMetaContainer g ) -> (String) (g.getValue( 2 )) )
.thenComparing( ( GenericMetaContainer g ) -> (String) (g.getValue( 5 )) );
public static final Comparator<GenericMetaContainer> COLUMN_PRIVILEGE_COMPARATOR = Comparator
.comparing( ( GenericMetaContainer g ) -> (String) (g.getValue( 3 )) )
.thenComparing( ( GenericMetaContainer g ) -> (String) (g.getValue( 5 )) );
.comparing( ( GenericMetaContainer g ) -> (String) (g.getValue( 6 )) )
.thenComparing( ( GenericMetaContainer g ) -> (String) (g.getValue( 3 )) );

}

0 comments on commit 839456a

Please sign in to comment.