aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/pages/userIndex.jsp
diff options
context:
space:
mode:
authorOgnjen Cirkovic <ciraboxkg@gmail.com>2022-12-22 04:22:48 +0100
committerOgnjen Cirkovic <ciraboxkg@gmail.com>2022-12-22 04:22:48 +0100
commit92eab92efb1158b94fd6ce283a92191656649b85 (patch)
treec587bb3cd8e81e7b6e215404a282baae60e57f09 /src/main/webapp/pages/userIndex.jsp
parentda35da09c1dfb1069d217fb730c098ef457513ad (diff)
Dodate provere role korisnika. Dodat prikaz pokemona kod admina.
Diffstat (limited to 'src/main/webapp/pages/userIndex.jsp')
-rw-r--r--src/main/webapp/pages/userIndex.jsp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/webapp/pages/userIndex.jsp b/src/main/webapp/pages/userIndex.jsp
index e54c742..b06d966 100644
--- a/src/main/webapp/pages/userIndex.jsp
+++ b/src/main/webapp/pages/userIndex.jsp
@@ -21,6 +21,12 @@
</style>
</head>
<body>
+<%
+boolean isAdmin=(Boolean)session.getAttribute("admin");
+if(isAdmin){
+ response.sendRedirect("../index.jsp");
+}
+%>
<a href="logout.jsp">
<button>Log out</button>
</a>