ui: fix dashboard on saml user login (#9097)

* ui: fix dashboard on saml user login

Fixes #8950
Fixes #9045

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update ui/src/permission.js

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2024-06-12 17:19:21 +05:30 committed by GitHub
parent 10dc5ad774
commit e2e46e3108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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')
})
})