Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Deport authorization check in the nodeleaf put() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Oct 11, 2013
1 parent 07c9e33 commit 5fb62c2
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -52,6 +52,9 @@ function put($data){
// Warning, passed by ref
$p = $this->path;

if(!AuthService::getLoggedUser()->canRead($this->repository->getId())){
throw new \Sabre\DAV\Exception\Forbidden() ;
}
$this->getAccessDriver()->nodeWillChange($p, intval($_SERVER["CONTENT_LENGTH"]));

$stream = fopen($this->getUrl(), "w");
Expand Down

0 comments on commit 5fb62c2

Please sign in to comment.