se.lu.thep.waf
Class PermissionController

java.lang.Object
  extended by se.lu.thep.waf.PermissionController

public class PermissionController
extends java.lang.Object

Extend this class and override all methods to verify if a user(Principal) is allowed to run an action or not.

Author:
gregory

Constructor Summary
PermissionController()
           
 
Method Summary
 void init()
          Override this method and initiate all action permissions
 void isAllowed(AbstractAction action, java.security.Principal user)
          Override this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionController

public PermissionController()
Method Detail

isAllowed

public void isAllowed(AbstractAction action,
                      java.security.Principal user)
               throws LoginRequiredException,
                      PermissionDenied
Override this method. Return true if a user is allowed to run the action and false otherwise.

Parameters:
action -
user -
Throws:
LoginRequiredException - when an requested action needs authentication
PermissionDenied - when authenticated user ha insufficient permissions to execute the action

init

public void init()
Override this method and initiate all action permissions