cvs diff: Diffing .
Index: image_pub.gr.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image_pub/image_pub.gr.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 image_pub.gr.inc
--- image_pub.gr.inc	28 Mar 2009 22:53:37 -0000	1.1.2.2
+++ image_pub.gr.inc	13 Jun 2010 20:14:15 -0000
@@ -214,16 +214,6 @@ function _image_pub_gr_fetch_albums($ref
   $preview_dims = image_get_sizes(IMAGE_PREVIEW);
   $preview_max = min($preview_dims['width'], $preview_dims['height']);
   $nalbums = 0;
-  $cperm = 'false';
-  $aperm = 'false';
-  $crperm = 'no';
-  if (user_access('create images')) {
-    $cperm = 'true';
-  }
-  if (user_access('administer images')) {
-    $aperm = 'true';
-    $crperm = 'yes';
-  }
   $tree = _image_pub_album_enum();
   $aid = 0;
   $aidref = array();
@@ -244,6 +234,17 @@ function _image_pub_gr_fetch_albums($ref
         }
       }
 
+      $cperm = 'false';
+      $aperm = 'false';
+      $crperm = 'no';
+      if (_image_pub_album_access('update', $term)) {
+        $cperm = 'true';
+      }
+      if (_image_pub_album_access('create', $term)) {
+        $aperm = 'true';
+        $crperm = 'yes';
+      }
+
       $body .= 'album.name.' .             $aid . '=' . $aname . "\n";
       $body .= 'album.title.' .            $aid . '=' . $term->name . "\n";
       $body .= 'album.summary.' .          $aid . '=' . $term->description . "\n";
