SEC-1246: Introduce EL-based authorization tag. Added optional access expression to authorize tag.
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
<h1>VERY Secure Page</h1>
|
||||
This is a protected page. You can only see me if you are a supervisor.
|
||||
|
||||
<authz:authorize ifAllGranted="ROLE_SUPERVISOR">
|
||||
<authz:authorize access="hasRole('ROLE_SUPERVISOR')">
|
||||
You have "ROLE_SUPERVISOR" (this text is surrounded by <authz:authorize> tags).
|
||||
</authz:authorize>
|
||||
|
||||
<p><a href="../../">Home</a>
|
||||
<p><a href="../../j_spring_security_logout">Logout</a>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -8,8 +8,8 @@ This is a protected page. You can get to me if you've been remembered,
|
||||
or if you've authenticated this session.
|
||||
</p>
|
||||
|
||||
<sec:authorize ifAllGranted="ROLE_SUPERVISOR">
|
||||
You are a supervisor! You can therefore see the <a href="extreme/index.jsp">extremely secure page</a>.<br/><br/>
|
||||
<sec:authorize access="hasRole('ROLE_SUPERVISOR')">
|
||||
You are a supervisor! You can therefore see the <a href="extreme/index.jsp">extremely secure page</a>.<br/><br/>
|
||||
</sec:authorize>
|
||||
|
||||
<h3>Properties obtained using <sec:authentication /> tag</h3>
|
||||
@@ -33,4 +33,4 @@ or if you've authenticated this session.
|
||||
<p><a href="../">Home</a>
|
||||
<p><a href="../j_spring_security_logout">Logout</a>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user