Package com.netscape.cms.evaluators
Class UserAccessEvaluator
- java.lang.Object
-
- com.netscape.cms.evaluators.UserAccessEvaluator
-
- All Implemented Interfaces:
IAccessEvaluator
public class UserAccessEvaluator extends java.lang.Object implements IAccessEvaluator
A class represents a user acls evaluator.- Version:
- $Revision$, $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description UserAccessEvaluator()Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(IAuthToken authToken, java.lang.String type, java.lang.String op, java.lang.String value)Evaluates the user in AuthToken to see if it's equal to valuebooleanevaluate(java.lang.String type, java.lang.String op, java.lang.String value)Evaluates the user in session context to see if it's equal to valuejava.lang.StringgetDescription()gets the description for this acl evaluatorjava.lang.String[]getSupportedOperators()Get the supported operators for this evaluatorjava.lang.StringgetType()gets the type name for this acl evaluatorvoidinit()initialization.
-
-
-
Method Detail
-
init
public void init()
initialization. nothing for now.- Specified by:
initin interfaceIAccessEvaluator
-
getType
public java.lang.String getType()
gets the type name for this acl evaluator- Specified by:
getTypein interfaceIAccessEvaluator- Returns:
- type for this acl evaluator: "user" or "at_user"
-
getDescription
public java.lang.String getDescription()
gets the description for this acl evaluator- Specified by:
getDescriptionin interfaceIAccessEvaluator- Returns:
- description for this acl evaluator
-
getSupportedOperators
public java.lang.String[] getSupportedOperators()
Description copied from interface:IAccessEvaluatorGet the supported operators for this evaluator- Specified by:
getSupportedOperatorsin interfaceIAccessEvaluator- Returns:
- Supported operators in string array
-
evaluate
public boolean evaluate(IAuthToken authToken, java.lang.String type, java.lang.String op, java.lang.String value)
Evaluates the user in AuthToken to see if it's equal to value- Specified by:
evaluatein interfaceIAccessEvaluator- Parameters:
authToken- AuthToken from authenticationtype- must be "at_user"op- must be "="value- the user id- Returns:
- true if AuthToken uid is same as value, false otherwise
-
evaluate
public boolean evaluate(java.lang.String type, java.lang.String op, java.lang.String value)Evaluates the user in session context to see if it's equal to value- Specified by:
evaluatein interfaceIAccessEvaluator- Parameters:
type- must be "user"op- must be "="value- the user id- Returns:
- true if SessionContext uid is same as value, false otherwise
-
-