ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject git commit: ARGUS-69:Fixed case conversion in user name queries to support Oracle
Date Fri, 03 Oct 2014 00:51:21 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master 61b3f4a35 -> 83c336de5


ARGUS-69:Fixed case conversion in user name queries to support Oracle

Signed-off-by: sneethiraj <sneethir@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/83c336de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/83c336de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/83c336de

Branch: refs/heads/master
Commit: 83c336de5be71f1f902734ecc0f52802a6c95a6c
Parents: 61b3f4a
Author: vperiasamy <vperiasamy@hortonworks.com>
Authored: Thu Oct 2 15:55:32 2014 -0700
Committer: sneethiraj <sneethir@apache.org>
Committed: Thu Oct 2 17:50:55 2014 -0700

----------------------------------------------------------------------
 security-admin/db/oracle/xa_core_db_oracle.sql                   | 2 +-
 security-admin/src/main/resources/META-INF/jpa_named_queries.xml | 4 ++--
 .../src/main/webapp/META-INF/security-applicationContext.xml     | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/83c336de/security-admin/db/oracle/xa_core_db_oracle.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/oracle/xa_core_db_oracle.sql b/security-admin/db/oracle/xa_core_db_oracle.sql
index db0ef07..a8ac5d8 100644
--- a/security-admin/db/oracle/xa_core_db_oracle.sql
+++ b/security-admin/db/oracle/xa_core_db_oracle.sql
@@ -534,7 +534,7 @@ X_PORTAL_USER_ROLE_SEQ.NEXTVAL, SYSDATE, SYSDATE,
 );
 
 insert into x_user (id,CREATE_TIME, UPDATE_TIME,user_name, status,descr) values (
-X_USER_SEQ.NEXTVAL, SYSDATE, SYSDATE,'Admin', 0,'Administrator');
+X_USER_SEQ.NEXTVAL, SYSDATE, SYSDATE,'admin', 0,'Administrator');
 
 INSERT INTO x_group (ID,ADDED_BY_ID, CREATE_TIME, DESCR, GROUP_TYPE, GROUP_NAME, STATUS,
UPDATE_TIME, UPD_BY_ID) VALUES (X_GROUP_SEQ.nextval,1, sys_extract_utc(systimestamp), 'public
group', 0, 'public', 0, sys_extract_utc(systimestamp), 1);
 commit;

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/83c336de/security-admin/src/main/resources/META-INF/jpa_named_queries.xml
----------------------------------------------------------------------
diff --git a/security-admin/src/main/resources/META-INF/jpa_named_queries.xml b/security-admin/src/main/resources/META-INF/jpa_named_queries.xml
index 1b3805b..277a1b9 100644
--- a/security-admin/src/main/resources/META-INF/jpa_named_queries.xml
+++ b/security-admin/src/main/resources/META-INF/jpa_named_queries.xml
@@ -139,13 +139,13 @@
 
 	<named-query name="XXUser.findByUserName">
 		<query>SELECT Obj FROM XXUser obj
-			   WHERE LOWER(obj.name)=:name			   
+			   WHERE obj.name=:name
 		</query>
 	</named-query>
 	
 	<named-query name="XXGroup.findByGroupName">
 		<query>SELECT Obj FROM XXGroup obj
-			   WHERE LOWER(obj.name)=:name			   
+			   WHERE obj.name=:name
 		</query>
 	</named-query>
 	

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/83c336de/security-admin/src/main/webapp/META-INF/security-applicationContext.xml
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/META-INF/security-applicationContext.xml b/security-admin/src/main/webapp/META-INF/security-applicationContext.xml
index 4eb470f..861905a 100644
--- a/security-admin/src/main/webapp/META-INF/security-applicationContext.xml
+++ b/security-admin/src/main/webapp/META-INF/security-applicationContext.xml
@@ -109,10 +109,10 @@ http://www.springframework.org/schema/security/spring-security-oauth2-1.0.xsd">
 	<beans:bean id="userContextFormationFilter" class="com.xasecure.security.web.filter.XASecurityContextFormationFilter"/>
 
 	<security:jdbc-user-service id="userService" data-source-ref="defaultDataSource"
-			users-by-username-query="select LOGIN_ID,PASSWORD,STATUS from x_portal_user where LOWER(LOGIN_ID)=LOWER(?)
and STATUS = 1"
+			users-by-username-query="select LOGIN_ID,PASSWORD,STATUS from x_portal_user where LOGIN_ID=?
and STATUS = 1"
 			group-authorities-by-username-query=""
 			authorities-by-username-query="SELECT usr.LOGIN_ID,usr_role.USER_ROLE FROM x_portal_user
usr,x_portal_user_role usr_role
-			WHERE LOWER(usr.LOGIN_ID)=LOWER(?)
+			WHERE usr.LOGIN_ID=?
 			AND usr_role.USER_ID = usr.ID"
 			/>
 


Mime
View raw message