public class

AuthzImpl

extends Object
implements Authz
java.lang.Object
   ↳ org.springframework.security.taglibs.velocity.AuthzImpl

Class Overview

I decided to wrap several JSP tag in one class, so I have to using inner class to wrap these JSP tag. To using this class, you need to inject Spring Context via SetAppCtx() method. AclTag need Spring Context to get AclManger bean.

Summary

Public Constructors
AuthzImpl()
Public Methods
boolean allGranted(String roles)
all the listed roles must be granted to return true, otherwise false;
boolean anyGranted(String roles)
any the listed roles must be granted to return true, otherwise false;
ApplicationContext getAppCtx()
get Spring application context which contains
String getPrincipal()
implementation of AuthenticationTag
boolean noneGranted(String roles)
none the listed roles must be granted to return true, otherwise false;
void setAppCtx(ApplicationContext appCtx)
test case can use this class to mock application context with aclManager bean in it.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.taglibs.velocity.Authz

Public Constructors

public AuthzImpl ()

Public Methods

public boolean allGranted (String roles)

all the listed roles must be granted to return true, otherwise false;

Parameters
roles - comma separate GrantedAuthoritys
Returns
  • granted (true|false)

public boolean anyGranted (String roles)

any the listed roles must be granted to return true, otherwise false;

Parameters
roles - comma separate GrantedAuthoritys
Returns
  • granted (true|false)

public ApplicationContext getAppCtx ()

get Spring application context which contains

public String getPrincipal ()

implementation of AuthenticationTag

Returns
  • string representation of principal's name

public boolean noneGranted (String roles)

none the listed roles must be granted to return true, otherwise false;

Parameters
roles - comma separate GrantedAuthoritys
Returns
  • granted (true|false)

public void setAppCtx (ApplicationContext appCtx)

test case can use this class to mock application context with aclManager bean in it.