Commit dcbaa4aa authored by msalla's avatar msalla

User profile validation of profile id to be from profile master

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@200632 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c026c374
......@@ -217,15 +217,18 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
String profileSql = " select count(1) " +
" from profile " +
" where PROFILE_ID = '" + profileId + "' " ;
" where PROFILE_ID =?" ;
int profileCount = 0;
System.out.println("ProfileSql :: " + profileSql);
PreparedStatement pProfileStmt = null;
ResultSet profileRs = null;
pProfileStmt = conn.prepareStatement(profileSql);
pProfileStmt.setString(1, profileId);
profileRs = pProfileStmt.executeQuery();
......@@ -1551,7 +1554,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
// " from user_rights " +
// " where profile_id = '" + profileId + "' " ;
String profileSql = " select count(1) " +
/*String profileSql = " select count(1) " +
" from gencodes " +
" where fld_name = 'PROFILE_ID' and fld_value = '" + profileId + "' " ;
......@@ -1562,7 +1565,24 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
ResultSet profileRs = null;
pProfileStmt = conn.prepareStatement(profileSql);
*/
//Table name changed from gencode to profile-Monika-09-MAy-2019
String profileSql = " select count(1) " +
" from profile " +
" where PROFILE_ID =?" ;
int profileCount = 0;
System.out.println("ProfileSql :: " + profileSql);
PreparedStatement pProfileStmt = null;
ResultSet profileRs = null;
pProfileStmt = conn.prepareStatement(profileSql);
pProfileStmt.setString(1, profileId);
profileRs = pProfileStmt.executeQuery();
if(profileRs.next())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment