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

dhavaljrajpara pushed a commit to branch RANGER-5860
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit d07edb923efad40785cc9ddfbf4dc083080cce0f
Author: Dhaval Rajpara <[email protected]>
AuthorDate: Wed Oct 28 19:50:23 2026 +0530

    RANGER-5852 : Added policy listing page for contraint type policy
---
 .../main/webapp/react-webapp/src/utils/XAUtils.js    |  2 +-
 .../src/views/PolicyListing/PolicyListing.jsx        |  3 ++-
 .../src/views/PolicyListing/PolicyListingTabView.jsx | 20 ++++++++++++++++----
 3 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js 
b/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js
index 9d4c2e5bf..66d4c14d4 100644
--- a/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js
+++ b/security-admin/src/main/webapp/react-webapp/src/utils/XAUtils.js
@@ -130,7 +130,7 @@ export const getSupportedPolicyTypes = (serviceDef) => {
       RangerPolicyType.RANGER_ROW_FILTER_POLICY_TYPE.value
     );
   }
-  if (isRenderConstraint(serviceDef?.constraintDef)) {
+  if (isRenderConstraint(serviceDef?.constraintDefs)) {
     supportedPolicyTypes.push(
       RangerPolicyType.RANGER_CONSTRAINT_POLICY_TYPE.value
     );
diff --git 
a/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx
 
b/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx
index 8cd7c52bc..90af4d19d 100644
--- 
a/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx
+++ 
b/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListing.jsx
@@ -343,7 +343,8 @@ function PolicyListing(props) {
       try {
         const response = await fetchApi({
           url: `plugins/policies/service/${serviceId}`,
-          params: params
+          params: params,
+          skipNavigate: true
         });
         policyData = response.data?.policies || [];
         totalCount = response.data?.totalCount || 0;
diff --git 
a/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListingTabView.jsx
 
b/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListingTabView.jsx
index 964c51355..a6b707c2f 100644
--- 
a/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListingTabView.jsx
+++ 
b/security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/PolicyListingTabView.jsx
@@ -28,7 +28,8 @@ import {
   isKeyAdmin,
   isKMSAuditor,
   updateTagActive,
-  getSupportedPolicyTypes
+  getSupportedPolicyTypes,
+  isRenderConstraint
 } from "Utils/XAUtils";
 import { Loader } from "Components/CommonComponents";
 import TopNavBar from "../SideBar/TopNavBar";
@@ -242,9 +243,9 @@ export const PolicyListingTabView = () => {
       />
       {loader ? (
         <Loader />
-      ) : (isRenderMasking(serviceDefData.dataMaskDef) ||
-          isRenderRowFilter(serviceDefData.rowFilterDef)) &&
-        params.policyType < 3 ? (
+      ) : isRenderMasking(serviceDefData.dataMaskDef) ||
+        isRenderRowFilter(serviceDefData.rowFilterDef) ||
+        isRenderConstraint(serviceDefData.constraintDefs) ? (
         <Tabs
           id="PolicyListing"
           activeKey={params.policyType}
@@ -281,6 +282,17 @@ export const PolicyListingTabView = () => {
               )}
             </Tab>
           )}
+          {isRenderConstraint(serviceDefData.constraintDefs) && (
+            <Tab eventKey="4" title="Constraint">
+              {params.policyType == "4" && (
+                <PolicyListing
+                  serviceDef={serviceDefData}
+                  serviceData={serviceData}
+                  serviceZone={getServiceZone()}
+                />
+              )}
+            </Tab>
+          )}
         </Tabs>
       ) : (
         <PolicyListing

Reply via email to