SWC-1552 Update .tld in integration test to match change in taglib.

This commit is contained in:
Rossen Stoyanchev 2010-10-26 14:00:45 +01:00
parent 70600a0277
commit bd84a2bfa1
2 changed files with 20 additions and 4 deletions

View File

@ -13,7 +13,7 @@
<tag>
<name>authorize</name>
<tag-class>org.springframework.security.taglibs.authz.AuthorizeTag</tag-class>
<tag-class>org.springframework.security.taglibs.authz.JspAuthorizeTag</tag-class>
<description>
A tag which outputs the body of the tag if the configured access expression
evaluates to true for the currently authenticated principal.

View File

@ -24,9 +24,11 @@ public class JspAuthorizeTag extends AbstractAuthorizeTag implements Tag {
private Tag parent;
protected PageContext pageContext;
protected String id;
protected PageContext pageContext;
private String var;
/**
* Invokes the base class {@link AbstractAuthorizeTag#authorize()} method to
@ -40,7 +42,13 @@ public class JspAuthorizeTag extends AbstractAuthorizeTag implements Tag {
setIfAllGranted(ExpressionEvaluationUtils.evaluateString("ifAllGranted", getIfAllGranted(), pageContext));
setIfAnyGranted(ExpressionEvaluationUtils.evaluateString("ifAnyGranted", getIfAnyGranted(), pageContext));
return super.authorize() ? Tag.EVAL_BODY_INCLUDE : Tag.SKIP_BODY;
int result = super.authorize() ? Tag.EVAL_BODY_INCLUDE : Tag.SKIP_BODY;
if (var != null) {
pageContext.setAttribute(var, Boolean.valueOf(result == EVAL_BODY_INCLUDE), PageContext.PAGE_SCOPE);
}
return result;
} catch (IOException e) {
throw new JspException(e);
@ -74,6 +82,14 @@ public class JspAuthorizeTag extends AbstractAuthorizeTag implements Tag {
this.parent = parent;
}
public String getVar() {
return var;
}
public void setVar(String var) {
this.var = var;
}
public void release() {
parent = null;
id = null;