소스 검색

dashboard: Fix historical version compatibility problem for auth check via localStorage (#1473)

master
cdfive GitHub 4 년 전
부모
커밋
46076b34aa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3개의 변경된 파일11개의 추가작업 그리고 3개의 파일을 삭제
  1. +9
    -1
      sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/header/header.js
  2. +1
    -1
      sentinel-dashboard/src/main/webapp/resources/dist/js/app.js
  3. +1
    -1
      sentinel-dashboard/src/main/webapp/resources/dist/js/app.vendor.js

+ 9
- 1
sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/header/header.js 파일 보기

@@ -27,7 +27,15 @@ angular.module('sentinelDashboardApp')
}
});
} else {
handleLogout($scope, JSON.parse($window.localStorage.getItem("session_sentinel_admin")).id)
try {
var id = JSON.parse($window.localStorage.getItem("session_sentinel_admin")).id;
handleLogout($scope, id);
} catch (e) {
// Historical version compatibility processing, fixes issue-1449
// If error happens while parsing, remove item in localStorage and redirect to login page.
$window.localStorage.removeItem("session_sentinel_admin");
$state.go('login');
}
}

function handleLogout($scope, id) {


+ 1
- 1
sentinel-dashboard/src/main/webapp/resources/dist/js/app.js
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 1
- 1
sentinel-dashboard/src/main/webapp/resources/dist/js/app.vendor.js
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


Loading…
취소
저장