Download & Extend

Link to make cover image only for user 0

Project:Gallery Assist
Version:6.x-1.19-beta5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Only I am able to see the edit/delete link when I mouse over an image when viewing a photo in a gallery. and I am user 0. I tried adding all permissions to other roles but they still cannot see the link.
Example link would be node/ga_edit_one/620/41
Node id 620. Image 41.

But if I login as another role and just paste that link in the browser, I can edit it and change the cover. So, it looks like the issue is that the links are not showing for any role but user 0.
The div is empty

thanks

Comments

#1

I fixed this bug.
In sites/all/modules/gallery_assist_lightboxes/gallery_assist_lightboxes_display.inc
this line was missing:
global $user;
in function gallery_assist_image_box($type, &$item, $conf, $img).
This function needed the $user object to check it's permissions around line 643 on:
$edit_link = $user->uid == 1 || $user->uid == $item->uid || user_access('edit gallery_assist content', $user) || user_access('edit gallery_assist_'. $type .' content', $user) ? $link : '';

But I also had to change that line because my installations "admin/user/permissions" page doesn't have the permissions "edit gallery_assist content" in the list. So I added to that line's "OR" statement: || user_access('administer gallery_assist', $user)
because I do have "administer gallery_assist" permissions listed on my admin/user/permissions page.
What do you think JC?