Fix permission check
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 1 Aug 2010 16:48:44 +0000 (12:48 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 1 Aug 2010 16:48:44 +0000 (12:48 -0400)
ansel/lib/Widget/SimilarPhotos.php

index 6349e00..5ac5408 100755 (executable)
@@ -61,7 +61,7 @@ class Ansel_Widget_SimilarPhotos extends Ansel_Widget_Base
             foreach ($results as $result) {
                 $img = $result['image'];
                 $rGal = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($img->gallery);
-                if ($rGal->hasPermission())
+                if ($rGal->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ))
                 $html .= Ansel::getUrlFor(
                         'view',
                          array('image' => $img->id,