mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
unwind error handling use auth cookie as source of truth, fetch config only when authenticated
9 lines
268 B
JavaScript
9 lines
268 B
JavaScript
// 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;
|
|
}
|