Closed (fixed)
Project:
Image javascript crop
Version:
7.x-1.0-rc1
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2011 at 22:40 UTC
Updated:
18 Jun 2011 at 20:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
olrandir commentedI'm having the same problem. In fact, I have 3 admin users on my installation, and only the admin user who installed the module sees the crop link under the image field (and before uploading an image, he is the only user who sees the text "After uploading an image you'll be able to crop it."). Permissions are all OK. Any ideas?
Comment #2
olrandir commentedTemporary solution: in the folder where you installed the module (this should be sites/all/modules/imagecrop), open the file imagecrop.module. Go to line number 185, where you'll find this code snippet:
Comment out this section, like so:
This will remove user access control and effectively allow anyone with access to the link to crop images.
Make certain this is safe in your configuration! In my case the users that can upload images are the same ones that should be able to crop them, if this is not the case for you be advised that this will give everyone with image upload permission the ability to crop them as well.
Comment #3
nils.destoop commentedA fix is committed, attached you also can find a patch.
Comment #4
nils.destoop commentedComment #5
olrandir commentedFYI zuuperman, while I'm glad you found my code snippet to be of use, be advised that this breaks intended functionality: changing the permissions for who can crop images does not have an effect since these are no longer checked against. It's usable, and one might argue better than the previous situation while inserting a not so serious security risk, but still needs fixing! This is why I labeled it as a temporary solution.
Many thanks for evaluating my code and considering the issue though.
edit: oops, just realised your patch actually fixes the issue I'm mentioning. Sorry for the misunderstanding!
Comment #7
jjkiesch commentedFor consistency shouldn't you just use
if (!imagecrop_has_access())?