Fixed broken SQL statement in ThdlUserRepository to select a single user role per user/application
This commit is contained in:
parent
3d20b50e42
commit
050ac0134c
1 changed files with 4 additions and 5 deletions
|
@ -118,12 +118,11 @@ public class ThdlUserRepository
|
||||||
{
|
{
|
||||||
ThdlUser thdlUser = validate( user );
|
ThdlUser thdlUser = validate( user );
|
||||||
|
|
||||||
String sql = "SELECT UserRolesForApplication.roles "
|
String sql = "SELECT urfa.roles "
|
||||||
+ "FROM UserRolesForApplication, Applications "
|
+ "FROM UserRolesForApplication AS urfa, Applications AS apps "
|
||||||
+ "LEFT JOIN UserRolesForApplication AS urfa ON urfa.applicationId = Applications.id "
|
+ "WHERE urfa.applicationId = apps.id "
|
||||||
+ "WHERE Applications.application = '" + application + "'"
|
+ "AND apps.application = '" + application + "' "
|
||||||
+ "AND urfa.userId = " + thdlUser.getId() + " ";
|
+ "AND urfa.userId = " + thdlUser.getId() + " ";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Statement stmt = getConnection().createStatement();
|
Statement stmt = getConnection().createStatement();
|
||||||
|
|
Loading…
Reference in a new issue