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

weizhou pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 270d3f9a2da UI: Deal with crosssite api call after login (#10533)
270d3f9a2da is described below

commit 270d3f9a2da79319637738a32fb0d04f5df8c96c
Author: dahn <[email protected]>
AuthorDate: Wed Oct 8 10:42:00 2025 +0200

    UI: Deal with crosssite api call after login (#10533)
---
 ui/public/config.json        | 3 ++-
 ui/src/store/modules/user.js | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ui/public/config.json b/ui/public/config.json
index 38d1fd9bbe7..64d10284186 100644
--- a/ui/public/config.json
+++ b/ui/public/config.json
@@ -97,5 +97,6 @@
   "basicZoneEnabled": true,
   "multipleServer": false,
   "allowSettingTheme": true,
-  "docHelpMappings": {}
+  "docHelpMappings": {},
+  "notifyLatestCSVersion": true
 }
diff --git a/ui/src/store/modules/user.js b/ui/src/store/modules/user.js
index 5c9dff69f96..fc1b0dc25a9 100644
--- a/ui/src/store/modules/user.js
+++ b/ui/src/store/modules/user.js
@@ -317,7 +317,6 @@ const user = {
             const result = response.listusersresponse.user[0]
             commit('SET_INFO', result)
             commit('SET_NAME', result.firstname + ' ' + result.lastname)
-            store.dispatch('SetCsLatestVersion', result.rolename)
             resolve(cachedApis)
           }).catch(error => {
             reject(error)
@@ -564,6 +563,9 @@ const user = {
       commit('SET_DOMAIN_STORE', domainStore)
     },
     SetCsLatestVersion ({ commit }, rolename) {
+      if (!vueProps.$config.notifyLatestCSVersion) {
+        return
+      }
       const lastFetchTs = store.getters.latestVersion?.fetchedTs ? 
store.getters.latestVersion.fetchedTs : 0
       if (rolename === 'Root Admin' && (+new Date() - lastFetchTs) > 24 * 60 * 
60 * 1000) {
         axios.get(

Reply via email to