|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.security.implementation.cloudcontext.builders.Contexts
Representation of a 'context', which can be read as a valid value of the 'owner' field of any object in MMBase. Rights are distributed using this thing. This is part of cloud context security, so the 'context' values need to be present in the cloud.
Verify,
Authorization| Nested Class Summary | |
protected static class |
Contexts.OperationsCache
|
| Field Summary | |
protected static Cache |
allowingContextsCache
|
static Parameter[] |
ALLOWS_PARAMETERS
|
protected static Cache |
contextCache
|
static Parameter[] |
GRANT_PARAMETERS
|
protected static Map |
invalidableObjects
|
static Parameter[] |
MAY_PARAMETERS
|
static Parameter[] |
MAYGRANT_PARAMETERS
|
static Parameter[] |
MAYREVOKE_PARAMETERS
|
protected static Contexts.OperationsCache |
operationsCache
|
static Parameter |
PARAMETER_GROUPORUSER
|
static Parameter |
PARAMETER_OPERATION
|
static Parameter[] |
PARENTSALLOW_PARAMETERS
|
static Parameter[] |
REVOKE_PARAMETERS
|
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, searchAge, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, temporaryNodes, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
functions |
| Constructor Summary | |
Contexts()
|
|
| Method Summary | |
protected boolean |
allows(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
Wether users of the given group may do operation on a node of given context (so no following) |
Authorization.QueryCheck |
check(User userContext,
Query query,
Operation operation)
Implements check function with same arguments of Authorisation security implementation |
protected Object |
executeFunction(MMObjectNode node,
String function,
List args)
Executes a function on the field of a node, and returns the result. |
protected SortedSet |
getAllContexts()
Returns a Set (of Strings) of all existing contexts |
protected SortedSet |
getAllowingContexts(User user,
Operation operation)
|
static Contexts |
getBuilder()
Staticly receives the MMObjectBuilder instance (casted to Contexts). |
String |
getContext(User user,
int nodeId)
Returns this Context node as a String (so the name field) |
protected MMObjectNode |
getContextNode(String context)
|
protected SortedSet |
getDisallowingContexts(User user,
Operation operation)
Returns a Set (of Strings) of all existing contexts for which the given operation is not allowed for the given user. |
protected MMObjectNode |
getGroupOrUserNode(Parameters a)
|
protected Set |
getGroupsAndUsers(MMObjectNode contextNode,
Operation operation)
|
protected Collection |
getGroupsOrUsers(MMObjectNode contextNode,
Operation operation,
MMObjectBuilder groupsOrUsers)
|
SortedSet |
getPossibleContexts(User user,
int nodeId)
Wraps getPossibleContexts of Authorisation implementation Verify. |
protected MMObjectNode |
getUserNode(UserContext user)
util |
protected boolean |
grant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
protected boolean |
isOwnNode(User user,
MMObjectNode node)
Returns wether the given node is an 'own' node. |
protected boolean |
mayDo(MMObjectNode user,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
|
boolean |
mayDo(User user,
int nodeId,
int sourceNodeId,
int destinationNodeId,
Operation operation)
Implements check function with same arguments of Authorisation security implementation. |
boolean |
mayDo(User user,
int nodeId,
Operation operation)
Implements check function with same arguments of Authorisation security implementation |
protected boolean |
mayDo(User user,
MMObjectNode contextNode,
Operation operation)
Returns wether user may do operation on a node with given context. |
protected boolean |
mayGrant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
protected boolean |
mayRevoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
protected boolean |
parentsAllow(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
Wether users of the given group may do operation on a node of given context, because (one of) the parents of this group allow it. |
protected boolean |
revoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
|
MMObjectNode |
setContext(User user,
int nodeId,
String context)
Sets the context of a node to a certain String Value |
void |
setDefaults(MMObjectNode node)
Makes sure unique values and not-null's are filed |
String |
toString(MMObjectNode n)
Implements for MMObjectNode |
| Methods inherited from class org.mmbase.module.core.MMTable |
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Parameter PARAMETER_OPERATION
public static final Parameter PARAMETER_GROUPORUSER
public static final Parameter[] ALLOWS_PARAMETERS
public static final Parameter[] PARENTSALLOW_PARAMETERS
public static final Parameter[] GRANT_PARAMETERS
public static final Parameter[] REVOKE_PARAMETERS
public static final Parameter[] MAYGRANT_PARAMETERS
public static final Parameter[] MAYREVOKE_PARAMETERS
public static final Parameter[] MAY_PARAMETERS
protected static Cache contextCache
protected static Cache allowingContextsCache
protected static Contexts.OperationsCache operationsCache
protected static Map invalidableObjects
| Constructor Detail |
public Contexts()
| Method Detail |
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()public static Contexts getBuilder()
public boolean mayDo(User user,
int nodeId,
int sourceNodeId,
int destinationNodeId,
Operation operation)
throws SecurityException
SecurityExceptionVerify.check(UserContext, int, int, int, Operation)
public boolean mayDo(User user,
int nodeId,
Operation operation)
throws SecurityException
SecurityExceptionVerify.check(UserContext, int, Operation)
protected boolean isOwnNode(User user,
MMObjectNode node)
protected boolean mayDo(User user,
MMObjectNode contextNode,
Operation operation)
protected boolean mayDo(MMObjectNode user,
MMObjectNode contextNode,
Operation operation,
boolean checkOwnRights)
protected SortedSet getAllContexts()
protected SortedSet getDisallowingContexts(User user,
Operation operation)
protected SortedSet getAllowingContexts(User user,
Operation operation)
public Authorization.QueryCheck check(User userContext,
Query query,
Operation operation)
Verify.check(UserContext, Query, Operation)
protected Collection getGroupsOrUsers(MMObjectNode contextNode,
Operation operation,
MMObjectBuilder groupsOrUsers)
protected Set getGroupsAndUsers(MMObjectNode contextNode,
Operation operation)
protected final MMObjectNode getContextNode(String context)
public String getContext(User user,
int nodeId)
throws SecurityException
SecurityException
public MMObjectNode setContext(User user,
int nodeId,
String context)
throws SecurityException
user - The user doing this.nodeId - The number of the node which' context must be changedcontext - The String describing the desired new context
SecurityException
public SortedSet getPossibleContexts(User user,
int nodeId)
throws SecurityException
SecurityExceptionVerify.getPossibleContexts(org.mmbase.security.UserContext, int)
protected boolean allows(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
protected boolean parentsAllow(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation)
protected boolean mayGrant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
protected boolean grant(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
public void setDefaults(MMObjectNode node)
setDefaults in class MMObjectBuildernode - The node to set the defaults of.
protected boolean mayRevoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
protected boolean revoke(MMObjectNode contextNode,
MMObjectNode groupOrUserNode,
Operation operation,
MMObjectNode user)
protected MMObjectNode getUserNode(UserContext user)
protected MMObjectNode getGroupOrUserNode(Parameters a)
protected Object executeFunction(MMObjectNode node,
String function,
List args)
MMObjectBuilderMMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String) method.
Derived builders should override this method to provide additional functions.
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List)public String toString(MMObjectNode n)
MMObjectBuilder
toString in class MMObjectBuilder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||