Browse Source

return 404 instead of 403 when attempting to create a comment on an not existing or unavailable file

remotes/origin/comments-markallread-dav
Arthur Schiwon 11 years ago
parent
commit
49c8f3d6e4
  1. 6
      apps/dav/lib/comments/entitytypecollection.php

6
apps/dav/lib/comments/entitytypecollection.php

@ -25,8 +25,8 @@ use OCP\Comments\ICommentsManager;
use OCP\Files\Folder;
use OCP\ILogger;
use OCP\IUserManager;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\Exception\NotFound;
/**
* Class EntityTypeCollection
@ -79,11 +79,11 @@ class EntityTypeCollection extends RootCollection {
*
* @param string $name
* @return \Sabre\DAV\INode
* @throws Forbidden
* @throws NotFound
*/
function getChild($name) {
if(!$this->childExists($name)) {
throw new Forbidden('Entity does not exist or is not available');
throw new NotFound('Entity does not exist or is not available');
}
return new EntityCollection(
$name,

Loading…
Cancel
Save