org.riotfamily.riot.security
Class AccessController

java.lang.Object
  extended by org.riotfamily.riot.security.AccessController

public final class AccessController
extends Object

Provides static methods to check permissions and associate a user with the current Thread.

This class is only usable if an AccessControlFilterPlugin or AccessControlInterceptor is configured.


Method Summary
static void assertIsGranted(String action, Object object)
           
static
<T extends RiotUser>
T
getCurrentUser()
           
static boolean isAuthenticatedUser()
           
static boolean isGranted(RiotUser user, String action, Object object)
           
static boolean isGranted(String action, Object... object)
           
static boolean isGranted(String action, Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrentUser

public static <T extends RiotUser> T getCurrentUser()

isAuthenticatedUser

public static boolean isAuthenticatedUser()

isGranted

public static boolean isGranted(String action,
                                Object object)

isGranted

public static boolean isGranted(String action,
                                Object... object)

isGranted

public static boolean isGranted(RiotUser user,
                                String action,
                                Object object)

assertIsGranted

public static void assertIsGranted(String action,
                                   Object object)
                            throws PermissionDeniedException
Throws:
PermissionDeniedException