Commit d4302906 authored by prumde's avatar prumde

Formatted ProfileId from User Site Table

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@214954 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bd4db1e7
...@@ -1138,9 +1138,11 @@ public class DashboardUtil ...@@ -1138,9 +1138,11 @@ public class DashboardUtil
{ {
System.out.println("Inside getObjUserRights method !! objNameRights:["+objNameRights+"],profileId: ["+profileId+"]"); System.out.println("Inside getObjUserRights method !! objNameRights:["+objNameRights+"],profileId: ["+profileId+"]");
session = HibernateUtil.getSessionFactory(userTranDB).openSession(); session = HibernateUtil.getSessionFactory(userTranDB).openSession();
NativeQuery query = session.createNativeQuery("SELECT * FROM USER_RIGHTS WHERE OBJ_NAME = '"+objNameRights+"' AND PROFILE_ID " //NativeQuery query = session.createNativeQuery("SELECT * FROM USER_RIGHTS WHERE OBJ_NAME = '"+objNameRights+"' AND PROFILE_ID "
+ " in ( select '"+profileId+"' as profile_id from dual union all select profile_id from user_site where user_id = '"+loginCode+"' )"); // + " in ( select '"+profileId+"' as profile_id from dual union all select profile_id from user_site where user_id = '"+loginCode+"' )");
profileId = E12GenericUtility.getFormattedProfileId(profileId);
System.out.println("Formatted ProfileId profileId: ["+profileId+"]");
NativeQuery query = session.createNativeQuery("SELECT * FROM USER_RIGHTS WHERE OBJ_NAME = '"+objNameRights+"' AND PROFILE_ID IN " + profileId );
resultList = query.list(); resultList = query.list();
System.out.println("resultList for userRights : ["+resultList+"]"); System.out.println("resultList for userRights : ["+resultList+"]");
......
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