Package org.gcube.data.access.storagehub
Class AuthorizationChecker
java.lang.Object
org.gcube.data.access.storagehub.AuthorizationChecker
the caller must be authorized, so i'm not passing the login also if it works on behalf of an user
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAdministratorControl(javax.jcr.Session session, String userToCheck, org.gcube.common.storagehub.model.items.SharedFolder item) checks if {userToCheck} is an admin for {item}voidcheckMoveOpsForProtectedFolders(javax.jcr.Session session, String id) checks if item with {id} can be movedvoidcheckReadAuthorizationControl(javax.jcr.Session session, String userToCheck, String id) voidcheckWriteAuthorizationControl(javax.jcr.Session session, String userToCheck, String id, boolean isNewItem) voidcheckWriteAuthorizationControl(javax.jcr.Session session, String userToCheck, org.gcube.common.storagehub.model.items.Item item, javax.jcr.Node node, boolean isNewItem)
-
Constructor Details
-
AuthorizationChecker
public AuthorizationChecker()
-
-
Method Details
-
checkReadAuthorizationControl
public void checkReadAuthorizationControl(javax.jcr.Session session, String userToCheck, String id) throws org.gcube.common.storagehub.model.exceptions.UserNotAuthorizedException, org.gcube.common.storagehub.model.exceptions.BackendGenericError, javax.jcr.RepositoryException - Throws:
org.gcube.common.storagehub.model.exceptions.UserNotAuthorizedExceptionorg.gcube.common.storagehub.model.exceptions.BackendGenericErrorjavax.jcr.RepositoryException
-
checkWriteAuthorizationControl
public void checkWriteAuthorizationControl(javax.jcr.Session session, String userToCheck, org.gcube.common.storagehub.model.items.Item item, javax.jcr.Node node, boolean isNewItem) throws org.gcube.common.storagehub.model.exceptions.UserNotAuthorizedException, org.gcube.common.storagehub.model.exceptions.BackendGenericError, javax.jcr.RepositoryException - Throws:
org.gcube.common.storagehub.model.exceptions.UserNotAuthorizedExceptionorg.gcube.common.storagehub.model.exceptions.BackendGenericErrorjavax.jcr.RepositoryException
-
checkWriteAuthorizationControl
public void checkWriteAuthorizationControl(javax.jcr.Session session, String userToCheck, String id, boolean isNewItem) throws org.gcube.common.storagehub.model.exceptions.UserNotAuthorizedException, org.gcube.common.storagehub.model.exceptions.BackendGenericError, javax.jcr.RepositoryException - Throws:
org.gcube.common.storagehub.model.exceptions.UserNotAuthorizedExceptionorg.gcube.common.storagehub.model.exceptions.BackendGenericErrorjavax.jcr.RepositoryException
-
checkMoveOpsForProtectedFolders
public void checkMoveOpsForProtectedFolders(javax.jcr.Session session, String id) throws org.gcube.common.storagehub.model.exceptions.InvalidCallParameters, org.gcube.common.storagehub.model.exceptions.BackendGenericError, javax.jcr.RepositoryException checks if item with {id} can be moved- Throws:
org.gcube.common.storagehub.model.exceptions.InvalidCallParametersorg.gcube.common.storagehub.model.exceptions.BackendGenericErrorjavax.jcr.RepositoryException
-