org.riotfamily.riot.security.policy
Class GrantAllPolicy

java.lang.Object
  extended by org.riotfamily.riot.security.policy.GrantAllPolicy
All Implemented Interfaces:
AuthorizationPolicy, Ordered

public class GrantAllPolicy
extends Object
implements AuthorizationPolicy

Default RiotPolicy that always returns true.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.riotfamily.riot.security.policy.AuthorizationPolicy
AuthorizationPolicy.Permission
 
Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
GrantAllPolicy()
           
 
Method Summary
 void assertIsGranted(RiotUser user, String action, Object object)
           
 int getOrder()
           
 AuthorizationPolicy.Permission getPermission(RiotUser user, String action, Object object)
          Returns the permission for the given user, action and object.
 void setOrder(int order)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrantAllPolicy

public GrantAllPolicy()
Method Detail

getOrder

public int getOrder()
Specified by:
getOrder in interface Ordered

setOrder

public void setOrder(int order)

getPermission

public AuthorizationPolicy.Permission getPermission(RiotUser user,
                                                    String action,
                                                    Object object)
Description copied from interface: AuthorizationPolicy
Returns the permission for the given user, action and object.

Specified by:
getPermission in interface AuthorizationPolicy
action - The action to be performed
object - The object on which the action is to be performed

assertIsGranted

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