ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject ranger git commit: RANGER-1325 : Usernames starting with _ not allowe
Date Wed, 01 Feb 2017 20:47:03 GMT
Repository: ranger
Updated Branches:
  refs/heads/master 7fe9290b1 -> e3b0ce2d9


RANGER-1325 : Usernames starting with _ not allowe

Signed-off-by: Velmurugan Periasamy <vel@apache.org>


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

Branch: refs/heads/master
Commit: e3b0ce2d9760f9f85cddaea6adb1db4fb2abdaeb
Parents: 7fe9290
Author: Mehul Parikh <mehul.parikh@freestoneinfotech.com>
Authored: Wed Feb 1 18:36:01 2017 +0530
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Wed Feb 1 15:44:18 2017 -0500

----------------------------------------------------------------------
 .../crypto/key/kms/server/KMSMetricUtil.java    |  15 +-
 .../org/apache/ranger/common/StringUtil.java    |   4 +-
 .../apache/ranger/patch/cliutil/MetricUtil.java | 336 ++++++++---------
 .../org/apache/ranger/rest/ServiceREST.java     |   9 +
 .../apache/ranger/view/VXMetricPolicyCount.java |  21 +-
 .../ranger/view/VXMetricServiceCount.java       |  16 +-
 .../bower/require-handlebars-plugin/js/hbs.js   |   4 +-
 .../bower/require-handlebars-plugin/js/json2.js | 365 -------------------
 security-admin/src/main/webapp/scripts/Init.js  |   1 -
 .../src/main/webapp/scripts/models/VXGroup.js   |   2 +-
 .../main/webapp/scripts/models/VXPortalUser.js  |   4 +-
 .../scripts/modules/globalize/message/en.js     |   8 +-
 .../main/webapp/scripts/prelogin/XAPrelogin.js  |   2 +-
 .../scripts/views/policies/PermissionList.js    |   4 +-
 .../webapp/scripts/views/reports/AuditLayout.js |  61 ++--
 .../views/reports/PlugableServiceDiffDetail.js  |   3 -
 .../webapp/scripts/views/users/GroupForm.js     |   2 +-
 .../main/webapp/scripts/views/users/UserForm.js |   6 +-
 security-admin/src/main/webapp/styles/xa.css    |   3 +
 19 files changed, 247 insertions(+), 619 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMetricUtil.java
