ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject git commit: Revert "ARGUS-29:Allow Kerberized Username during repo creation"
Date Thu, 04 Sep 2014 13:06:21 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master d70c51929 -> a735e9f09


Revert "ARGUS-29:Allow Kerberized Username during repo creation"

This reverts commit d70c51929e7761f65dad459efdc3fd8963fd9148.


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

Branch: refs/heads/master
Commit: a735e9f0945bee2ea689888c1defd57196cfae2f
Parents: d70c519
Author: sneethiraj <sneethir@apache.org>
Authored: Thu Sep 4 09:05:15 2014 -0400
Committer: sneethiraj <sneethir@apache.org>
Committed: Thu Sep 4 09:05:15 2014 -0400

----------------------------------------------------------------------
 .../src/main/java/com/xasecure/biz/AssetMgr.java         | 11 +++--------
 .../src/main/webapp/scripts/views/asset/AssetForm.js     |  4 ++--
 2 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/a735e9f0/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java b/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
index e2aa45f..e635b9d 100644
--- a/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
+++ b/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
@@ -1207,8 +1207,7 @@ public class AssetMgr extends AssetMgrBase {
 		int assetType = vXAsset.getAssetType();
 
 		Map<String, String> configMap = jsonUtil.jsonToMap(config);
-		String userName = configMap.get("username").indexOf("/") < 0 ? configMap.get("username")

-				:  configMap.get("username").substring(0,configMap.get("username").indexOf("/"));
+		String userName = configMap.get("username");
 
 		VXResource vXResource = new VXResource();
 		vXResource.setAssetId(vXAsset.getId());
@@ -1940,9 +1939,7 @@ public class AssetMgr extends AssetMgrBase {
 	public void updateDefaultPolicy(VXAsset vXAsset, String config) {
 		int assetType = vXAsset.getAssetType();
 		Map<String, String> configMap = jsonUtil.jsonToMap(config);
-//		String userName = configMap.get("username");
-		String userName = configMap.get("username").indexOf("/") < 0 ? configMap.get("username")

-				:  configMap.get("username").substring(0,configMap.get("username").indexOf("/"));
+		String userName = configMap.get("username");
 		VXResource vxResource = fetchDefaultPolicyForAsset(vXAsset.getId(),
 				assetType);
 		if (vxResource != null) {
@@ -2244,9 +2241,7 @@ public class AssetMgr extends AssetMgrBase {
 			return ;
 		}
 		Map<String, String> configMap = jsonUtil.jsonToMap(config);
-		String userName = configMap.get("username").indexOf("/") < 0 ? configMap.get("username")

-				:  configMap.get("username").substring(0,configMap.get("username").indexOf("/"));
-		
+		String userName = configMap.get("username");
 		VXResource vXResource = new VXResource();
 		vXResource.setAssetId(vXAsset.getId());
 		vXResource.setAssetName(vXAsset.getName());

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/a735e9f0/security-admin/src/main/webapp/scripts/views/asset/AssetForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/asset/AssetForm.js b/security-admin/src/main/webapp/scripts/views/asset/AssetForm.js
index e5fff85..08a0ae7 100644
--- a/security-admin/src/main/webapp/scripts/views/asset/AssetForm.js
+++ b/security-admin/src/main/webapp/scripts/views/asset/AssetForm.js
@@ -69,8 +69,8 @@ define(function(require){
 					type : 'Text',
 //					fieldClass : "hdfs hive knox",
 					title : this.model.propertiesNameMap.userName+" *",//'xalogin.username'
-					validators  : ['required'],//{type:'regexp',regexp:/^[a-z][a-z0-9,._'-]+$/i,message
:'Please enter valid username'}],
-					editorAttrs :{'class':'stretchTextInput'}//,'maxlength': 48}
+					validators  : ['required',{type:'regexp',regexp:/^[a-z][a-z0-9,._'-]+$/i,message :'Please
enter valid username'}],
+					editorAttrs :{'class':'stretchTextInput','maxlength': 32}
 				},
 				passwordKeytabfile : {
 					type : 'Password',


Mime
View raw message