org.equanda.auth
Class AuthAndConfigCombined

java.lang.Object
  extended by org.equanda.auth.AuthAndConfigCombined
All Implemented Interfaces:
AuthAndConfigProvider

public class AuthAndConfigCombined
extends Object
implements AuthAndConfigProvider

Combined the authorization and configuration settings for a user, his/her roles and the defaults.

Rules to apply :
- Check whether personal choice indicates that the data should be hidden.
- For each of the roles for the user, get the specific rights.
- If none found, use the defaults from the domain model.
- If one or more found, use the most permissable.

Author:
Joachim Van der Auwera

Constructor Summary
AuthAndConfigCombined(AuthAndConfigProvider user, AuthAndConfigProvider defaults, AuthAndConfigProvider... roles)
           
 
Method Summary
 boolean hasKey(String key)
           
 boolean isDeletable(String key)
           
 boolean isDisplayList(String key)
           
 boolean isDisplayPrint(String key)
           
 boolean isDisplaySummary(String key)
           
 boolean isReadable(String key)
           
 boolean isWritable(String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthAndConfigCombined

public AuthAndConfigCombined(AuthAndConfigProvider user,
                             AuthAndConfigProvider defaults,
                             AuthAndConfigProvider... roles)
Method Detail

hasKey

public boolean hasKey(String key)
Specified by:
hasKey in interface AuthAndConfigProvider

isReadable

public boolean isReadable(String key)
Specified by:
isReadable in interface AuthAndConfigProvider

isWritable

public boolean isWritable(String key)
Specified by:
isWritable in interface AuthAndConfigProvider

isDeletable

public boolean isDeletable(String key)
Specified by:
isDeletable in interface AuthAndConfigProvider

isDisplaySummary

public boolean isDisplaySummary(String key)
Specified by:
isDisplaySummary in interface AuthAndConfigProvider

isDisplayList

public boolean isDisplayList(String key)
Specified by:
isDisplayList in interface AuthAndConfigProvider

isDisplayPrint

public boolean isDisplayPrint(String key)
Specified by:
isDisplayPrint in interface AuthAndConfigProvider


Copyright © 2007-2009. All Rights Reserved.