Skip to content

Commit

Permalink
Fix multi group sharing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tharikaGitHub committed Jun 24, 2024
1 parent c0ce919 commit b450905
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6252,13 +6252,13 @@ public Application getApplicationByName(String applicationName, String userId, S
+ "APP.NAME = ? AND SUB.SUBSCRIBER_ID = APP.SUBSCRIBER_ID";

String whereClauseWithMultiGroupId = " WHERE ((APP.APPLICATION_ID IN (SELECT APPLICATION_ID FROM " +
"AM_APPLICATION_GROUP_MAPPING WHERE GROUP_ID IN ($params) AND TENANT = ?)) OR SUB.USER_ID = ? " +
"AM_APPLICATION_GROUP_MAPPING WHERE GROUP_ID IN ($params) AND TENANT = ?)) AND SUB.USER_ID = ? " +
"OR (APP.APPLICATION_ID IN (SELECT APPLICATION_ID FROM AM_APPLICATION WHERE GROUP_ID = ?))) " +
"AND APP.NAME = ? AND SUB.SUBSCRIBER_ID = APP.SUBSCRIBER_ID";
String whereClauseWithMultiGroupIdCaseInSensitive =
" WHERE ((APP.APPLICATION_ID IN (SELECT APPLICATION_ID FROM "
+ "AM_APPLICATION_GROUP_MAPPING WHERE GROUP_ID IN ($params) AND TENANT = ?)) "
+ "OR LOWER(SUB.USER_ID) = LOWER(?) "
+ "AND LOWER(SUB.USER_ID) = LOWER(?) "
+ "OR (APP.APPLICATION_ID IN (SELECT APPLICATION_ID FROM AM_APPLICATION WHERE GROUP_ID = " +
"?))) "
+ "AND APP.NAME = ? AND SUB.SUBSCRIBER_ID = APP.SUBSCRIBER_ID";
Expand Down

0 comments on commit b450905

Please sign in to comment.