----------------------------------------------------------------------
diff --git a/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMetricUtil.java b/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMetricUtil.java
index 71ebb8d..4d20fe9 100644
--- a/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMetricUtil.java
+++ b/kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMetricUtil.java
@@ -115,12 +115,12 @@ public class KMSMetricUtil {
 					if (kmsWebApp != null) {
 						kmsWebApp.contextInitialized(null);
 						KeyProviderCryptoExtension keyProvider = kmsWebApp.getKeyProvider();
-						if (keyProvider != null && keyProvider.getKeys() != null) {
+						Map<String, Integer> encryptedKeyByAlgorithmCountMap = new HashMap<String, Integer>();
+						int count = 0;
+						if (keyProvider != null && keyProvider.getKeys() != null && keyProvider.getKeys().size() > 0) {
 							List<String> keyList = new ArrayList<String>();
 							keyList.addAll(keyProvider.getKeys());
-							if (keyList != null) {
-								Map<String, Integer> encryptedKeyByAlgorithmCountMap = new HashMap<String, Integer>();
-								int count = 0;
+							if (keyList != null) {								
 								for (int i = 0; i < keyList.size(); i++) {
 									String algorithmName = keyProvider.getMetadata(keyList.get(i)).getCipher();
 									if (encryptedKeyByAlgorithmCountMap.containsKey(algorithmName)) {
@@ -134,15 +134,14 @@ public class KMSMetricUtil {
 								Gson gson = new GsonBuilder().create();
 								final String jsonEncKeyByAlgo = gson.toJson(encryptedKeyByAlgorithmCountMap);
 								System.out.println(jsonEncKeyByAlgo);
-							}
-							kmsWebApp.contextDestroyed(null);
+							}							
 						} else {
-							Map<String, String> encryptedKeyByAlgorithmCountMap = new HashMap<String, String>();
-							encryptedKeyByAlgorithmCountMap.put("encryptedKeyByAlgorithm", "");
+							encryptedKeyByAlgorithmCountMap.put("encryptedKeyByAlgorithm", count);
 							Gson gson = new GsonBuilder().create();
 							final String jsonEncKeyByAlgo = gson.toJson(encryptedKeyByAlgorithmCountMap);
 							System.out.println(jsonEncKeyByAlgo);
 						}
+						kmsWebApp.contextDestroyed(null);
 					}
 				} catch (IOException e) {
 					logger.error("Error calculating KMSMetric for encrypted key by algorithm : " + e.getMessage());

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java b/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
index cd99588..a190e87 100644
--- a/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
+++ b/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
@@ -34,9 +34,9 @@ public class StringUtil implements Serializable {
 
 	static final public int MIN_PASSWORD_LENGTH = 8;
 
-	static final public String VALIDATION_NAME = "^([A-Za-z0-9]|[\u00C0-\u017F])([a-zA-Z0-9\\s_. -]|[\u00C0-\u017F])+$";
+	static final public String VALIDATION_NAME = "^([A-Za-z0-9_]|[\u00C0-\u017F])([a-zA-Z0-9\\s_. -]|[\u00C0-\u017F])+$";
 	static final public String VALIDATION_TEXT = "[a-zA-Z0-9\\ \"!@#$%^&amp;*()-_=+;:'&quot;|~`&lt;&gt;?/{}\\.\\,\\-\\?<>]*";
-	static final public String VALIDATION_LOGINID = "^([A-Za-z0-9]|[\u00C0-\u017F])([a-z0-9,._\\-+/@= ]|[\u00C0-\u017F])+$";
+	static final public String VALIDATION_LOGINID = "^([A-Za-z0-9_]|[\u00C0-\u017F])([a-z0-9,._\\-+/@= ]|[\u00C0-\u017F])+$";
 
 	static final public String VALIDATION_ALPHA = "[a-z,A-Z]*";
 	static final public String VALIDATION_IP_ADDRESS = "[\\d\\.\\%\\:]*";

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/java/org/apache/ranger/patch/cliutil/MetricUtil.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/patch/cliutil/MetricUtil.java b/security-admin/src/main/java/org/apache/ranger/patch/cliutil/MetricUtil.java
index 77b3f95..7a15fc3 100644
--- a/security-admin/src/main/java/org/apache/ranger/patch/cliutil/MetricUtil.java
+++ b/security-admin/src/main/java/org/apache/ranger/patch/cliutil/MetricUtil.java
@@ -90,14 +90,14 @@ public class MetricUtil extends BaseLoader  {
 		try {
 			MetricUtil loader = (MetricUtil) CLIUtil.getBean(MetricUtil.class);
 			loader.init();
-			if(args.length != 2){
+			if (args.length != 2) {
 				System.out.println("type: Incorrect Arguments usage : -type policies | audits | usergroup | services | database | contextenrichers | denyconditions");
-			}else {
-				if(!(args[0].equalsIgnoreCase("-type")) || !(args[1].equalsIgnoreCase("policies") || args[1].equalsIgnoreCase("audits") || args[1].equalsIgnoreCase("usergroup") || args[1].equalsIgnoreCase("services") || args[1].equalsIgnoreCase("database") || args[1].equalsIgnoreCase("contextenrichers") || args[1].equalsIgnoreCase("denyconditions"))){
-					System.out.println("type: Incorrect Arguments usage : -type policies | audits | usergroup | services | database | contextenrichers | denyconditions");	
-				}else{
+			} else {
+				if (!(args[0].equalsIgnoreCase("-type")) || !(args[1].equalsIgnoreCase("policies") || args[1].equalsIgnoreCase("audits") || args[1].equalsIgnoreCase("usergroup") || args[1].equalsIgnoreCase("services") || args[1].equalsIgnoreCase("database") || args[1].equalsIgnoreCase("contextenrichers") || args[1].equalsIgnoreCase("denyconditions"))) {
+					System.out.println("type: Incorrect Arguments usage : -type policies | audits | usergroup | services | database | contextenrichers | denyconditions");
+				} else {
 					metricType = args[1];
-					if(logger.isDebugEnabled()){
+					if (logger.isDebugEnabled()) {
 						logger.debug("Metric Type : " + metricType);
 					}
 				}
@@ -107,8 +107,7 @@ public class MetricUtil extends BaseLoader  {
 			}
 			logger.info("Load complete. Exiting!!!");
 			System.exit(0);
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			logger.error("Error loading", e);
 			System.exit(1);
 		}
@@ -143,23 +142,23 @@ public class MetricUtil extends BaseLoader  {
 				case "usergroup":
 					try {
 						VXGroupList vxGroupList = xUserMgr.searchXGroups(searchCriteria);
-
+	
 						long groupCount = vxGroupList.getTotalCount();
-						
+	
 						ArrayList<String> userKeyAdminRoleCount = new ArrayList<String>();
 						userKeyAdminRoleCount.add(RangerConstants.ROLE_SYS_ADMIN);
 						long userSysAdminCount = getUserCountBasedOnUserRole(userKeyAdminRoleCount);
-						
+	
 						ArrayList<String> userRoleListKeyRoleAdmin = new ArrayList<String>();
 						userRoleListKeyRoleAdmin.add(RangerConstants.ROLE_KEY_ADMIN);
 						long userKeyAdminCount = getUserCountBasedOnUserRole(userRoleListKeyRoleAdmin);
-						
+	
 						ArrayList<String> userRoleListUser = new ArrayList<String>();
 						userRoleListUser.add(RangerConstants.ROLE_USER);
 						long userRoleCount = getUserCountBasedOnUserRole(userRoleListUser);
-						 	
+	
 						long userTotalCount = userSysAdminCount + userKeyAdminCount + userRoleCount;
-						
+	
 						VXMetricUserGroupCount metricUserGroupCount = new VXMetricUserGroupCount();
 						metricUserGroupCount.setUserCountOfUserRole(userRoleCount);
 						metricUserGroupCount.setUserCountOfKeyAdminRole(userKeyAdminCount);
@@ -170,7 +169,7 @@ public class MetricUtil extends BaseLoader  {
 						final String jsonUserGroupCount = gson.toJson(metricUserGroupCount);
 						System.out.println(jsonUserGroupCount);
 					} catch (Exception e) {
-						logger.error("Error calculating Metric for usergroup : "+ e.getMessage());
+						logger.error("Error calculating Metric for usergroup : " + e.getMessage());
 					}
 					break;								
 				case "audits":
@@ -231,7 +230,7 @@ public class MetricUtil extends BaseLoader  {
 					}
 					break;	
 				case "services" : 	
-					try{
+					try {
 						SearchFilter serviceFilter = new SearchFilter();
 						serviceFilter.setMaxRows(200);
 						serviceFilter.setStartIndex(0);
@@ -240,30 +239,29 @@ public class MetricUtil extends BaseLoader  {
 						serviceFilter.setSortType("asc");
 						VXMetricServiceCount vXMetricServiceCount = new VXMetricServiceCount();
 						PList<RangerService> paginatedSvcs = svcStore.getPaginatedServices(serviceFilter);
-						long totalServiceCount = paginatedSvcs.getTotalCount();				
+						long totalServiceCount = paginatedSvcs.getTotalCount();
 						List<RangerService> rangerServiceList = paginatedSvcs.getList();
-						Map<String,Long> services = new HashMap<String,Long>();						
-						for (Object rangerService:rangerServiceList) {
+						Map<String, Long> services = new HashMap<String, Long>();
+						for (Object rangerService : rangerServiceList) {
 							RangerService RangerServiceObj = (RangerService) rangerService;
 							String serviceName = RangerServiceObj.getType();
-							if(!(services.containsKey(serviceName)))
-							{
-								serviceFilter.setParam("serviceType",serviceName);
+							if (!(services.containsKey(serviceName))) {
+								serviceFilter.setParam("serviceType", serviceName);
 								PList<RangerService> paginatedSvcscount = svcStore.getPaginatedServices(serviceFilter);
-								services.put(serviceName,paginatedSvcscount.getTotalCount());
+								services.put(serviceName, paginatedSvcscount.getTotalCount());
 							}
 						}
-						vXMetricServiceCount.setServiceCountList(services);
+						vXMetricServiceCount.setServiceBasedCountList(services);
 						vXMetricServiceCount.setTotalCount(totalServiceCount);
 						Gson gson = new GsonBuilder().create();
 						final String jsonServices = gson.toJson(vXMetricServiceCount);
 						System.out.println(jsonServices);
-					}catch (Exception e) {
-						logger.error("Error calculating Metric for services : "+e.getMessage());
+					} catch (Exception e) {
+						logger.error("Error calculating Metric for services : " + e.getMessage());
 					}
-					break;					
+					break;				
 				case "policies" :   
-					try{
+					try {
 						SearchFilter policyFilter = new SearchFilter();
 						policyFilter.setMaxRows(200);
 						policyFilter.setStartIndex(0);
@@ -273,155 +271,148 @@ public class MetricUtil extends BaseLoader  {
 						VXMetricPolicyCount vXMetricPolicyCount = new VXMetricPolicyCount();
 						PList<RangerPolicy> paginatedSvcsList = svcStore.getPaginatedPolicies(policyFilter);
 						vXMetricPolicyCount.setTotalCount(paginatedSvcsList.getTotalCount());
-						Map<String,VXMetricServiceCount> servicesWithPolicy = new HashMap<String,VXMetricServiceCount>();
-						for(int k = 2;k >= 0;k--)
-						{
+						Map<String, VXMetricServiceCount> servicesWithPolicy = new HashMap<String, VXMetricServiceCount>();
+						for (int k = 2; k >= 0; k--) {
 							String serviceType = String.valueOf(k);
-							VXMetricServiceCount vXMetricServiceCount = getVXMetricServiceCount(serviceType); 							
-							if(k == 2)
-								servicesWithPolicy.put("row_filtering_policies", vXMetricServiceCount);
-							else if(k == 1)
-								servicesWithPolicy.put("masking_policies", vXMetricServiceCount);
-							else if(k == 0)
-								servicesWithPolicy.put("resource_policy", vXMetricServiceCount);							
+							VXMetricServiceCount vXMetricServiceCount = getVXMetricServiceCount(serviceType);
+							if (k == 2) {
+								servicesWithPolicy.put("rowFilteringPolicies", vXMetricServiceCount); }
+							else if (k == 1) {
+								servicesWithPolicy.put("maskingPolicies", vXMetricServiceCount); }
+							else if (k == 0) {
+								servicesWithPolicy.put("resourcePolicy", vXMetricServiceCount);}
 						}
 						boolean tagFlag = false;
-						if(tagFlag == false)
-						{
-							policyFilter.setParam("serviceType","tag");
+						if (tagFlag == false) {
+							policyFilter.setParam("serviceType", "tag");
 							PList<RangerPolicy> policiestype = svcStore.getPaginatedPolicies(policyFilter);
-							Map<String,Long> tagMap = new HashMap<String,Long>();
+							Map<String, Long> tagMap = new HashMap<String, Long>();
 							long tagCount = policiestype.getTotalCount();
-							tagMap.put("tag",tagCount);
+							tagMap.put("tag", tagCount);
 							VXMetricServiceCount vXMetricServiceCount = new VXMetricServiceCount();
-							vXMetricServiceCount.setServiceCountList(tagMap);
+							vXMetricServiceCount.setServiceBasedCountList(tagMap);
 							vXMetricServiceCount.setTotalCount(tagCount);
-							servicesWithPolicy.put("tag_based_policies",vXMetricServiceCount);
+							servicesWithPolicy.put("tagBasedPolicies", vXMetricServiceCount);
 							tagFlag = true;
 						}
-						vXMetricPolicyCount.setvXMetricServiceCount(servicesWithPolicy);
+						vXMetricPolicyCount.setPolicyCountList(servicesWithPolicy);
 						Gson gson = new GsonBuilder().create();
 						final String jsonPolicies = gson.toJson(vXMetricPolicyCount);
 						System.out.println(jsonPolicies);
-					}catch (Exception e) {
-						logger.error("Error calculating Metric for policies : "+e.getMessage());
-					}				
+					} catch (Exception e) {
+						logger.error("Error calculating Metric for policies : " + e.getMessage());
+					}
 					break;
 				case "database" :
-					try{						
-						int dbFlavor = RangerBizUtil.getDBFlavor();						
+					try {
+						int dbFlavor = RangerBizUtil.getDBFlavor();
 						String dbFlavourType = "Unknow ";
-						if(dbFlavor == AppConstants.DB_FLAVOR_MYSQL){
+						if (dbFlavor == AppConstants.DB_FLAVOR_MYSQL) {
 							dbFlavourType = "MYSQL ";
-						}else if(dbFlavor == AppConstants.DB_FLAVOR_ORACLE){
+						} else if (dbFlavor == AppConstants.DB_FLAVOR_ORACLE) {
 							dbFlavourType = "ORACLE ";
-						}else if(dbFlavor == AppConstants.DB_FLAVOR_POSTGRES){
+						} else if (dbFlavor == AppConstants.DB_FLAVOR_POSTGRES) {
 							dbFlavourType = "POSTGRES ";
-						}else if(dbFlavor == AppConstants.DB_FLAVOR_SQLANYWHERE){
+						} else if (dbFlavor == AppConstants.DB_FLAVOR_SQLANYWHERE) {
 							dbFlavourType = "SQLANYWHERE ";
-						}else if(dbFlavor == AppConstants.DB_FLAVOR_SQLSERVER){
+						} else if (dbFlavor == AppConstants.DB_FLAVOR_SQLSERVER) {
 							dbFlavourType = "SQLSERVER ";
 						}
 						String dbDetail = dbFlavourType + xaBizUtil.getDBVersion();
 						Gson gson = new GsonBuilder().create();
 						final String jsonDBDetail = gson.toJson(dbDetail);
-						System.out.println(jsonDBDetail);						
-					}catch (Exception e) {
-						logger.error("Error calculating Metric for database : "+e.getMessage());
+						System.out.println(jsonDBDetail);
+					} catch (Exception e) {
+						logger.error("Error calculating Metric for database : " + e.getMessage());
 					}
 					break;
 				case "contextenrichers":
-					try
-					{
+					try {
 						SearchFilter filter = new SearchFilter();
-					    filter.setStartIndex(0);
-					    VXMetricContextEnricher serviceWithContextEnrichers = new VXMetricContextEnricher();
-					    PList<RangerServiceDef> paginatedSvcDefs = svcStore.getPaginatedServiceDefs(filter);
-					    List<RangerServiceDef> repoTypeList = paginatedSvcDefs.getList();
-					    if(repoTypeList != null){
-					    	for (RangerServiceDef repoType:repoTypeList) 
-					    	{
-					    		RangerServiceDef rangerServiceDefObj = (RangerServiceDef)repoType;
-					    		String name = rangerServiceDefObj.getName();
-					    		List<RangerContextEnricherDef> contextEnrichers = rangerServiceDefObj.getContextEnrichers();							
-					    		if(contextEnrichers != null && contextEnrichers.size() > 0){
-					    			serviceWithContextEnrichers.setServiceName(name);
-					    			serviceWithContextEnrichers.setTotalCount(contextEnrichers.size());								
-					    		}
-					    	}
-					    }
-					    Gson gson = new GsonBuilder().create();
+						filter.setStartIndex(0);
+						VXMetricContextEnricher serviceWithContextEnrichers = new VXMetricContextEnricher();
+						PList<RangerServiceDef> paginatedSvcDefs = svcStore.getPaginatedServiceDefs(filter);
+						List<RangerServiceDef> repoTypeList = paginatedSvcDefs.getList();
+						if (repoTypeList != null) {
+							for (RangerServiceDef repoType : repoTypeList) {
+								RangerServiceDef rangerServiceDefObj = (RangerServiceDef) repoType;
+								String name = rangerServiceDefObj.getName();
+								List<RangerContextEnricherDef> contextEnrichers = rangerServiceDefObj.getContextEnrichers();
+								if (contextEnrichers != null && contextEnrichers.size() > 0) {
+									serviceWithContextEnrichers.setServiceName(name);
+									serviceWithContextEnrichers.setTotalCount(contextEnrichers.size());
+								}
+							}
+						}
+						Gson gson = new GsonBuilder().create();
 						final String jsonContextEnrichers = gson.toJson(serviceWithContextEnrichers);
 						System.out.println(jsonContextEnrichers);
-					}
-					catch (Exception e) {
-						logger.error("Error calculating Metric for contextenrichers : "+e.getMessage());
+					} catch (Exception e) {
+						logger.error("Error calculating Metric for contextenrichers : " + e.getMessage());
 					}
 					break;
 				case "denyconditions":
-	                try {
-	                    SearchFilter policyFilter1 = new SearchFilter();
-	                    policyFilter1.setMaxRows(200);
-	                    policyFilter1.setStartIndex(0);
-	                    policyFilter1.setGetCount(true);
-	                    policyFilter1.setSortBy("serviceId");
-	                    policyFilter1.setSortType("asc");
-	                    
-	                    int denyCount = 0;
-	                    Map<String, Integer> denyconditionsonMap = new HashMap<String, Integer>();
-	                    PList<RangerServiceDef> paginatedSvcDefs = svcStore.getPaginatedServiceDefs(policyFilter1);
-	                    if(paginatedSvcDefs != null){
-	                    	List<RangerServiceDef> rangerServiceDef = paginatedSvcDefs.getList();
-	                    	if(rangerServiceDef != null && rangerServiceDef.size() > 0)
-		                    {
-		                        for(int i=0; i<rangerServiceDef.size(); i++)
-		                        {
-		                        	if(rangerServiceDef.get(i) != null){
-		                        		String serviceDef = rangerServiceDef.get(i).getName();
-		                        		if (!StringUtils.isEmpty(serviceDef)){
-		                        			policyFilter1.setParam("serviceType", serviceDef);
-		                        			PList<RangerPolicy> policiesList = svcStore.getPaginatedPolicies(policyFilter1);
-		                        			if(policiesList != null && policiesList.getListSize() > 0){
-		                        				int policyListCount = policiesList.getListSize();
-		                        				if (policyListCount > 0 && policiesList.getList() != null) {
-		                        					List<RangerPolicy> policies = policiesList.getList();
-		                        					for(int j = 0; j < policies.size(); j++){
-		                        						if(policies.get(j) != null){
-		                        							List<RangerPolicyItem> policyItem = policies.get(j).getDenyPolicyItems();
-		                        							if(policyItem != null && policyItem.size() > 0){
-		                        								if(denyconditionsonMap.get(serviceDef) != null){
-		                        									denyCount = denyconditionsonMap.get(serviceDef) + denyCount + policyItem.size();
-		                        								}else{
-		                        									denyCount = denyCount + policyItem.size();
-		                        								}
-		                        							}
-		                        							List<RangerPolicyItem> policyItemExclude = policies.get(j).getDenyExceptions();
-		                        							if(policyItemExclude != null && policyItemExclude.size() > 0){
-		                        								if(denyconditionsonMap.get(serviceDef) != null){
-		                        									denyCount = denyconditionsonMap.get(serviceDef) + denyCount + policyItemExclude.size();
-		                        								}else{
-		                        									denyCount = denyCount + policyItemExclude.size();
-		                        								}
-		                        							}
-		                        						}
-		                        					}
-		                        				}
-		            	                    }
-		                        			policyFilter1.removeParam("serviceType");
-		                        		}		        	                        
-		                        		denyconditionsonMap.put(serviceDef, denyCount);
-		                        		denyCount = 0;
-		                        	}
-		                        }
-		                    }	
-	                    }
-	                    Gson gson = new GsonBuilder().create();
-	                    String jsonContextDenyCondtionOn = gson.toJson(denyconditionsonMap);
-	                    System.out.println(jsonContextDenyCondtionOn);
-	                } catch (Exception e) {
-	                    logger.error("Error calculating Metric for denyconditions : "+ e.getMessage());
-	                }
-	                break;
+					try {
+						SearchFilter policyFilter1 = new SearchFilter();
+						policyFilter1.setMaxRows(200);
+						policyFilter1.setStartIndex(0);
+						policyFilter1.setGetCount(true);
+						policyFilter1.setSortBy("serviceId");
+						policyFilter1.setSortType("asc");
+	
+						int denyCount = 0;
+						Map<String, Integer> denyconditionsonMap = new HashMap<String, Integer>();
+						PList<RangerServiceDef> paginatedSvcDefs = svcStore.getPaginatedServiceDefs(policyFilter1);
+						if (paginatedSvcDefs != null) {
+							List<RangerServiceDef> rangerServiceDef = paginatedSvcDefs.getList();
+							if (rangerServiceDef != null && rangerServiceDef.size() > 0) {
+								for (int i = 0; i < rangerServiceDef.size(); i++) {
+									if (rangerServiceDef.get(i) != null) {
+										String serviceDef = rangerServiceDef.get(i).getName();
+										if (!StringUtils.isEmpty(serviceDef)) {
+											policyFilter1.setParam("serviceType", serviceDef);
+											PList<RangerPolicy> policiesList = svcStore.getPaginatedPolicies(policyFilter1);
+											if (policiesList != null && policiesList.getListSize() > 0) {
+												int policyListCount = policiesList.getListSize();
+												if (policyListCount > 0 && policiesList.getList() != null) {
+													List<RangerPolicy> policies = policiesList.getList();
+													for (int j = 0; j < policies.size(); j++) {
+														if (policies.get(j) != null) {
+															List<RangerPolicyItem> policyItem = policies.get(j).getDenyPolicyItems();
+															if (policyItem != null && policyItem.size() > 0) {
+																if (denyconditionsonMap.get(serviceDef) != null) {
+																	denyCount = denyconditionsonMap.get(serviceDef) + denyCount + policyItem.size();
+																} else {
+																	denyCount = denyCount + policyItem.size();
+																}
+															}
+															List<RangerPolicyItem> policyItemExclude = policies.get(j).getDenyExceptions();
+															if (policyItemExclude != null && policyItemExclude.size() > 0) {
+																if (denyconditionsonMap.get(serviceDef) != null) {
+																	denyCount = denyconditionsonMap.get(serviceDef) + denyCount + policyItemExclude.size();
+																} else {
+																	denyCount = denyCount + policyItemExclude.size();
+																}
+															}
+														}
+													}
+												}
+											}
+											policyFilter1.removeParam("serviceType");
+										}
+										denyconditionsonMap.put(serviceDef, denyCount);
+										denyCount = 0;
+									}
+								}
+							}
+						}
+						Gson gson = new GsonBuilder().create();
+						String jsonContextDenyCondtionOn = gson.toJson(denyconditionsonMap);
+						System.out.println(jsonContextDenyCondtionOn);
+					} catch (Exception e) {
+						logger.error("Error calculating Metric for denyconditions : " + e.getMessage());
+					}
+					break;
 				default:
 					System.out.println("type: Incorrect Arguments usage : -type policies | audits | usergroup | services | database | contextenrichers | denyconditions");
 					logger.info("Please enter the valid arguments for Metric Calculation");
@@ -432,78 +423,75 @@ public class MetricUtil extends BaseLoader  {
 		}		
 	}
 	
-	private  VXMetricServiceCount getVXMetricServiceCount(String serviceType) throws Exception 
-	{
+	private VXMetricServiceCount getVXMetricServiceCount(String serviceType)
+			throws Exception {
 		SearchFilter policyFilter1 = new SearchFilter();
 		policyFilter1.setMaxRows(200);
 		policyFilter1.setStartIndex(0);
 		policyFilter1.setGetCount(true);
 		policyFilter1.setSortBy("serviceId");
 		policyFilter1.setSortType("asc");
-		policyFilter1.setParam("policyType",serviceType);
+		policyFilter1.setParam("policyType", serviceType);
 		PList<RangerPolicy> policies = svcStore.getPaginatedPolicies(policyFilter1);
-		PList<RangerService> paginatedSvcsSevice = svcStore.getPaginatedServices(policyFilter1);		
-		
+		PList<RangerService> paginatedSvcsSevice = svcStore.getPaginatedServices(policyFilter1);
+
 		List<RangerService> rangerServiceList = paginatedSvcsSevice.getList();
-		
-		Map<String,Long> servicesforPolicyType = new HashMap<String,Long>();
+
+		Map<String, Long> servicesforPolicyType = new HashMap<String, Long>();
 		long tagCount = 0;
 		for (Object rangerService : rangerServiceList) {
 			RangerService rangerServiceObj = (RangerService) rangerService;
 			String serviceName = rangerServiceObj.getType();
-			if(!(servicesforPolicyType.containsKey(serviceName)))
-			{
-				policyFilter1.setParam("serviceType",serviceName);
+			if (!(servicesforPolicyType.containsKey(serviceName))) {
+				policyFilter1.setParam("serviceType", serviceName);
 				PList<RangerPolicy> policiestype = svcStore.getPaginatedPolicies(policyFilter1);
 				long count = policiestype.getTotalCount();
-				if(count != 0)
-				{
-					if(!serviceName.equalsIgnoreCase("tag")){
-						servicesforPolicyType.put(serviceName,count);
-					}
-					else{
+				if (count != 0) {
+					if (!serviceName.equalsIgnoreCase("tag")) {
+						servicesforPolicyType.put(serviceName, count);
+					} else {
 						tagCount = count;
 					}
 				}
 			}
 		}
 		VXMetricServiceCount vXMetricServiceCount = new VXMetricServiceCount();
-		vXMetricServiceCount.setServiceCountList(servicesforPolicyType);		
-		long totalCountOfPolicyType = policies.getTotalCount()-tagCount;		
+		vXMetricServiceCount.setServiceBasedCountList(servicesforPolicyType);
+		long totalCountOfPolicyType = policies.getTotalCount() - tagCount;
 		vXMetricServiceCount.setTotalCount(totalCountOfPolicyType);
 		return vXMetricServiceCount;
 	}
 	
-	private VXMetricServiceCount getAuditsCount(int accessResult, Date startDate, Date endDate) throws Exception 
-	{
+	private VXMetricServiceCount getAuditsCount(int accessResult,
+			Date startDate, Date endDate) throws Exception {
 		long totalCountOfAudits = 0;
 		SearchFilter filter = new SearchFilter();
 		filter.setStartIndex(0);
-		Map<String,Long> servicesRepoType = new HashMap<String,Long>();
+		Map<String, Long> servicesRepoType = new HashMap<String, Long>();
 		VXMetricServiceCount vXMetricServiceCount = new VXMetricServiceCount();
 		PList<RangerServiceDef> paginatedSvcDefs = svcStore.getPaginatedServiceDefs(filter);
 		Iterable<RangerServiceDef> repoTypeGet = paginatedSvcDefs.getList();
-		for (Object repo:repoTypeGet) {
-			RangerServiceDef rangerServiceDefObj = (RangerServiceDef)repo;
+		for (Object repo : repoTypeGet) {
+			RangerServiceDef rangerServiceDefObj = (RangerServiceDef) repo;
 			long id = rangerServiceDefObj.getId();
 			String serviceRepoName = rangerServiceDefObj.getName();
 			SearchCriteria searchCriteriaWithType = new SearchCriteria();
-			searchCriteriaWithType.getParamList().put("repoType",id);
+			searchCriteriaWithType.getParamList().put("repoType", id);
 			searchCriteriaWithType.getParamList().put("accessResult", accessResult);
-			searchCriteriaWithType.addParam("startDate",startDate);
-			searchCriteriaWithType.addParam("endDate",endDate);
+			searchCriteriaWithType.addParam("startDate", startDate);
+			searchCriteriaWithType.addParam("endDate", endDate);
 			VXAccessAuditList vXAccessAuditListwithType = assetMgr.getAccessLogs(searchCriteriaWithType);
 			long toltalCountOfRepo = vXAccessAuditListwithType.getTotalCount();
-			if(toltalCountOfRepo != 0)
-			{
+			if (toltalCountOfRepo != 0) {
 				servicesRepoType.put(serviceRepoName, toltalCountOfRepo);
 				totalCountOfAudits += toltalCountOfRepo;
 			}
-		}	
-		vXMetricServiceCount.setServiceCountList(servicesRepoType);
+		}
+		vXMetricServiceCount.setServiceBasedCountList(servicesRepoType);
 		vXMetricServiceCount.setTotalCount(totalCountOfAudits);
 		return vXMetricServiceCount;
 	}
+	
 	private Long getUserCountBasedOnUserRole(@SuppressWarnings("rawtypes") List userRoleList) {
 		SearchCriteria searchCriteria = new SearchCriteria();
 		searchCriteria.setStartIndex(0);

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java b/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
index 2fc3b21..89cc32f 100644
--- a/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
+++ b/security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
@@ -62,6 +62,7 @@ import org.apache.ranger.biz.ServiceDBStore;
 import org.apache.ranger.biz.ServiceMgr;
 import org.apache.ranger.biz.TagDBStore;
 import org.apache.ranger.biz.XUserMgr;
+import org.apache.ranger.common.AppConstants;
 import org.apache.ranger.common.ContextUtil;
 import org.apache.ranger.common.GUIDUtil;
 import org.apache.ranger.common.JSONUtil;
@@ -1601,6 +1602,7 @@ public class ServiceREST {
 			List<XXTrxLog> trxLogList = new ArrayList<XXTrxLog>();
 			XXTrxLog xxTrxLog = new XXTrxLog();
 			xxTrxLog.setAction("EXPORT EXCEL");
+			xxTrxLog.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 			xxTrxLog.setPreviousValue(metaDataInfo);
 			trxLogList.add(xxTrxLog);
 			bizUtil.createTrxLog(trxLogList);
@@ -1647,6 +1649,7 @@ public class ServiceREST {
 			List<XXTrxLog> trxLogList = new ArrayList<XXTrxLog>();
 			XXTrxLog xxTrxLog = new XXTrxLog();
 			xxTrxLog.setAction("EXPORT CSV");
+			xxTrxLog.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 			xxTrxLog.setPreviousValue(metaDataInfo);
 			trxLogList.add(xxTrxLog);
 			bizUtil.createTrxLog(trxLogList);
@@ -1697,6 +1700,7 @@ public class ServiceREST {
 				List<XXTrxLog> trxLogList = new ArrayList<XXTrxLog>();
 				XXTrxLog xxTrxLog = new XXTrxLog();
 				xxTrxLog.setAction("EXPORT JSON");
+				xxTrxLog.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 				xxTrxLog.setPreviousValue(metaDataInfo);
 				trxLogList.add(xxTrxLog);
 				bizUtil.createTrxLog(trxLogList);
@@ -1739,6 +1743,7 @@ public class ServiceREST {
 			List<XXTrxLog> trxLogList = new ArrayList<XXTrxLog>();
 			XXTrxLog xxTrxLog = new XXTrxLog();
 			xxTrxLog.setAction("IMPORT START");
+			xxTrxLog.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 			trxLogList.add(xxTrxLog);
 			bizUtil.createTrxLog(trxLogList);
 			
@@ -1921,6 +1926,7 @@ public class ServiceREST {
 		} catch(JsonSyntaxException ex) { 
 			LOG.error("Provided json file is not valid!!", ex);
 			xxTrxLogError.setAction("IMPORT ERROR");
+			xxTrxLogError.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 			if(StringUtils.isNotEmpty(metaDataInfo)){
 				xxTrxLogError.setPreviousValue(metaDataInfo);
 			}
@@ -1930,6 +1936,7 @@ public class ServiceREST {
 	      }catch (WebApplicationException excp) {
 			LOG.error("Error while importing policy from file!!", excp);
 			xxTrxLogError.setAction("IMPORT ERROR");
+			xxTrxLogError.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 			if(StringUtils.isNotEmpty(metaDataInfo)){
 				xxTrxLogError.setPreviousValue(metaDataInfo);
 			}
@@ -1939,6 +1946,7 @@ public class ServiceREST {
 		} catch (Throwable excp) {
 			LOG.error("Error while importing policy from file!!", excp);
 			xxTrxLogError.setAction("IMPORT ERROR");
+			xxTrxLogError.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 			if(StringUtils.isNotEmpty(metaDataInfo)){
 				xxTrxLogError.setPreviousValue(metaDataInfo);
 			}
@@ -1950,6 +1958,7 @@ public class ServiceREST {
 			List<XXTrxLog> trxLogListEnd = new ArrayList<XXTrxLog>();
 			XXTrxLog xxTrxLogEnd = new XXTrxLog();
 			xxTrxLogEnd.setAction("IMPORT END");
+			xxTrxLogEnd.setObjectClassType(AppConstants.CLASS_TYPE_RANGER_POLICY);
 			if(StringUtils.isNotEmpty(metaDataInfo)){
 				xxTrxLogEnd.setPreviousValue(metaDataInfo);
 			}

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/java/org/apache/ranger/view/VXMetricPolicyCount.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/view/VXMetricPolicyCount.java b/security-admin/src/main/java/org/apache/ranger/view/VXMetricPolicyCount.java
index ba4a8e9..bb18775 100644
--- a/security-admin/src/main/java/org/apache/ranger/view/VXMetricPolicyCount.java
+++ b/security-admin/src/main/java/org/apache/ranger/view/VXMetricPolicyCount.java
@@ -32,28 +32,27 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 public class VXMetricPolicyCount implements java.io.Serializable {
 	private static final long serialVersionUID = 1L;
 	
-	protected Map<String,VXMetricServiceCount> vXMetricServiceCount = new HashMap<String,VXMetricServiceCount>();
+	protected Map<String,VXMetricServiceCount> policyCountList = new HashMap<String,VXMetricServiceCount>();
 	protected long totalCount;
 	
 	/**
 	 * Default constructor. This will set all the attributes to default value.
 	 */
 	public VXMetricPolicyCount() {	
-	}
-	
+	}	
+
 	/**
-	 * @return the vXMetricServiceCount
+	 * @return the policyCountList
 	 */
-	public Map<String, VXMetricServiceCount> getvXMetricServiceCount() {
-		return vXMetricServiceCount;
+	public Map<String, VXMetricServiceCount> getPolicyCountList() {
+		return policyCountList;
 	}
 
 	/**
-	 * @param vXMetricServiceCount the vXMetricServiceCount to set
+	 * @param policyCountList the policyCountList to set
 	 */
-	public void setvXMetricServiceCount(
-			Map<String, VXMetricServiceCount> vXMetricServiceCount) {
-		this.vXMetricServiceCount = vXMetricServiceCount;
+	public void setPolicyCountList(Map<String, VXMetricServiceCount> policyCountList) {
+		this.policyCountList = policyCountList;
 	}
 
 	/**
@@ -74,7 +73,7 @@ public class VXMetricPolicyCount implements java.io.Serializable {
 	public String toString() {
 		return "VXMetricPolicyCount={totalCount="
 				+ totalCount +", vXMetricServiceCount=["
-				+ vXMetricServiceCount.toString()
+				+ policyCountList.toString()
 				 + "]}";
 	}
 }

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/java/org/apache/ranger/view/VXMetricServiceCount.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/view/VXMetricServiceCount.java b/security-admin/src/main/java/org/apache/ranger/view/VXMetricServiceCount.java
index 07e113e..4574b5e 100644
--- a/security-admin/src/main/java/org/apache/ranger/view/VXMetricServiceCount.java
+++ b/security-admin/src/main/java/org/apache/ranger/view/VXMetricServiceCount.java
@@ -32,7 +32,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 public class VXMetricServiceCount implements java.io.Serializable {
 	private static final long serialVersionUID = 1L;
 	
-	protected Map<String,Long> serviceCountList = new HashMap<String,Long>();
+	protected Map<String,Long> serviceBasedCountList = new HashMap<String,Long>();
 	protected Long totalCount;
 	
 	/**
@@ -42,17 +42,17 @@ public class VXMetricServiceCount implements java.io.Serializable {
 	}
 
 	/**
-	 * @return the serviceCountList
+	 * @return the serviceBasedCountList
 	 */
-	public Map<String, Long> getServiceCountList() {
-		return serviceCountList;
+	public Map<String, Long> getServiceBasedCountList() {
+		return serviceBasedCountList;
 	}
 
 	/**
-	 * @param serviceCountList the serviceCountList to set
+	 * @param serviceBasedCountList the serviceBasedCountList to set
 	 */
-	public void setServiceCountList(Map<String, Long> serviceCountList) {
-		this.serviceCountList = serviceCountList;
+	public void setServiceBasedCountList(Map<String, Long> serviceBasedCountList) {
+		this.serviceBasedCountList = serviceBasedCountList;
 	}
 
 	/**
@@ -72,6 +72,6 @@ public class VXMetricServiceCount implements java.io.Serializable {
 	@Override
 	public String toString() {
 		return "VXMetricServiceCount={total_count=" + totalCount +", services="
-			+ serviceCountList +"}";
+			+ serviceBasedCountList +"}";
 	}
 }

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/hbs.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/hbs.js b/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/hbs.js
index b207ad1..a40eb98 100644
--- a/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/hbs.js
+++ b/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/hbs.js
@@ -11,11 +11,11 @@
 define: false, process: false, window: false */
 define([
 //>>excludeStart('excludeHbs', pragmas.excludeHbs)
-'handlebars', 'underscore', 'i18nprecompile', 'json2'
+'handlebars', 'underscore', 'i18nprecompile'
 //>>excludeEnd('excludeHbs')
 ], function (
 //>>excludeStart('excludeHbs', pragmas.excludeHbs)
- Handlebars, _, precompile, JSON
+ Handlebars, _, precompile
 //>>excludeEnd('excludeHbs')
 ) {
 //>>excludeStart('excludeHbs', pragmas.excludeHbs)

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/json2.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/json2.js b/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/json2.js
deleted file mode 100644
index 02a87e8..0000000
--- a/security-admin/src/main/webapp/libs/bower/require-handlebars-plugin/js/json2.js
+++ /dev/null
@@ -1,365 +0,0 @@
-//>>excludeStart('excludeAfterBuild', pragmas.excludeAfterBuild)
-/*
-    http://www.JSON.org/json2.js
-    2011-10-19
-
-    Public Domain.
-
-    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
-
-    See http://www.JSON.org/js.html
-
-
-    This code should be minified before deployment.
-    See http://javascript.crockford.com/jsmin.html
-
-    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
-    NOT CONTROL.
-*/
-
-/*jslint evil: true, regexp: true */
-
-/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
-    call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
-    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
-    lastIndex, length, parse, prototype, push, replace, slice, stringify,
-    test, toJSON, toString, valueOf
-*/
-
-(function (window){
-
-// Create a JSON object only if one does not already exist. We create the
-// methods in a closure to avoid creating global variables.
-
-// Return the window JSON element if it exists;
-var JSON = window.JSON || {};
-
-(function () {
-    'use strict';
-
-    function f(n) {
-        // Format integers to have at least two digits.
-        return n < 10 ? '0' + n : n;
-    }
-
-    if (typeof Date.prototype.toJSON !== 'function') {
-
-        Date.prototype.toJSON = function (key) {
-
-            return isFinite(this.valueOf())
-                ? this.getUTCFullYear()     + '-' +
-                    f(this.getUTCMonth() + 1) + '-' +
-                    f(this.getUTCDate())      + 'T' +
-                    f(this.getUTCHours())     + ':' +
-                    f(this.getUTCMinutes())   + ':' +
-                    f(this.getUTCSeconds())   + 'Z'
-                : null;
-        };
-
-        String.prototype.toJSON      =
-            Number.prototype.toJSON  =
-            Boolean.prototype.toJSON = function (key) {
-                return this.valueOf();
-            };
-    }
-
-    var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-        gap,
-        indent,
-        meta = {    // table of character substitutions
-            '\b': '\\b',
-            '\t': '\\t',
-            '\n': '\\n',
-            '\f': '\\f',
-            '\r': '\\r',
-            '"' : '\\"',
-            '\\': '\\\\'
-        },
-        rep;
-
-
-    function quote(string) {
-
-// If the string contains no control characters, no quote characters, and no
-// backslash characters, then we can safely slap some quotes around it.
-// Otherwise we must also replace the offending characters with safe escape
-// sequences.
-
-        escapable.lastIndex = 0;
-        return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
-            var c = meta[a];
-            return typeof c === 'string'
-                ? c
-                : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-        }) + '"' : '"' + string + '"';
-    }
-
-
-    function str(key, holder) {
-
-// Produce a string from holder[key].
-
-        var i,          // The loop counter.
-            k,          // The member key.
-            v,          // The member value.
-            length,
-            mind = gap,
-            partial,
-            value = holder[key];
-
-// If the value has a toJSON method, call it to obtain a replacement value.
-
-        if (value && typeof value === 'object' &&
-                typeof value.toJSON === 'function') {
-            value = value.toJSON(key);
-        }
-
-// If we were called with a replacer function, then call the replacer to
-// obtain a replacement value.
-
-        if (typeof rep === 'function') {
-            value = rep.call(holder, key, value);
-        }
-
-// What happens next depends on the value's type.
-
-        switch (typeof value) {
-        case 'string':
-            return quote(value);
-
-        case 'number':
-
-// JSON numbers must be finite. Encode non-finite numbers as null.
-
-            return isFinite(value) ? String(value) : 'null';
-
-        case 'boolean':
-        case 'null':
-
-// If the value is a boolean or null, convert it to a string. Note:
-// typeof null does not produce 'null'. The case is included here in
-// the remote chance that this gets fixed someday.
-
-            return String(value);
-
-// If the type is 'object', we might be dealing with an object or an array or
-// null.
-
-        case 'object':
-
-// Due to a specification blunder in ECMAScript, typeof null is 'object',
-// so watch out for that case.
-
-            if (!value) {
-                return 'null';
-            }
-
-// Make an array to hold the partial results of stringifying this object value.
-
-            gap += indent;
-            partial = [];
-
-// Is the value an array?
-
-            if (Object.prototype.toString.apply(value) === '[object Array]') {
-
-// The value is an array. Stringify every element. Use null as a placeholder
-// for non-JSON values.
-
-                length = value.length;
-                for (i = 0; i < length; i += 1) {
-                    partial[i] = str(i, value) || 'null';
-                }
-
-// Join all of the elements together, separated with commas, and wrap them in
-// brackets.
-
-                v = partial.length === 0
-                    ? '[]'
-                    : gap
-                    ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
-                    : '[' + partial.join(',') + ']';
-                gap = mind;
-                return v;
-            }
-
-// If the replacer is an array, use it to select the members to be stringified.
-
-            if (rep && typeof rep === 'object') {
-                length = rep.length;
-                for (i = 0; i < length; i += 1) {
-                    if (typeof rep[i] === 'string') {
-                        k = rep[i];
-                        v = str(k, value);
-                        if (v) {
-                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
-                        }
-                    }
-                }
-            } else {
-
-// Otherwise, iterate through all of the keys in the object.
-
-                for (k in value) {
-                    if (Object.prototype.hasOwnProperty.call(value, k)) {
-                        v = str(k, value);
-                        if (v) {
-                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
-                        }
-                    }
-                }
-            }
-
-// Join all of the member texts together, separated with commas,
-// and wrap them in braces.
-
-            v = partial.length === 0
-                ? '{}'
-                : gap
-                ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
-                : '{' + partial.join(',') + '}';
-            gap = mind;
-            return v;
-        }
-    }
-
-// If the JSON object does not yet have a stringify method, give it one.
-
-    if (typeof JSON.stringify !== 'function') {
-        JSON.stringify = function (value, replacer, space) {
-
-// The stringify method takes a value and an optional replacer, and an optional
-// space parameter, and returns a JSON text. The replacer can be a function
-// that can replace values, or an array of strings that will select the keys.
-// A default replacer method can be provided. Use of the space parameter can
-// produce text that is more easily readable.
-
-            var i;
-            gap = '';
-            indent = '';
-
-// If the space parameter is a number, make an indent string containing that
-// many spaces.
-
-            if (typeof space === 'number') {
-                for (i = 0; i < space; i += 1) {
-                    indent += ' ';
-                }
-
-// If the space parameter is a string, it will be used as the indent string.
-
-            } else if (typeof space === 'string') {
-                indent = space;
-            }
-
-// If there is a replacer, it must be a function or an array.
-// Otherwise, throw an error.
-
-            rep = replacer;
-            if (replacer && typeof replacer !== 'function' &&
-                    (typeof replacer !== 'object' ||
-                    typeof replacer.length !== 'number')) {
-                throw new Error('JSON.stringify');
-            }
-
-// Make a fake root object containing our value under the key of ''.
-// Return the result of stringifying the value.
-
-            return str('', {'': value});
-        };
-    }
-
-
-// If the JSON object does not yet have a parse method, give it one.
-
-    if (typeof JSON.parse !== 'function') {
-        JSON.parse = function (text, reviver) {
-
-// The parse method takes a text and an optional reviver function, and returns
-// a JavaScript value if the text is a valid JSON text.
-
-            var j;
-
-            function walk(holder, key) {
-
-// The walk method is used to recursively walk the resulting structure so
-// that modifications can be made.
-
-                var k, v, value = holder[key];
-                if (value && typeof value === 'object') {
-                    for (k in value) {
-                        if (Object.prototype.hasOwnProperty.call(value, k)) {
-                            v = walk(value, k);
-                            if (v !== undefined) {
-                                value[k] = v;
-                            } else {
-                                delete value[k];
-                            }
-                        }
-                    }
-                }
-                return reviver.call(holder, key, value);
-            }
-
-
-// Parsing happens in four stages. In the first stage, we replace certain
-// Unicode characters with escape sequences. JavaScript handles many characters
-// incorrectly, either silently deleting them, or treating them as line endings.
-
-            text = String(text);
-            cx.lastIndex = 0;
-            if (cx.test(text)) {
-                text = text.replace(cx, function (a) {
-                    return '\\u' +
-                        ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-                });
-            }
-
-// In the second stage, we run the text against regular expressions that look
-// for non-JSON patterns. We are especially concerned with '()' and 'new'
-// because they can cause invocation, and '=' because it can cause mutation.
-// But just to be safe, we want to reject all unexpected forms.
-
-// We split the second stage into 4 regexp operations in order to work around
-// crippling inefficiencies in IE's and Safari's regexp engines. First we
-// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
-// replace all simple value tokens with ']' characters. Third, we delete all
-// open brackets that follow a colon or comma or that begin the text. Finally,
-// we look to see that the remaining characters are only whitespace or ']' or
-// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
-
-            if (/^[\],:{}\s]*$/
-                    .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
-                        .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
-                        .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-
-// In the third stage we use the eval function to compile the text into a
-// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
-// in JavaScript: it can begin a block or an object literal. We wrap the text
-// in parens to eliminate the ambiguity.
-
-                j = eval('(' + text + ')');
-
-// In the optional fourth stage, we recursively walk the new structure, passing
-// each name/value pair to a reviver function for possible transformation.
-
-                return typeof reviver === 'function'
-                    ? walk({'': j}, '')
-                    : j;
-            }
-
-// If the text is not JSON parseable, then a SyntaxError is thrown.
-
-            throw new SyntaxError('JSON.parse');
-        };
-    }
-}());
-
-define(function(){
-    return JSON;
-});
-// otherwise just leave it alone
-    
-}).call(this, this);
-//>>excludeEnd('excludeAfterBuild')

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/Init.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/Init.js b/security-admin/src/main/webapp/scripts/Init.js
index 9b22ba5..c388a79 100644
--- a/security-admin/src/main/webapp/scripts/Init.js
+++ b/security-admin/src/main/webapp/scripts/Init.js
@@ -146,7 +146,6 @@
         'handlebars'				: '../libs/bower/require-handlebars-plugin/js/Handlebars',
         /* require handlebars plugin - Alex Sexton */
         'i18nprecompile'			: '../libs/bower/require-handlebars-plugin/js/i18nprecompile',
-        'json2'						: '../libs/bower/require-handlebars-plugin/js/json2',
         'hbs'						: '../libs/bower/require-handlebars-plugin/js/hbs',
         'esprima'					: '../libs/bower/esprima/esprima',
 

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/models/VXGroup.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXGroup.js b/security-admin/src/main/webapp/scripts/models/VXGroup.js
index d6725a1..ca13a6b 100644
--- a/security-admin/src/main/webapp/scripts/models/VXGroup.js
+++ b/security-admin/src/main/webapp/scripts/models/VXGroup.js
@@ -69,7 +69,7 @@ define(function(require){
 				name : {
 					type		: 'TextFiledWithIcon',
 					title		: localization.tt("lbl.groupName") +' *',
-					validators  : ['required',{type:'regexp',regexp:/^([A-Za-z0-9]|[\u00C0-\u017F])([a-z0-9,._\-+/@= ]|[\u00C0-\u017F])+$/i,message :' Invalid group name'}],
+					validators  : ['required',{type:'regexp',regexp:/^([A-Za-z0-9_]|[\u00C0-\u017F])([a-z0-9,._\-+/@= ]|[\u00C0-\u017F])+$/i,message :' Invalid group name'}],
                     editorAttrs : { 'maxlength': 255},
                     errorMsg    : localization.tt('validationMessages.groupNameValidationMsg'),
 				},

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXPortalUser.js b/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
index b0fe69f..a99e2c4 100644
--- a/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
+++ b/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
@@ -49,7 +49,7 @@ define(function(require){
 				firstName : {
 					type		: 'TextFiledWithIcon',
 					title		: localization.tt("lbl.firstName")+' *',
-					validators  : ['required',{type:'regexp',regexp:/^([a-zA-Z0-9]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i,message :'Invalid first name.'}],
+					validators  : ['required',{type:'regexp',regexp:/^([a-zA-Z0-9_]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i,message :'Invalid first name.'}],
 					editorAttrs : { 'placeholder' : localization.tt("lbl.firstName")},
 					errorMsg    :localization.tt('validationMessages.firstNameValidationMsg'),
 					
@@ -57,7 +57,7 @@ define(function(require){
 				lastName : {
 					type		: 'TextFiledWithIcon',
 					title		: localization.tt("lbl.lastName"),
-					validators  : ['required',{type:'regexp',regexp:/^([a-zA-Z0-9]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i,message :'Invalid last name.'}],
+					validators  : ['required',{type:'regexp',regexp:/^([a-zA-Z0-9_]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i,message :'Invalid last name.'}],
 					editorAttrs : { 'placeholder' : localization.tt("lbl.lastName")},
 					errorMsg    :localization.tt('validationMessages.lastNameValidationMsg'),
 				},

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
index 55024d1..86b4cdd 100644
--- a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
+++ b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
@@ -413,10 +413,10 @@ define(function(require) {
 				emailIdError           : 'Please enter valid email address.',
 				enterValidName         : 'Please enter valid name.',
 				passwordError          :'Password should be minimum 8 characters with min one alphabet and one numeric.',
-				userNameValidationMsg  :'1. User name should be start with alphabet/numeric/non-us characters.<br> 2. Allowed special character ._\-+/@= and space. <br>3. Name length should be greater than one.',
-				groupNameValidationMsg :'1. Group name should be start with alphabet/numeric/non-us characters.<br> 2. Allowed special character ._\-+/@= and space. <br>3. Name length should be greater than one.',
-				firstNameValidationMsg :'1. First name should be start with alphabet/numeric/non-us characters.<br> 2. Allowed special character ._- and space. <br>3. Name length should be greater than one.',
-				lastNameValidationMsg  :'1. Last name should be start with alphabet/numeric/non-us characters.<br> 2. Allowed special character ._- and space. <br>3. Name length should be greater than one.',
+				userNameValidationMsg  :'1. User name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ,._\-+/@= and space. <br>3. Name length should be greater than one.',
+				groupNameValidationMsg :'1. Group name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ,._\-+/@= and space. <br>3. Name length should be greater than one.',
+				firstNameValidationMsg :'1. First name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ._- and space. <br>3. Name length should be greater than one.',
+				lastNameValidationMsg  :'1. Last name should be start with alphabet / numeric / underscore / non-us characters.<br> 2. Allowed special character ._- and space. <br>3. Name length should be greater than one.',
 			},
 			serverMsg : {
 				

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js b/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
index 967094c..eb65283 100644
--- a/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
+++ b/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
@@ -45,7 +45,7 @@ function doLogin() {
 	}
 
 	var regexEmail = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
-	var regexPlain = /^([A-Za-z0-9]|[\u00C0-\u017F])([a-z0-9,._\-+/@= ]|[\u00C0-\u017F])+$/i;
+	var regexPlain = /^([A-Za-z0-9_]|[\u00C0-\u017F])([a-z0-9,._\-+/@= ]|[\u00C0-\u017F])+$/i;
 	
 	if(!regexPlain.test(userName)){
 		if(!regexEmail.test(userName)){

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
index 8b3582d..b3a91d4 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
@@ -628,18 +628,16 @@ define(function(require) {
 			}).on('click', function(e) {
 				e.stopPropagation();
 				e.preventDefault();
-//				that.clickOnMaskingType(that);
 			});
 			that.ui.addMaskingTypeSpan.click(function(e) {
 				e.stopPropagation();
 				that.$('a[data-js="maskingType"]').editable('toggle');
-//				that.clickOnMaskingType(that);
 			});
 			this.$el.find('input[data-id="maskTypeCustom"]').on('change', function(e){
 				if(!_.isUndefined(that.model.get('dataMaskInfo'))){
 					that.model.get('dataMaskInfo').valueExpr = e.currentTarget.value;
 				}
-			});
+			}).trigger('change');
 		},
 		renderRowLevelFilter :function(){
 			var that = this;

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
index 111d62b..6221149 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
@@ -413,7 +413,7 @@ define(function(require) {
 										callback(auditList);
 										break;
 									case 'Actions':
-										callback(["create","update","delete","password change"]);
+										callback(["Create","Update","Delete","Password Change","Export Json","Export Csv","Export Excel","Import End","Import Start"]);
 										break;
 									case 'Start Date' :
 											var endDate, models = that.visualSearch.searchQuery.where({category:"End Date"});
@@ -603,10 +603,10 @@ define(function(require) {
 						XAUtils.blockUI('unblock');
 						fullTrxLogListForTrxId = new VXTrxLogList(coll.vXTrxLogs);
 						//diff view to support new plugable service model
-						if(self.model.get('objectClassType') == XAEnums.ClassTypes.CLASS_TYPE_NONE.value){
+						var hasAction = ["EXPORT JSON", "EXPORT EXCEL", "EXPORT CSV", "IMPORT START", "IMPORT END"];
+						if(self.model.get('objectClassType') == XAEnums.ClassTypes.CLASS_TYPE_RANGER_POLICY.value && ($.inArray(action,hasAction) >= 0)){
 							var view  = that.getExportImportTemplate(fullTrxLogListForTrxId);
-						}
-						else if(self.model.get('objectClassType') == XAEnums.ClassTypes.CLASS_TYPE_RANGER_POLICY.value){
+						} else if(self.model.get('objectClassType') == XAEnums.ClassTypes.CLASS_TYPE_RANGER_POLICY.value){
 							var view = new vPlugableServiceDiffDetail({
 								collection : fullTrxLogListForTrxId,
 								classType : self.model.get('objectClassType'),
@@ -711,24 +711,28 @@ define(function(require) {
 						fromRaw: function (rawValue, model) {
 							rawValue = model.get('objectClassType');
 							var action = model.get('action'), name = _.escape(model.get('objectName')),
-								label = XAUtils.enumValueToLabel(XAEnums.ClassTypes,rawValue), html = '';
-							if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_ASSET.value || rawValue == XAEnums.ClassTypes.CLASS_TYPE_RANGER_SERVICE.value)
-								html = 	'Service '+action+'d '+'<b>'+name+'</b>';
-							else if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_RESOURCE.value || rawValue == XAEnums.ClassTypes.CLASS_TYPE_RANGER_POLICY.value)
-								html = 	'Policy '+action+'d '+'<b>'+name+'</b>';
-							else if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_USER.value)
-								html = 	'User '+action+'d '+'<b>'+name+'</b>';
-							else if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_GROUP.value)
-								html = 	'Group '+action+'d '+'<b>'+name+'</b>';
-							else if(rawValue  == XAEnums.ClassTypes.CLASS_TYPE_USER_PROFILE.value)
-								html = 	'User profile '+action+'d '+'<b>'+name+'</b>';
-							else if(rawValue  == XAEnums.ClassTypes.CLASS_TYPE_PASSWORD_CHANGE.value)
-								html = 	'User profile '+action+'d '+'<b>'+name+'</b>';
-							else if(action == "EXPORT JSON" || action == "EXPORT EXCEL" || action == "EXPORT CSV")
-								html = 	'Exported policies';
-							else
-								html = 	action;
-							return html;
+								label = XAUtils.enumValueToLabel(XAEnums.ClassTypes,rawValue), html = '',
+								hasAction = ["EXPORT JSON", "EXPORT EXCEL", "EXPORT CSV", "IMPORT START", "IMPORT END"];
+							if($.inArray(action,hasAction)>=0){
+								if(action == "EXPORT JSON" || action == "EXPORT EXCEL" || action == "EXPORT CSV")
+									return html = 	'Exported policies';
+								else
+									return html = 	action;
+							} else{	
+								 if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_ASSET.value || rawValue == XAEnums.ClassTypes.CLASS_TYPE_RANGER_SERVICE.value)
+								 	 html = 	'Service '+action+'d '+'<b>'+name+'</b>';
+								 else if((rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_RESOURCE.value || rawValue == XAEnums.ClassTypes.CLASS_TYPE_RANGER_POLICY.value))
+									 html = 	'Policy '+action+'d '+'<b>'+name+'</b>';
+								 else if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_USER.value)
+									 html = 	'User '+action+'d '+'<b>'+name+'</b>';
+								 else if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_GROUP.value)
+									 html = 	'Group '+action+'d '+'<b>'+name+'</b>';
+								 else if(rawValue  == XAEnums.ClassTypes.CLASS_TYPE_USER_PROFILE.value)
+									 html = 	'User profile '+action+'d '+'<b>'+name+'</b>';
+								 else if(rawValue  == XAEnums.ClassTypes.CLASS_TYPE_PASSWORD_CHANGE.value)
+									 html = 	'User profile '+action+'d '+'<b>'+name+'</b>';
+								 return html;
+						    }
 						}
 					})
 				},
@@ -742,10 +746,6 @@ define(function(require) {
 					formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
 						fromRaw: function (rawValue, model) {
 							var action = model.get('action');
-							var hasAction = ["EXPORT JSON", "EXPORT EXCEL", "EXPORT CSV", "IMPORT START", "IMPORT END"]
-							if($.inArray(action,hasAction) >= 0){
-								rawValue = XAEnums.ClassTypes.CLASS_TYPE_RANGER_POLICY.value
-							}
 							return XAUtils.enumValueToLabel(XAEnums.ClassTypes,rawValue);
 						}
 					})
@@ -783,13 +783,14 @@ define(function(require) {
 						fromRaw: function (rawValue) {
 							var html = '';
 							if(rawValue =='create'){
-								html = 	'<label class="label label-success">'+rawValue+'</label>';
+								html = 	'<label class="label label-success capitalize">'+rawValue+'</label>';
 							} else if(rawValue == 'update'){
-								html = 	'<label class="label label-yellow">'+rawValue+'</label>';
+								html = 	'<label class="label label-yellow capitalize">'+rawValue+'</label>';
 							}else if(rawValue == 'delete'){
-								html = 	'<label class="label label-important">'+rawValue+'</label>';
+								html = 	'<label class="label label-important capitalize">'+rawValue+'</label>';
 							} else {
-								html = 	'<label class="label">'+rawValue+'</label>';
+								rawValue = rawValue.toLowerCase() 
+								html = 	'<label class="label capitalize ">'+rawValue+'</label>';
 							}
 							return html;
 						}

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js b/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
index 0788a4e..9ec7e91 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
@@ -106,7 +106,6 @@ define(function(require){
 			}
 			if(!_.isUndefined(this.collection.models[0]) ){
 				this.policyName = _.isUndefined(this.policyName) ? this.collection.models[0].get('objectName') : this.policyName;
-				if(this.action != 'delete'){
 					var rangerService = new RangerService({ 'id' : this.collection.models[0].get('parentObjectId') })
 					rangerService.fetch({
 						cache : false,
@@ -121,8 +120,6 @@ define(function(require){
 						})
 						this.repositoryType = this.rangerServiceDefModel.get('name');
 					}
-				}
-				
 				//get policy created/updated date/owner
 				var model = this.collection.models[0];
 				this.objectCreatedBy = model.get('updatedBy');

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/views/users/GroupForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/users/GroupForm.js b/security-admin/src/main/webapp/scripts/views/users/GroupForm.js
index 1ff39bb..0c6ef5b 100644
--- a/security-admin/src/main/webapp/scripts/views/users/GroupForm.js
+++ b/security-admin/src/main/webapp/scripts/views/users/GroupForm.js
@@ -57,7 +57,7 @@ define(function(require){
 			this.initializePlugins();
 			if(!this.model.isNew()){
 				if(!_.isUndefined(this.model.get('groupSource')) && this.model.get('groupSource') == XAEnums.GroupSource.XA_GROUP.value){
-					this.fields.name.editor.$el.attr('disabled',true);
+					this.fields.name.editor.$el.find('input').attr('disabled',true);
 					this.fields.description.editor.$el.attr('disabled',true);
 				}
 			}

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/scripts/views/users/UserForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/users/UserForm.js b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
index 9422c7e..e7184d0 100644
--- a/security-admin/src/main/webapp/scripts/views/users/UserForm.js
+++ b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
@@ -65,7 +65,7 @@ define(function(require){
 				name : {
 					type		: 'TextFiledWithIcon',
 					title		: localization.tt("lbl.userName") +' *',
-					validators  : ['required',{type:'regexp',regexp:/^([A-Za-z0-9]|[\u00C0-\u017F])([a-z0-9,._\-+/@= ]|[\u00C0-\u017F])+$/i, 
+					validators  : ['required',{type:'regexp',regexp:/^([A-Za-z0-9_]|[\u00C0-\u017F])([a-z0-9,._\-+/@= ]|[\u00C0-\u017F])+$/i, 
 						            message :' Invalid user name'}],
 					editorAttrs : {'maxlength': 255},
 			        errorMsg    :localization.tt('validationMessages.userNameValidationMsg')
@@ -89,14 +89,14 @@ define(function(require){
 				firstName : { 
 					type		: 'TextFiledWithIcon',
 					title		: localization.tt("lbl.firstName")+' *',
-					validators  : ['required',{type:'regexp',regexp:/^([A-Za-z0-9]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i, 
+					validators  : ['required',{type:'regexp',regexp:/^([A-Za-z0-9_]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i, 
 						            message :' Invalid first name'}],
 					errorMsg    :localization.tt('validationMessages.firstNameValidationMsg'),
 				},
 				lastName : { 
 					type		: 'TextFiledWithIcon',
 					title		: localization.tt("lbl.lastName"),
-					validators  : [{type:'regexp',regexp:/^([A-Za-z0-9]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i, 
+					validators  : [{type:'regexp',regexp:/^([A-Za-z0-9_]|[\u00C0-\u017F])([a-zA-Z0-9\s_. -]|[\u00C0-\u017F])+$/i, 
 						            message :' Invalid last name'}],
 					errorMsg    :localization.tt('validationMessages.lastNameValidationMsg'),
 				},

http://git-wip-us.apache.org/repos/asf/ranger/blob/e3b0ce2d/security-admin/src/main/webapp/styles/xa.css
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/styles/xa.css b/security-admin/src/main/webapp/styles/xa.css
index 5ac5255..7a5ec2e 100644
--- a/security-admin/src/main/webapp/styles/xa.css
+++ b/security-admin/src/main/webapp/styles/xa.css
@@ -2138,3 +2138,6 @@ td.subgrid-custom-cell{
 .margin-left-75{
     margin-left:75px
 }
+.capitalize {
+    text-transform: capitalize;   
+}


Mime
View raw message