IDEMPIERE-5345 Login.getClients not validating role type (#1391)
* IDEMPIERE-5345 Login.getClients not validating role type * Add null validation for whereRoleType
This commit is contained in:
parent
73aecb1145
commit
9ed8c950f7
|
@ -1420,14 +1420,18 @@ public class Login
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sql= new StringBuilder("SELECT DISTINCT cli.AD_Client_ID, cli.Name, u.AD_User_ID, u.Name");
|
StringBuilder sql= new StringBuilder("SELECT DISTINCT cli.AD_Client_ID, cli.Name, u.AD_User_ID, u.Name")
|
||||||
sql.append(" FROM AD_User_Roles ur")
|
.append(" FROM AD_User_Roles ur")
|
||||||
|
.append(" INNER JOIN AD_Role r on (ur.AD_Role_ID=r.AD_Role_ID)")
|
||||||
.append(" INNER JOIN AD_User u on (ur.AD_User_ID=u.AD_User_ID)")
|
.append(" INNER JOIN AD_User u on (ur.AD_User_ID=u.AD_User_ID)")
|
||||||
.append(" INNER JOIN AD_Client cli on (ur.AD_Client_ID=cli.AD_Client_ID)")
|
.append(" INNER JOIN AD_Client cli on (ur.AD_Client_ID=cli.AD_Client_ID)")
|
||||||
.append(" WHERE ur.IsActive='Y'")
|
.append(" WHERE ur.IsActive='Y'")
|
||||||
.append(" AND u.IsActive='Y'")
|
.append(" AND u.IsActive='Y'")
|
||||||
.append(" AND cli.IsActive='Y'")
|
.append(" AND cli.IsActive='Y'");
|
||||||
.append(" AND ur.AD_User_ID=? ORDER BY cli.Name");
|
if (! Util.isEmpty(whereRoleType)) {
|
||||||
|
sql.append(" AND ").append(whereRoleType);
|
||||||
|
}
|
||||||
|
sql.append(" AND ur.AD_User_ID=? ORDER BY cli.Name");
|
||||||
PreparedStatement pstmt=null;
|
PreparedStatement pstmt=null;
|
||||||
ResultSet rs=null;
|
ResultSet rs=null;
|
||||||
try{
|
try{
|
||||||
|
|
Loading…
Reference in New Issue