org.sandev.basics.Authorizer
Class DummyAuthFilter

java.lang.Object
  extended byorg.sandev.basics.Authorizer.DummyAuthFilter
All Implemented Interfaces:
AuthFilter

public class DummyAuthFilter
extends java.lang.Object
implements AuthFilter

A dummy AuthFilter that lets just lets everything through.


Field Summary
 
Fields inherited from interface org.sandev.basics.util.AuthFilter
AUTH_NOACCESS, AUTH_READONLY, AUTH_UNRESTRICTED, AUTH_VALHIDDEN
 
Constructor Summary
DummyAuthFilter()
           
 
Method Summary
 SandAttrVal[] matchRestrictions(AuthUser user, java.lang.String className, SandAttrVal[] savs)
          Return additional match constraints for a query or entry display.
 int messageClassAccess(AuthUser user, java.lang.String className)
          Return one of the AUTH* constants describing allowed access to the specified class.
 int messageFieldAccess(AuthUser user, SandMessage msg, java.lang.String fieldName)
          Return one of the AUTH* constants describing the allowed access to the specified field in the specified class.
 int messageFieldValueAccess(AuthUser user, SandMessage msg, java.lang.String fieldName)
          Return one of the AUTH* constants describing the allowed access to the specified field in the given message instance.
 int messageInstanceAccess(AuthUser user, SandMessage msg)
          Return one of the AUTH* constants describing allowed access to the specified class instance.
 int tokenAccess(AuthUser user, java.lang.String token)
          Return one of the AUTH* constants describing the allowed access to the specified token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyAuthFilter

public DummyAuthFilter()
Method Detail

messageClassAccess

public int messageClassAccess(AuthUser user,
                              java.lang.String className)
                       throws SandException
Description copied from interface: AuthFilter
Return one of the AUTH* constants describing allowed access to the specified class. We may or may not have a class instance at this point, since we could be checking whether an instance is allowed. So this method takes the class name (either the short name or the fully qualified name) instead. If a short class name is given, the method will typically look up the equivalent full name via InstanceClassEnumerator.getClassLongName

Usage:

Specified by:
messageClassAccess in interface AuthFilter
Throws:
SandException

messageInstanceAccess

public int messageInstanceAccess(AuthUser user,
                                 SandMessage msg)
                          throws SandException
Description copied from interface: AuthFilter
Return one of the AUTH* constants describing allowed access to the specified class instance.

Usage:

This method is called only if messageClassAccess is allowed.

Specified by:
messageInstanceAccess in interface AuthFilter
Throws:
SandException

messageFieldAccess

public int messageFieldAccess(AuthUser user,
                              SandMessage msg,
                              java.lang.String fieldName)
                       throws SandException
Description copied from interface: AuthFilter
Return one of the AUTH* constants describing the allowed access to the specified field in the specified class.

Usage:

This method is called only if messageInstanceAccess is allowed.

Specified by:
messageFieldAccess in interface AuthFilter
Throws:
SandException

messageFieldValueAccess

public int messageFieldValueAccess(AuthUser user,
                                   SandMessage msg,
                                   java.lang.String fieldName)
                            throws SandException
Description copied from interface: AuthFilter
Return one of the AUTH* constants describing the allowed access to the specified field in the given message instance.

Usage:

This method is called only if messageFieldAccess is allowed.

Specified by:
messageFieldValueAccess in interface AuthFilter
Throws:
SandException

matchRestrictions

public SandAttrVal[] matchRestrictions(AuthUser user,
                                       java.lang.String className,
                                       SandAttrVal[] savs)
                                throws SandException
Description copied from interface: AuthFilter
Return additional match constraints for a query or entry display. These match constraints may restrict possible values, or further constrain ranges.

The match constraints are added by the Authorizer when processing a query, to prevent unauthorized information from being retrieved. The same constraints can also be used by the UI to filter and check for invalid options.

When filtering possible field values in the UI, care must be taken to monitor the number of available values remaining. If only one value is possible, then the field should be switched to READONLY with that value. If no values are possible the field should be switched to NOACCESS. Similar logic applies to range reductions on integer values.

The current query values are provided as a reference for existing restrictions to avoid duplication or add successive refinements.

Usage:

Specified by:
matchRestrictions in interface AuthFilter
Throws:
SandException

tokenAccess

public int tokenAccess(AuthUser user,
                       java.lang.String token)
                throws SandException
Description copied from interface: AuthFilter
Return one of the AUTH* constants describing the allowed access to the specified token. The token is a name describing an action, a UI element, or any other named entity which may be access controlled.

Usage:

Specified by:
tokenAccess in interface AuthFilter
Throws:
SandException