Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.taglibs.velocity
Interface Authz

All Known Implementing Classes:
  AuthzImpl

    public interface Authz

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

Version:
  $Id: Authz.java,v 1.1 2005/12/01 09:38:50 benalex Exp $
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 `net.sf.acegisecurity.acl.basic.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!

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.