Commit 0a2d7689 authored by manohar's avatar manohar

Merged the changes done on 26/02/13 at Sun Unique - he validation for rights...

Merged the changes done on 26/02/13 at Sun Unique - he validation for rights char was not proper it was accepting char delimited by comma like A,E,V  where as it should accept AEV. Also $ and # also should be accepted like * these are for comments and attachment.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92818 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d1962df1
...@@ -416,6 +416,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -416,6 +416,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
Node parentNode = null; Node parentNode = null;
Node childNode = null; Node childNode = null;
String childNodeName = ""; String childNodeName = "";
String rightChar = "";
boolean bDetailFound = false; boolean bDetailFound = false;
int parentNodeListLength = 0; int parentNodeListLength = 0;
...@@ -575,12 +576,11 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -575,12 +576,11 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
objName =winName.substring(2); objName =winName.substring(2);
} }
System.out.println("objName ::::"+ objName); System.out.println("objName ::::"+ objName);
// commented by manoharan 26/02/13 comma delimiter should not be there in the rights
//added by akhilesh on 08/oct/12 //added by akhilesh on 08/oct/12
String rightStr[] = rights.split(","); //String rightStr[] = rights.split(",");
//for(int i= 0 ; i<rightStr.length; i++)
//{
for(int i= 0 ; i<rightStr.length; i++)
{
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 ArrayList relArray1 = new ArrayList(); // added by akhilesh on 07/nov/12
...@@ -592,7 +592,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -592,7 +592,7 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
{ {
relArray.add(rs.getString(1)); relArray.add(rs.getString(1));
} }
System.out.println("relArray and rights value"+relArray+""+rightStr[i]); System.out.println("relArray and rights value"+relArray);
rs.close(); rs.close();
rs = null; rs = null;
...@@ -608,15 +608,20 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -608,15 +608,20 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
{ {
relArray1.add(rs.getString(1)); relArray1.add(rs.getString(1));
} }
System.out.println("relArray1 and rights value"+relArray1+""+rightStr[i]); System.out.println("relArray1 and rights value"+relArray1);
rs.close(); rs.close();
rs = null; rs = null;
pSelectStmt.close(); pSelectStmt.close();
pSelectStmt = null; pSelectStmt = null;
//ended by akhilesh //ended by akhilesh
rightChar = "";
if(!(relArray1.contains(rightStr[i]) || relArray.contains(rightStr[i]) || "*".equals(rightStr[i]) || "".equals(rightStr[i]))) for (int iCtr = 0; iCtr < rights.length(); iCtr++)
{
rightChar = rights.substring(iCtr,1);
System.out.println("relArray ["+relArray+" ] rightChar ["+ rightChar + "] rights [" + rights + "]");
//if(!(relArray1.contains(rightStr[i]) || relArray.contains(rightStr[i]) || "*".equals(rightStr[i]) || "".equals(rightStr[i])))
if(!(relArray1.contains(rightChar) || relArray.contains(rightChar) || "*".equals(rightChar) || "".equals(rightChar) || "$".equals(rightChar) || "#".equals(rightChar) ))
{ {
System.out.println("r************"+relArray+""+rights); System.out.println("r************"+relArray+""+rights);
returnString="VTRIGHT"; returnString="VTRIGHT";
...@@ -624,11 +629,14 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -624,11 +629,14 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
return returnString; return returnString;
} }
} }
//}
//ended by akhilesh //ended by akhilesh
/*}commented by akhilesh on 31/oct/12 /*}commented by akhilesh on 31/oct/12
else else
rights = null;*/ rights = null;*/
} }
} }
...@@ -672,7 +680,9 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U ...@@ -672,7 +680,9 @@ public class UserRightsPrc extends ProcessEJB implements UserRightsPrcLocal , U
String searchStr = null; String searchStr = null;
searchStr = (String)subMenuList.get(index); searchStr = (String)subMenuList.get(index);
objName = ""; objName = "";
System.out.print("obj name @@@@@@@@@@@@"+objName+""+searchStr+""+index+""+subMenuList.size()); System.out.print("searchStr [" + searchStr +"]["+index+"]["+subMenuList.size() + "]");
System.out.print("winNameMap ["+ winNameMap + "]");
System.out.print("menuNameMap [" + menuNameMap + "]");
objName = (String)winNameMap.get(searchStr); objName = (String)winNameMap.get(searchStr);
System.out.print("obj name @@@@@@@@@@@@"+objName+""+searchStr+""+index+""+subMenuList.size()); System.out.print("obj name @@@@@@@@@@@@"+objName+""+searchStr+""+index+""+subMenuList.size());
//Get parameters from searchStr //Get parameters from searchStr
......
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