net.pleso.framework.client.bl.auth
Class AuthorizationProvider

java.lang.Object
  extended by net.pleso.framework.client.bl.auth.AuthorizationProvider

public class AuthorizationProvider
extends java.lang.Object

This class holds static field with preinitialized IAuthorizer instance. This field is initialized by entry poin class before user authentication. After initialization all generic user interface controls can use static function isObjectAuthorized(IAuth) to check whether some IAuth object instance can be performed by current user rights. All objects that represent some database action implements IAuth interface, so each data effective action must be checked for current user authorization rights.


Method Summary
static void initAuthorizer(IAuthorizer authorizer)
          Initializes static field with IAuthorizer instance.
static boolean isObjectAuthorized(IAuth authorizingObject)
          Checks if IAuth object instance is allowed to be performed by rights of current user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initAuthorizer

public static void initAuthorizer(IAuthorizer authorizer)
Initializes static field with IAuthorizer instance. This initialization must be performed before user authentication to make authorization system work properly.

Parameters:
authorizer - IAuthorizer instance

isObjectAuthorized

public static boolean isObjectAuthorized(IAuth authorizingObject)
Checks if IAuth object instance is allowed to be performed by rights of current user. This function is used by user interface controls to check access rights for used objects.

Parameters:
authorizingObject - object to check authorization rights on
Returns:
true if current user has right to perform actions on specified object


Copyright © 2006-2007 pleso.net crew All Rights Reserved.