mirror of
https://github.com/ansible/awx.git
synced 2026-04-13 14:09:25 -02:30
add test coverage for auth utils
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function isAuthenticated () {
|
||||
const parsed = (`; ${document.cookie}`).split('; userLoggedIn=');
|
||||
export function isAuthenticated (cookie) {
|
||||
const parsed = (`; ${cookie}`).split('; userLoggedIn=');
|
||||
if (parsed.length === 2) {
|
||||
return parsed.pop().split(';').shift() === 'true';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user