Skip to content

Commit 232df43

Browse files
committed
add option to cross check versions
1 parent 7c041f9 commit 232df43

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ui/public/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,6 @@
9797
"basicZoneEnabled": true,
9898
"multipleServer": false,
9999
"allowSettingTheme": true,
100-
"docHelpMappings": {}
100+
"docHelpMappings": {},
101+
"notifyLatestCSVersion": true
101102
}

ui/src/store/modules/user.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ const user = {
317317
const result = response.listusersresponse.user[0]
318318
commit('SET_INFO', result)
319319
commit('SET_NAME', result.firstname + ' ' + result.lastname)
320-
store.dispatch('SetCsLatestVersion', result.rolename)
321320
resolve(cachedApis)
322321
}).catch(error => {
323322
reject(error)
@@ -390,6 +389,7 @@ const user = {
390389
const result = response.listusersresponse.user[0]
391390
commit('SET_INFO', result)
392391
commit('SET_NAME', result.firstname + ' ' + result.lastname)
392+
store.dispatch('SetCsLatestVersion', result.rolename)
393393
}).catch(error => {
394394
reject(error)
395395
})
@@ -555,6 +555,9 @@ const user = {
555555
commit('SET_DOMAIN_STORE', domainStore)
556556
},
557557
SetCsLatestVersion ({ commit }, rolename) {
558+
if (!config.notifyLatestCSVersion) {
559+
return
560+
}
558561
const lastFetchTs = store.getters.latestVersion?.fetchedTs ? store.getters.latestVersion.fetchedTs : 0
559562
if (rolename === 'Root Admin' && (+new Date() - lastFetchTs) > 24 * 60 * 60 * 1000) {
560563
axios.get(

0 commit comments

Comments
 (0)