throw new CmisPermissionDeniedException("Invalid CSRF token!"); throw new CmisPermissionDeniedException("Invalid CSRF token!"); throw new CmisPermissionDeniedException("Invalid CSRF token!");
result.put(CallContext.PASSWORD, null); } else { throw new CmisPermissionDeniedException("Invalid token!"); throw new CmisPermissionDeniedException("No authentication!");
public void checkIfUseful(String what) { switch (objecVariant) { case INVALID_ID: throw new CmisInvalidArgumentException(what + " id is invalid: " + objectId); case NOT_EXISTING: throw new CmisObjectNotFoundException(what + " not found: " + objectId); case NOT_A_CMIS_OBJECT: throw new CmisObjectNotFoundException(what + " is not a CMIS object: " + objectId); case PERMISSION_DENIED: throw new CmisPermissionDeniedException("Permission denied!"); } }
public void checkIfUseful(String what) { switch (objecVariant) { case INVALID_ID: throw new CmisInvalidArgumentException(what + " id is invalid: " + objectId); case NOT_EXISTING: throw new CmisObjectNotFoundException(what + " not found: " + objectId); case NOT_A_CMIS_OBJECT: throw new CmisObjectNotFoundException(what + " is not a CMIS object: " + objectId); case PERMISSION_DENIED: throw new CmisPermissionDeniedException("Permission denied!"); } }
throw new CmisPermissionDeniedException(cmisAffecting.getMessage(), e); throw new CmisPermissionDeniedException("Permission denied: " + cmisAffecting.getMessage(), e);
throw new CmisPermissionDeniedException(cmisAffecting.getMessage(), e); throw new CmisPermissionDeniedException("Permission denied: " + cmisAffecting.getMessage(), e);
return new CmisObjectNotFoundException(message, errorContent, additionalData, t); } else if (CmisPermissionDeniedException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisPermissionDeniedException(message, errorContent, additionalData, t); } else if (CmisStorageException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisStorageException(message, errorContent, additionalData, t); return new CmisUnauthorizedException(message, errorContent, t); case 403: return new CmisPermissionDeniedException(message, errorContent, t); case 404: return new CmisObjectNotFoundException(message, errorContent, t);
return new CmisObjectNotFoundException(msg, code, errorContent, additionalData); case PERMISSION_DENIED: return new CmisPermissionDeniedException(msg, code, errorContent, additionalData); case RUNTIME: return new CmisRuntimeException(msg, code, errorContent, additionalData);
return new CmisObjectNotFoundException(message, errorContent, additionalData, t); } else if (CmisPermissionDeniedException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisPermissionDeniedException(message, errorContent, additionalData, t); } else if (CmisStorageException.EXCEPTION_NAME.equalsIgnoreCase((String) jsonError)) { return new CmisStorageException(message, errorContent, additionalData, t); return new CmisUnauthorizedException(message, errorContent, t); case 403: return new CmisPermissionDeniedException(message, errorContent, t); case 404: return new CmisObjectNotFoundException(message, errorContent, t);
return new CmisStreamNotSupportedException(message, errorContent, t); return new CmisPermissionDeniedException(message, errorContent, t); case 404: return new CmisObjectNotFoundException(message, errorContent, t);
return new CmisStreamNotSupportedException(message, errorContent, additionalData, t); return new CmisPermissionDeniedException(message, errorContent, additionalData, t); case 404: return new CmisObjectNotFoundException(message, errorContent, additionalData, t);
/** * Initializes a CMS context for the authentication data contained in a call context.<p> * * @param context the call context * @return the initialized CMS context */ protected CmsObject getCmsObject(CmsCmisCallContext context) { try { if (context.getUsername() == null) { // user name can be null CmsObject cms = OpenCms.initCmsObject(OpenCms.getDefaultUsers().getUserGuest()); cms.getRequestContext().setCurrentProject(m_adminCms.getRequestContext().getCurrentProject()); return cms; } else { CmsObject cms = OpenCms.initCmsObject(m_adminCms); CmsProject projectBeforeLogin = cms.getRequestContext().getCurrentProject(); cms.loginUser(context.getUsername(), context.getPassword()); cms.getRequestContext().setCurrentProject(projectBeforeLogin); return cms; } } catch (CmsException e) { throw new CmisPermissionDeniedException(e.getLocalizedMessage(), e); } }
if (AccessStatus.ALLOWED != perm) throw new CmisPermissionDeniedException("Cannot delete the node version."); if (AccessStatus.ALLOWED != perm) throw new CmisPermissionDeniedException("Cannot delete the node version.");
if (AccessStatus.ALLOWED != perm) throw new CmisPermissionDeniedException("Cannot delete the node version."); if (AccessStatus.ALLOWED != perm) throw new CmisPermissionDeniedException("Cannot delete the node version.");