-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.html
37 lines (35 loc) · 1.21 KB
/
dashboard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<html>
<head>
<script src="js/components/jquery-3.5.1.min.js?ts=1616433204"></script>
<script src="js/config.js?ts=1619458908"></script>
<script>
function load_page(){
var success_fn = function(data) {
try {
var auth = false;
data["attributes"].forEach(index => {
if (index["id"].indexOf('96a2546e-fa0f-11eb-be15-b7f12332d0e5') >= 0)
auth = true;
return;
});
if (auth) {
window.location.replace("pdashboard.html" + location.search);
}
else {
window.location.replace("udashboard.html" + location.search);
}
} catch (error) {
console.log(error);
window.location.replace("udashboard.html" + location.search);
}
};
var error_fn = function(jqXHR, status, error) {
window.location.replace("udashboard.html" + location.search);
};
var url = window.location.origin + "/authn/session";
$.getJSON(url, success_fn).fail(error_fn);
}
load_page();
</script>
</head>
</html>