org.appfuse.service
Class UserSecurityAdvice

java.lang.Object
  extended by org.appfuse.service.UserSecurityAdvice
All Implemented Interfaces:
org.aopalliance.aop.Advice, AfterReturningAdvice, BeforeAdvice, MethodBeforeAdvice

public class UserSecurityAdvice
extends Object
implements MethodBeforeAdvice, AfterReturningAdvice


Field Summary
static String ACCESS_DENIED
           
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
UserSecurityAdvice()
           
 
Method Summary
 void afterReturning(Object returnValue, Method method, Object[] args, Object target)
           
 void before(Method method, Object[] args, Object target)
          Method to enforce security and only allow administrators to modify users.
 void setUserCache(org.acegisecurity.providers.dao.UserCache userCache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_DENIED

public static final String ACCESS_DENIED
See Also:
Constant Field Values

log

protected final org.apache.commons.logging.Log log
Constructor Detail

UserSecurityAdvice

public UserSecurityAdvice()
Method Detail

setUserCache

public void setUserCache(org.acegisecurity.providers.dao.UserCache userCache)

before

public void before(Method method,
                   Object[] args,
                   Object target)
            throws Throwable
Method to enforce security and only allow administrators to modify users. Regular users are allowed to modify themselves.

Specified by:
before in interface MethodBeforeAdvice
Throws:
Throwable

afterReturning

public void afterReturning(Object returnValue,
                           Method method,
                           Object[] args,
                           Object target)
                    throws Throwable
Specified by:
afterReturning in interface AfterReturningAdvice
Throws:
Throwable


Copyright � 2002-2006