Hi, I hope this is the right forum. ^^

I've installed the image module and use image_attach and image_assist. It seems to work just fine but I've run into a few problems. One however seems to be a permissions problem.
When I attach an image to a node, only users with the "administer nodes" permission can see it. Anonymous users or even logged in users who don't have the "administer nodes" permission wont see the image displayed in the story. I can't find any documentation about this and I tried numerous searches on drupal.org tho I must admit I'm kinda new to drupal so maybe there's something I dont get yet :)

Hope you can help!

Kind regards,

Nda

Comments

bwv’s picture

Have you checked the permission for viewing uploads?
----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

Nda’s picture

Yes they have this permission.

Nda’s picture

I found this bug report that pretty much states that the author knows about this problem on 5.x and doesn't care to fix it. He suggests to move to drupal 6 which is still a RC...?

So unless someone has a quick fix that removes the stupid permission check for attached thumbnails on nodes I guess I have to look for another solution.

Nda’s picture

I've added else { return TRUE; } to the function image_acces in image.module and now it works:

/**
 * Implementation of hook_access
 */
function image_access($op, $node) {
  global $user;

  if ($op == 'create' && user_access('create images')) {
    return TRUE;
  }

  if ($op == 'update' || $op == 'delete') {
    if (user_access('edit images')) {
      return TRUE;
    }
    if (user_access('edit own images') && ($user->uid == $node->uid)) {
      return TRUE;
    }
  }
  else {
      return TRUE;
  }
}

I'm pretty sure this isn't a very secure or neat solution but as far as I can see it's not causing any problems.