Spring Security Framework

org.springframework.security.taglibs.velocity
Interface Authz

All Known Implementing Classes:
AuthzImpl

public interface Authz

Wrapper the implementation of Spring Security JSP tag includes: AuthenticationTag, AclTag, AuthorizeTag

Version:
$Id$
Author:
Wang Qi

Method Summary
 boolean allGranted(String roles)
          all the listed roles must be granted to return true, otherwise fasle;
 boolean anyGranted(String roles)
          any the listed roles must be granted to return true, otherwise fasle;
 ApplicationContext getAppCtx()
          set Spring application context which contains acegi related bean
 String getPrincipal()
          return the principal's name, supports the various type of principals that can exist in the Authentication object, such as a String or UserDetails instance
 boolean hasPermission(Object domainObject, String permissions)
          return true if the principal holds either permission specified for the provided domain object
 boolean noneGranted(String roles)
          none the listed roles must be granted to return true, otherwise fasle;
 void setAppCtx(ApplicationContext appCtx)
          get Spring application context which contains acegi related bean
 

Method Detail

allGranted

boolean allGranted(String roles)
all the listed roles must be granted to return true, otherwise fasle;

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

anyGranted

boolean anyGranted(String roles)
any the listed roles must be granted to return true, otherwise fasle;

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

getAppCtx

ApplicationContext getAppCtx()
set Spring application context which contains acegi related bean

Returns:
DOCUMENT ME!

getPrincipal

String getPrincipal()
return the principal's name, supports the various type of principals that can exist in the Authentication object, such as a String or UserDetails instance

Returns:
string representation of principal's name

hasPermission

boolean hasPermission(Object domainObject,
                      String permissions)
return true if the principal holds either permission specified for the provided domain object

Only works with permissions that are subclasses of AbstractBasicAclEntry.

For this class to operate it must be able to access the application context via the WebApplicationContextUtils and locate an AclManager.

Parameters:
domainObject - - domain object need acl control
permissions - - comma separate integer permissions
Returns:
got acl permission (true|false)

noneGranted

boolean noneGranted(String roles)
none the listed roles must be granted to return true, otherwise fasle;

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

setAppCtx

void setAppCtx(ApplicationContext appCtx)
get Spring application context which contains acegi related bean

Parameters:
appCtx - DOCUMENT ME!

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.