File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,17 @@ const user = {
311311 commit ( 'SET_TIMEZONE_OFFSET' , cachedTimezoneOffset )
312312 commit ( 'SET_USE_BROWSER_TIMEZONE' , cachedUseBrowserTimezone )
313313 commit ( 'SET_CUSTOM_COLUMNS' , cachedCustomColumns )
314+
315+ // Ensuring we get the user info so that store.getters.user is never empty when the page is freshly loaded
316+ api ( 'listUsers' , { username : Cookies . get ( 'username' ) , listall : true } ) . then ( response => {
317+ const result = response . listusersresponse . user [ 0 ]
318+ commit ( 'SET_INFO' , result )
319+ commit ( 'SET_NAME' , result . firstname + ' ' + result . lastname )
320+ store . dispatch ( 'SetCsLatestVersion' , result . rolename )
321+ resolve ( cachedApis )
322+ } ) . catch ( error => {
323+ reject ( error )
324+ } )
314325 } else if ( store . getters . loginFlag ) {
315326 const hide = message . loading ( i18n . global . t ( 'message.discovering.feature' ) , 0 )
316327 api ( 'listZones' ) . then ( json => {
You can’t perform that action at this time.
0 commit comments