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

madhan 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 5051ecca0 RANGER-5332: upgrade axios version 1.8.4 to latest 1.12.2 
(#776)
5051ecca0 is described below

commit 5051ecca046af51a33ab6dc19d615f0395d3fabd
Author: Dhaval Rajpara <[email protected]>
AuthorDate: Sat Jan 3 00:01:41 2026 +0530

    RANGER-5332: upgrade axios version 1.8.4 to latest 1.12.2 (#776)
    
    Co-authored-by: Dhaval Rajpara <[email protected]>
---
 .../src/main/webapp/react-webapp/package-lock.json | 18 +++++++--------
 .../src/main/webapp/react-webapp/package.json      |  2 +-
 .../src/main/webapp/react-webapp/src/App.jsx       | 27 ++++++++++++++--------
 3 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/security-admin/src/main/webapp/react-webapp/package-lock.json 
b/security-admin/src/main/webapp/react-webapp/package-lock.json
index 03b649397..37e1883ef 100644
--- a/security-admin/src/main/webapp/react-webapp/package-lock.json
+++ b/security-admin/src/main/webapp/react-webapp/package-lock.json
@@ -12,7 +12,7 @@
         "@babel/core": "^7.13.16",
         "@babel/preset-env": "^7.14.2",
         "@babel/preset-react": "^7.13.13",
-        "axios": "^1.8.4",
+        "axios": "^1.12.2",
         "babel-loader": "^8.2.2",
         "bootstrap": "^5.3.2",
         "bootstrap-switch-button-react": "^1.2.0",
@@ -2714,14 +2714,14 @@
       "dev": true
     },
     "node_modules/axios": {
-      "version": "1.8.4",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz";,
-      "integrity": 
"sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz";,
+      "integrity": 
"sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "follow-redirects": "^1.15.6",
-        "form-data": "^4.0.0",
+        "form-data": "^4.0.4",
         "proxy-from-env": "^1.1.0"
       }
     },
@@ -9687,13 +9687,13 @@
       "dev": true
     },
     "axios": {
-      "version": "1.8.4",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz";,
-      "integrity": 
"sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz";,
+      "integrity": 
"sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
       "dev": true,
       "requires": {
         "follow-redirects": "^1.15.6",
-        "form-data": "^4.0.0",
+        "form-data": "^4.0.4",
         "proxy-from-env": "^1.1.0"
       }
     },
diff --git a/security-admin/src/main/webapp/react-webapp/package.json 
b/security-admin/src/main/webapp/react-webapp/package.json
index bd0a69723..a4a40e107 100644
--- a/security-admin/src/main/webapp/react-webapp/package.json
+++ b/security-admin/src/main/webapp/react-webapp/package.json
@@ -20,7 +20,7 @@
     "@babel/core": "^7.13.16",
     "@babel/preset-env": "^7.14.2",
     "@babel/preset-react": "^7.13.13",
-    "axios": "^1.8.4",
+    "axios": "^1.12.2",
     "babel-loader": "^8.2.2",
     "bootstrap": "^5.3.2",
     "bootstrap-switch-button-react": "^1.2.0",
diff --git a/security-admin/src/main/webapp/react-webapp/src/App.jsx 
b/security-admin/src/main/webapp/react-webapp/src/App.jsx
index 501daab3f..3ca9e886f 100755
--- a/security-admin/src/main/webapp/react-webapp/src/App.jsx
+++ b/security-admin/src/main/webapp/react-webapp/src/App.jsx
@@ -21,7 +21,12 @@ import React, { Suspense, lazy, Component } from "react";
 import { Route, Routes, HashRouter } from "react-router-dom";
 import { ToastContainer } from "react-toastify";
 import axios from "axios";
-import { hasAccessToTab, isUser } from "Utils/XAUtils";
+import {
+  hasAccessToTab,
+  isUser,
+  isSystemAdmin,
+  isAuditor
+} from "Utils/XAUtils";
 import ErrorBoundary from "Views/ErrorBoundary";
 import ErrorPage from "Views/ErrorPage";
 import { CommonScrollButton, Loader } from "Components/CommonComponents";
@@ -214,15 +219,17 @@ export default class App extends Component {
       );
     }
 
-    try {
-      let resp = await fetchApi({
-        url: `plugins/definitions/name/gds`
-      });
-      gdsServiceDef = resp.data;
-    } catch (error) {
-      console.error(
-        `Error occurred while fetching GDS Service Definition or CSRF headers! 
${error}`
-      );
+    if (isUser() || isSystemAdmin() || isAuditor()) {
+      try {
+        let resp = await fetchApi({
+          url: `plugins/definitions/name/gds`
+        });
+        gdsServiceDef = resp.data;
+      } catch (error) {
+        console.error(
+          `Error occurred while fetching GDS Service Definition or CSRF 
headers! ${error}`
+        );
+      }
     }
 
     setServiceDef(

Reply via email to