You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2024/06/12 11:49:28 UTC

(cloudstack) branch 4.19 updated: ui: fix dashboard on saml user login (#9097)

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

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


The following commit(s) were added to refs/heads/4.19 by this push:
     new e2e46e31087 ui: fix dashboard on saml user login (#9097)
e2e46e31087 is described below

commit e2e46e31087ea6c5993758ac0edf734267fcbfb7
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Wed Jun 12 17:19:21 2024 +0530

    ui: fix dashboard on saml user login (#9097)
    
    * ui: fix dashboard on saml user login
    
    Fixes #8950
    Fixes #9045
    
    Signed-off-by: Abhishek Kumar <ab...@gmail.com>
    
    * Update ui/src/permission.js
    
    ---------
    
    Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
 ui/src/permission.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ui/src/permission.js b/ui/src/permission.js
index 6db690f6e6a..4380c7660d8 100644
--- a/ui/src/permission.js
+++ b/ui/src/permission.js
@@ -112,7 +112,11 @@ router.beforeEach((to, from, next) => {
               } else {
                 next({ path: redirect })
               }
-              const project = vueProps.$localStorage.get(CURRENT_PROJECT)
+              var project = vueProps.$localStorage.get(CURRENT_PROJECT)
+              if (project == null) {
+                project = {}
+                store.commit('SET_PROJECT', project)
+              }
               store.dispatch('ToggleTheme', project.id === undefined ? 'light' : 'dark')
             })
           })