public class PermissionController
extends java.lang.Object
| Constructor and Description |
|---|
PermissionController(java.lang.String myDocid)
Constructor for PermissionController
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.Hashtable<java.lang.String,java.lang.String> |
getUnReadableInlineDataIdList(java.lang.String docid,
java.lang.String user,
java.lang.String[] groups)
A static method to get Hashtable which cointains a inlinedata object list that
user can't read it.
|
static java.util.Hashtable<java.lang.String,java.lang.String> |
getUnWritableInlineDataIdList(java.lang.String docidWithoutRev,
java.lang.String user,
java.lang.String[] groups,
boolean withRevision)
A static method to get Hashtable which cointains a inline data object list that
user can't overwrite it.
|
boolean |
hasPermission(java.lang.String sessionId,
java.lang.String myPermission) |
boolean |
hasPermission(java.lang.String user,
java.lang.String[] groups,
java.lang.String myPermission)
Check from db connection if at least one of the list of @principals
Administrators are allowed all permission
|
boolean |
hasPermissionForSubTreeNode(java.lang.String user,
java.lang.String[] groups,
java.lang.String myPermission,
long nodeId)
The method to determine of a node can be access by a user just by subtree
access control
|
boolean |
hasSubTreeAccessControl()
Return if a document has subtree access control
|
java.util.Hashtable |
hasUnaccessableSubTree(java.lang.String user,
java.lang.String[] groups,
java.lang.String myPermission)
This method will return a hasTable of subtree which user doesn't has the
permssion to access
|
public PermissionController(java.lang.String myDocid)
throws McdbException
myDocid - the docid need to accessMcdbExceptionpublic boolean hasSubTreeAccessControl()
public boolean hasPermission(java.lang.String sessionId,
java.lang.String myPermission)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean hasPermission(java.lang.String user,
java.lang.String[] groups,
java.lang.String myPermission)
throws java.sql.SQLException
user - the user namegroups - the groups which the use is inmyPermission - permission type to check forjava.sql.SQLExceptionpublic boolean hasPermissionForSubTreeNode(java.lang.String user,
java.lang.String[] groups,
java.lang.String myPermission,
long nodeId)
throws McdbException
McdbExceptionpublic java.util.Hashtable hasUnaccessableSubTree(java.lang.String user,
java.lang.String[] groups,
java.lang.String myPermission)
throws McdbException
user - the user namegroups - the groups which the use is inmyPermission - permission type to check forMcdbExceptionpublic static java.util.Hashtable<java.lang.String,java.lang.String> getUnReadableInlineDataIdList(java.lang.String docid,
java.lang.String user,
java.lang.String[] groups)
throws McdbException
docid - (With Rev), metadata docid which should be the accessfileid
in the tableuser - , the name of usergroups, - the group which the user belong toMcdbExceptionpublic static java.util.Hashtable<java.lang.String,java.lang.String> getUnWritableInlineDataIdList(java.lang.String docidWithoutRev,
java.lang.String user,
java.lang.String[] groups,
boolean withRevision)
throws java.lang.Exception
docidWithoutRev, - metadata docid which should be the accessfileid
in the tableuser - , the name of usergroups, - the group which the user belong tojava.lang.ExceptionCopyright © 2020 Regents of the University of California. All Rights Reserved.