mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-31 06:33:29 +00:00
Declare access to the Acegi authz taglib. * samples/contacts/war/WEB-INF/jsp/index.jsp: Use the Acegi authz taglib to protect access to the delete link for users which have the ROLE_SUPERVISOR.
30 lines
765 B
Plaintext
30 lines
765 B
Plaintext
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
|
|
|
<html>
|
|
<head><title>Your Contacts</title></head>
|
|
<body>
|
|
<h1><c:out value="${model.user}"/>'s Contacts</h1>
|
|
<P>
|
|
<table cellpadding=3 border=0>
|
|
<tr><td><b>id</b></td><td><b>Name</b></td><td><b>Email</b></td></tr>
|
|
<c:forEach var="contact" items="${model.contacts}">
|
|
<tr>
|
|
<td>
|
|
<c:out value="${contact.id}"/>
|
|
</td>
|
|
<td>
|
|
<c:out value="${contact.name}"/>
|
|
</td>
|
|
<td>
|
|
<c:out value="${contact.email}"/>
|
|
</td>
|
|
<authz:authorize ifAllGranted="ROLE_SUPERVISOR">
|
|
<td><A HREF="del.htm?id=<c:out value="${contact.id}"/>">Del</A></td>
|
|
</authz:authorize>
|
|
</tr>
|
|
</c:forEach>
|
|
</table>
|
|
<p><A HREF="add.htm">Add</a> <A HREF="../logoff.jsp">Logoff</A>
|
|
</body>
|
|
</html>
|