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 ...@@ -217,15 +217,18 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
String profileSql = " select count(1) " + String profileSql = " select count(1) " +
" from profile " + " from profile " +
" where PROFILE_ID = '" + profileId + "' " ; " where PROFILE_ID =?" ;
int profileCount = 0; int profileCount = 0;
System.out.println("ProfileSql :: " + profileSql); System.out.println("ProfileSql :: " + profileSql);
PreparedStatement pProfileStmt = null; PreparedStatement pProfileStmt = null;
ResultSet profileRs = null; ResultSet profileRs = null;
pProfileStmt = conn.prepareStatement(profileSql); pProfileStmt = conn.prepareStatement(profileSql);
pProfileStmt.setString(1, profileId);
profileRs = pProfileStmt.executeQuery(); profileRs = pProfileStmt.executeQuery();
...@@ -1551,7 +1554,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -1551,7 +1554,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
// " from user_rights " + // " from user_rights " +
// " where profile_id = '" + profileId + "' " ; // " where profile_id = '" + profileId + "' " ;
String profileSql = " select count(1) " + /*String profileSql = " select count(1) " +
" from gencodes " + " from gencodes " +
" where fld_name = 'PROFILE_ID' and fld_value = '" + profileId + "' " ; " where fld_name = 'PROFILE_ID' and fld_value = '" + profileId + "' " ;
...@@ -1562,6 +1565,23 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -1562,6 +1565,23 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
ResultSet profileRs = null; ResultSet profileRs = null;
pProfileStmt = conn.prepareStatement(profileSql); 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(); profileRs = pProfileStmt.executeQuery();
......
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