Browse Source

Secured version action.

xaav 13 years ago
parent
commit
cbc4c5b0ae
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/Packagist/WebBundle/Controller/WebController.php

+ 1 - 4
src/Packagist/WebBundle/Controller/WebController.php

@@ -88,10 +88,7 @@ class WebController extends Controller
         $pkg = $this->get('doctrine')->getRepository('Packagist\WebBundle\Entity\Package')
             ->findOneByName($package);
 
-        $this->get('logger')->info(print_r((array)$pkg->getMaintainers(), true));
-
-
-        if(!in_array($this->getUser(), (array)$pkg->getMaintainers())) {
+        if(!$pkg->getMaintainers()->contains($this->getUser())) {
             throw new AccessDeniedException();
         }