Commit 367714da authored by asikarwar's avatar asikarwar

add validation for obj_actions also


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92154 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 61fd18ae
...@@ -332,14 +332,15 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -332,14 +332,15 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
{ {
try try
{ {
rs.close(); if(rs != null){rs.close();// added by akhilesh on 08/nov/12
rs = null; rs = null;}
pstmt.close(); if(pstmt != null){pstmt.close();// added by akhilesh on 08/nov/12
pstmt = null; pstmt = null;}
if(conn != null){conn.close();// added by akhilesh on 08/nov/12
conn = null;}
conn.close();
conn = null;
} }
catch(Exception e){ catch(Exception e){
throw new ITMException(e);// added by akhilesh on 31/oct/12 throw new ITMException(e);// added by akhilesh on 31/oct/12
...@@ -398,6 +399,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -398,6 +399,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
java.sql.Timestamp orderDate = new java.sql.Timestamp(System.currentTimeMillis()); java.sql.Timestamp orderDate = new java.sql.Timestamp(System.currentTimeMillis());
java.sql.Timestamp udfDate = null; java.sql.Timestamp udfDate = null;
ArrayList relArray = new ArrayList(); // added by akhilesh on 31/oct/12 ArrayList relArray = new ArrayList(); // added by akhilesh on 31/oct/12
ArrayList relArray1 = new ArrayList(); // added by akhilesh on 07/nov/12
String returnString = ""; String returnString = "";
//Declaring fields of the table User_Rights //Declaring fields of the table User_Rights
...@@ -587,7 +589,24 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -587,7 +589,24 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
pSelectStmt.close(); pSelectStmt.close();
pSelectStmt = null; pSelectStmt = null;
if(!(relArray.contains(rights) || "*".equals(rights))) // added by akhilesh on 07/nov/12
String selectSql1 = "SELECT DISTINCT (RIGHTS_CHAR) FROM OBJ_ACTIONS WHERE OBJ_NAME = ?";
pSelectStmt =conn.prepareStatement(selectSql1);
pSelectStmt.setString(1,objName);
rs = pSelectStmt.executeQuery();
while(rs.next())
{
relArray1.add(rs.getString(1));
}
System.out.println("relArray and rights value"+relArray1+""+rights);
rs.close();
rs = null;
pSelectStmt.close();
pSelectStmt = null;
//ended by akhilesh
if(!(relArray1.contains(rights) || relArray.contains(rights) || "*".equals(rights)))
{ {
System.out.println("r************"+relArray+""+rights); System.out.println("r************"+relArray+""+rights);
returnString="VTRIGHT"; returnString="VTRIGHT";
......
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