blob: 6f8c5c3dc54cf4455e35d7043a7c67340bfdbb8c (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<%@attribute name="title" required="false"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ tag import="com.google.gson.Gson" %>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="${config.issuer}">
<meta charset="utf-8">
<title>Simple Web App - ${title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- stylesheets -->
<link href="static/oid-connect/bootstrap2/css/bootstrap.css" rel="stylesheet">
<link href="static/oid-connect/bootstrap2/css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Load jQuery up here so that we can use in-page functions -->
<script type="text/javascript" src="static/oid-connect/js/lib/jquery.js"></script>
<script type="text/javascript">
// safely set the title of the application
function setPageTitle(title) {
document.title = "${config.topbarTitle} - " + title;
}
// get the info of the current user, if available (null otherwise)
function getUserInfo() {
return ${userInfoJson};
}
// get the authorities of the current user, if available (null otherwise)
function getUserAuthorities() {
return ${userAuthorities};
}
// is the current user an admin?
// NOTE: this is just for
function isAdmin() {
var auth = getUserAuthorities();
if (auth && _.contains(auth, "ROLE_ADMIN")) {
return true;
} else {
return false;
}
}
</script>
</head>
<body>
<!-- Start body -->
|