mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 15:22:15 +00:00
SWC-1552 Update .tld in integration test to match change in taglib.
This commit is contained in:
parent
70600a0277
commit
bd84a2bfa1
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<tag>
|
<tag>
|
||||||
<name>authorize</name>
|
<name>authorize</name>
|
||||||
<tag-class>org.springframework.security.taglibs.authz.AuthorizeTag</tag-class>
|
<tag-class>org.springframework.security.taglibs.authz.JspAuthorizeTag</tag-class>
|
||||||
<description>
|
<description>
|
||||||
A tag which outputs the body of the tag if the configured access expression
|
A tag which outputs the body of the tag if the configured access expression
|
||||||
evaluates to true for the currently authenticated principal.
|
evaluates to true for the currently authenticated principal.
|
||||||
|
@ -24,10 +24,12 @@ public class JspAuthorizeTag extends AbstractAuthorizeTag implements Tag {
|
|||||||
|
|
||||||
private Tag parent;
|
private Tag parent;
|
||||||
|
|
||||||
protected String id;
|
|
||||||
|
|
||||||
protected PageContext pageContext;
|
protected PageContext pageContext;
|
||||||
|
|
||||||
|
protected String id;
|
||||||
|
|
||||||
|
private String var;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invokes the base class {@link AbstractAuthorizeTag#authorize()} method to
|
* Invokes the base class {@link AbstractAuthorizeTag#authorize()} method to
|
||||||
* decide if the body of the tag should be skipped or not.
|
* decide if the body of the tag should be skipped or not.
|
||||||
@ -40,7 +42,13 @@ public class JspAuthorizeTag extends AbstractAuthorizeTag implements Tag {
|
|||||||
setIfAllGranted(ExpressionEvaluationUtils.evaluateString("ifAllGranted", getIfAllGranted(), pageContext));
|
setIfAllGranted(ExpressionEvaluationUtils.evaluateString("ifAllGranted", getIfAllGranted(), pageContext));
|
||||||
setIfAnyGranted(ExpressionEvaluationUtils.evaluateString("ifAnyGranted", getIfAnyGranted(), 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) {
|
} catch (IOException e) {
|
||||||
throw new JspException(e);
|
throw new JspException(e);
|
||||||
@ -73,6 +81,14 @@ public class JspAuthorizeTag extends AbstractAuthorizeTag implements Tag {
|
|||||||
public void setParent(Tag parent) {
|
public void setParent(Tag parent) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getVar() {
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVar(String var) {
|
||||||
|
this.var = var;
|
||||||
|
}
|
||||||
|
|
||||||
public void release() {
|
public void release() {
|
||||||
parent = null;
|
parent = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user