Fix problem with access permissions and make better wording for the new servlet
[proteocache.git] / webapp / view / support / Notimplemented.jsp
index 1eb2bd0..2afcd43 100644 (file)
@@ -1,25 +1,22 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
-       pageEncoding="UTF-8"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
 <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
-<%@page import="java.util.ArrayList"%>
+<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
 
 <html>
 <jsp:include page="../fragments/header.jsp" />
 <body>
        <div class="container">
-               <c:choose>
-                       <c:when test="${permissions == 'user_role'}">
-                               <jsp:include page="../fragments/mainmenu.jsp" />
-                       </c:when>
-                       <c:otherwise>
-                               <jsp:include page="../fragments/publicmenu.jsp" />
-                       </c:otherwise>
-               </c:choose>
+               <sec:authorize access="hasAnyRole('ROLE_ADMIN','ROLE_USER')">
+                       <jsp:include page="../fragments/mainmenu.jsp" />
+               </sec:authorize>
+               <sec:authorize access="!hasAnyRole('ROLE_ADMIN','ROLE_USER')">
+                       <jsp:include page="../fragments/publicmenu.jsp" />
+               </sec:authorize>
 
                <div class="panel panel-default">
                        <div class="panel-heading">