You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by rm...@apache.org on 2024/11/07 07:25:47 UTC

(ranger) branch master updated: RANGER-4984: Ranger Federated User enum order should be correct to avoid potential failure in Ranger Admin

This is an automated email from the ASF dual-hosted git repository.

rmani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 349373805 RANGER-4984: Ranger Federated User enum order should be correct to avoid potential failure in Ranger Admin
349373805 is described below

commit 349373805620bfdce761d89d4fe0f9f23f3022d3
Author: Ramesh Mani <rm...@apache.org>
AuthorDate: Wed Nov 6 08:03:14 2024 -0800

    RANGER-4984: Ranger Federated User enum order should be correct to avoid potential failure in Ranger Admin
---
 .../java/org/apache/ranger/common/RangerCommonEnums.java     | 12 ++++++------
 .../src/main/webapp/react-webapp/src/utils/XAEnums.js        |  2 +-
 security-admin/src/main/webapp/scripts/utils/XAEnums.js      |  3 ++-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/security-admin/src/main/java/org/apache/ranger/common/RangerCommonEnums.java b/security-admin/src/main/java/org/apache/ranger/common/RangerCommonEnums.java
index ad40b3077..0234e47bb 100644
--- a/security-admin/src/main/java/org/apache/ranger/common/RangerCommonEnums.java
+++ b/security-admin/src/main/java/org/apache/ranger/common/RangerCommonEnums.java
@@ -480,12 +480,12 @@ public class RangerCommonEnums {
 	 */
 	public static final int USER_APP = 0;
 	public static final int USER_EXTERNAL = 1;
-	public static final int USER_FEDERATED= 2;
-	public static final int USER_AD= 3;
-	public static final int USER_LDAP = 4;
-	public static final int USER_UNIX = 5;
-	public static final int USER_REPO = 6;
-	
+	public static final int USER_AD = 2;
+	public static final int USER_LDAP = 3;
+	public static final int USER_UNIX = 4;
+	public static final int USER_REPO = 5;
+	public static final int USER_FEDERATED = 6;
+
 	public static final int GROUP_INTERNAL = 0;
 	public static final int GROUP_EXTERNAL = 1;
 	public static final int GROUP_AD= 2;
diff --git a/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js b/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js
index d66514614..b79099a95 100755
--- a/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js
+++ b/security-admin/src/main/webapp/react-webapp/src/utils/XAEnums.js
@@ -69,7 +69,7 @@ export const UserTypes = {
     variant: "warning"
   },
   USER_FEDERATED: {
-    value: 2,
+    value: 6,
     label: "Federated",
     variant: "secondary"
   }
diff --git a/security-admin/src/main/webapp/scripts/utils/XAEnums.js b/security-admin/src/main/webapp/scripts/utils/XAEnums.js
index 9041908c6..f81fa1619 100644
--- a/security-admin/src/main/webapp/scripts/utils/XAEnums.js
+++ b/security-admin/src/main/webapp/scripts/utils/XAEnums.js
@@ -64,7 +64,8 @@ define(function(require) {
 	
 	XAEnums.UserTypes = mergeParams(XAEnums.UserTypes, {
 		USER_INTERNAL:{value:0, label:'Internal', rbkey:'xa.enum.AccessResult.ACCESS_RESULT_ALLOWED', tt: 'lbl.AccessResult_ACCESS_RESULT_ALLOWED'},
-		USER_EXTERNAL:{value:1, label:'External', rbkey:'xa.enum.AccessResult.ACCESS_RESULT_DENIED', tt: 'lbl.AccessResult_ACCESS_RESULT_DENIED'}
+		USER_EXTERNAL:{value:1, label:'External', rbkey:'xa.enum.AccessResult.ACCESS_RESULT_DENIED', tt: 'lbl.AccessResult_ACCESS_RESULT_DENIED'},
+		USER_FEDERATED:{value:6, label:'Federated', rbkey:'xa.enum.AccessResult.ACCESS_RESULT_DENIED', tt: 'lbl.AccessResult_ACCESS_RESULT_DENIED'}
 	});
 	
 	XAEnums.GroupTypes = mergeParams(XAEnums.GroupTypes, {