* samples/contacts/war/WEB-INF/jsp/include.jsp:

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.
This commit is contained in:
Francois Beausoleil 2004-03-22 20:23:07 +00:00
parent 48b21524ed
commit a92878b69f
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="authz" uri="http://acegisecurity.sf.net/authz" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

View File

@ -18,9 +18,9 @@
<td> <td>
<c:out value="${contact.email}"/> <c:out value="${contact.email}"/>
</td> </td>
<c:if test="${model.supervisor == true}"> <authz:authorize ifAllGranted="ROLE_SUPERVISOR">
<td><A HREF="del.htm?id=<c:out value="${contact.id}"/>">Del</A></td> <td><A HREF="del.htm?id=<c:out value="${contact.id}"/>">Del</A></td>
</c:if> </authz:authorize>
</tr> </tr>
</c:forEach> </c:forEach>
</table> </table>