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 <[email protected]>
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 <[email protected]>
* Update ui/src/permission.js
---------
Signed-off-by: Abhishek Kumar <[email protected]>
---
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')
})
})