public class ContextAuthorization extends Authorization
ContextAuthenticationAuthorization.QueryCheck| Modifier and Type | Field and Description |
|---|---|
protected Cache<String,org.mmbase.security.implementation.context.ContextAuthorization.AllowingContexts> |
allowingContextsCache |
COMPLETE_CHECK, NO_CHECKconfigResource, configWatcher, manager| Constructor and Description |
|---|
ContextAuthorization() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(UserContext user,
int nodeNumber,
int srcNodeNumber,
int dstNodeNumber,
Operation operation)
This method should be overrided by an extending class.
|
boolean |
check(UserContext user,
int nodeNumber,
Operation operation)
This method should be overrided by an extending class.
|
Authorization.QueryCheck |
check(UserContext userContext,
Query query,
Operation operation)
Checks rights on a query.
|
void |
create(UserContext user,
int nodeNumber)
This method should be overrided by an extending class.
|
protected SortedSet<String> |
getAllContexts() |
protected String |
getContext(int nodeNumber) |
String |
getContext(UserContext user,
int nodeNumber)
This method could be overrided by an extending class.
|
String |
getDefaultContext(UserContext user) |
protected SortedSet<String> |
getDisallowingContexts(UserContext user,
Operation operation) |
Set<String> |
getPossibleContexts(UserContext user,
int nodeNumber)
This method could be overrided by an extending class.
|
protected void |
load()
This method should be overridden by an extending class.
|
void |
remove(UserContext user,
int nodeNumber)
This method should be overrided by an extending class.
|
void |
setContext(UserContext user,
int nodeNumber,
String context)
This method could be overrided by an extending class.
|
void |
update(UserContext user,
int nodeNumber)
This method should be overrided by an extending class.
|
void |
verify(UserContext user,
int nodeNumber,
int srcNodeNumber,
int dstNodeNumber,
Operation operation)
This method wraps the check-method with the same arguments.
|
void |
verify(UserContext user,
int nodeNumber,
Operation operation)
This method wraps the check-method with the same arguments.
|
check, getPossibleContexts, verifyloadprotected void load()
Configurableload in class Configurablepublic String getDefaultContext(UserContext user) throws SecurityException
SecurityExceptionpublic void create(UserContext user, int nodeNumber) throws SecurityException
Authorizationcreate in class Authorizationuser - The UserContext, containing the information
about the user.nodeNumber - The id of the MMObjectNode, which has just been added to
the MMBase cloud.SecurityExceptionpublic void update(UserContext user, int nodeNumber) throws SecurityException
Authorizationupdate in class Authorizationuser - The UserContext, containing the information about the user.nodeNumber - The id of the MMObjectNode, which has just been changed
in the cloud.SecurityExceptionpublic void remove(UserContext user, int nodeNumber) throws SecurityException
Authorizationremove in class Authorizationuser - The UserContext, containing the information
about the user.nodeNumber - The id of the MMObjectNode, which has just been removed
in the cloud.SecurityExceptionpublic void setContext(UserContext user, int nodeNumber, String context) throws SecurityException
AuthorizationsetContext in class Authorizationuser - The UserContext, containing the information about the user.nodeNumber - The id of the MMObjectNode, which has to be asserted.context - The context which rights the node will getSecurityException - If operation is not allowedpublic String getContext(UserContext user, int nodeNumber) throws SecurityException
AuthorizationgetContext in class Authorizationuser - The UserContext, containing the information about the user.nodeNumber - The id of the MMObjectNode, which has to be asserted.SecurityException - If operation is not allowed(needs read rights)public Set<String> getPossibleContexts(UserContext user, int nodeNumber) throws SecurityException
AuthorizationgetPossibleContexts in class Authorizationuser - The UserContext, containing the information
about the user.nodeNumber - The id of the MMObjectNode, which has to be asserted.Set of Strings which
represent a context in readable form..SecurityExceptionprotected String getContext(int nodeNumber)
public boolean check(UserContext user, int nodeNumber, Operation operation) throws SecurityException
Authorizationcheck in class Authorizationuser - The UserContext, containing the information the user.nodeNumber - The id of the MMObjectNode, which has to be checked.
It the action is CREATE then this will be interpreted as a typedef node.operation - The operation which will be performed.true if the operation is permitted,
false if the operation is not permitted,SecurityExceptionpublic void verify(UserContext user, int nodeNumber, Operation operation) throws SecurityException
Authorizationverify in class AuthorizationSecurityException - If the assertion failsAuthorization.check(UserContext, int, Operation)public boolean check(UserContext user, int nodeNumber, int srcNodeNumber, int dstNodeNumber, Operation operation) throws SecurityException
Authorizationcheck in class Authorizationuser - The UserContext, containing the information about the user.nodeNumber - The id of the relation which has to be checked. If the operation is CREATE
then this will be interpreted as the typedef node (extending insrel) for the relation to be
created.srcNodeNumber - The id of the (new) source node of the relation.dstNodeNumber - The id of the (new) destination node of the relation.operation - The operation which will be performed (CREATE (create
relation) or CHANGE_RELATION (source and/or destination
are changed).true if the operation is permitted,
false if the operation is not permitted,SecurityExceptionpublic void verify(UserContext user, int nodeNumber, int srcNodeNumber, int dstNodeNumber, Operation operation) throws SecurityException
Authorizationverify in class AuthorizationSecurityException - If the assertion failsAuthorization.check(UserContext, int, int, int, Operation)protected SortedSet<String> getDisallowingContexts(UserContext user, Operation operation)
public Authorization.QueryCheck check(UserContext userContext, Query query, Operation operation)
Authorizationcheck in class AuthorizationuserContext - The UserContext, for which the query must be consideredquery - The query to be exploredAuthorization.QueryCheck structure (containing whether the constriant is sufficient, and the
new constraint or null).MMBase 1.9-SNAPSHOT - ${javadoctimestamp}