mirror of
https://github.com/ansible/awx.git
synced 2026-04-13 05:59:23 -02:30
update content loading and error handling
unwind error handling use auth cookie as source of truth, fetch config only when authenticated
This commit is contained in:
8
src/util/auth.js
Normal file
8
src/util/auth.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function isAuthenticated () {
|
||||
const parsed = (`; ${document.cookie}`).split('; userLoggedIn=');
|
||||
if (parsed.length === 2) {
|
||||
return parsed.pop().split(';').shift() === 'true';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user