Posted by marcoBauli on July 7, 2006 at 10:14am
10 followers
| Project: | Image |
| Version: | 6.x-1.x-dev |
| Component: | image_attach |
| Category: | feature request |
| Priority: | normal |
| Assigned: | David Stosik |
| Status: | closed (fixed) |
Issue Summary
hi,
drop by to ask if anyone else is interested in having per-role permissions for attaching images with the image_attach mod.
This would be usefull in all sites where content is submitted by users, but only priviledged users can actually upload images (applications thinkable of are many).
I see this is possible for other modules involved in "attaching" (to take the most famous one, see the core Upload mod), so maybe it could be relatively easy to fit this into image_attach?
cheers,
-Marco
Comments
#1
or what about per-role / per-contenttype granular permissions?
#2
marking http://drupal.org/node/146214 as a duplicate
#3
http://drupal.org/node/210402 is a duplicate.
Here's my comments from there:
My suggestion would be:
- 'attach images' for whether the user can pick an image node to attach or change the attached image
- use the 'create image content' to determine whether a user may upload a new image
Is a distinction needed between picking an image node to attach and changing an existing attachment?
#4
Sorry for double posting this but I'm not sure what post to add this to since there are several that reference each other as duplicates.
All of the links to "Dupe" items don't have a solution either.
I need to have it so that 1 user (with role A) can create a node and then user 2 (with role B) can add images to it. But unregistered and other roles will only be able to see it and not make updates.
Is this possible?
#5
We mark issues as duplicates to keep the issue list sane -- duplicates are identical or nearly and can be ignored.
There's no solution yet because this is a request for a new feature, and someone needs to do the coding.
In your case, can role B edit the node? If so, what's requested here will work for you. If you want role B to be unable to edit node content, you'll need even finer granularity.
#6
marked #243276: Image attach permissions as a duplicate
#7
I need this too.
#8
http://drupal.org/node/506974 as duplicate.
#9
#3: "Is a distinction needed between picking an image node to attach and changing an existing attachment?"
Yes, that would definetely be preferable on some sites.
#10
Here is a patch.
Actually, it does a lot more, correcting some bugs when "Attach existing images" is disabled:
* impossible to attach more than one image
* the image is created but not attached at all
Just as a note (principally for me):
if !user_access('attach images') : display nothing
else: if user_access('create images') OR attach_existing_images : display the form
if attach_existing_images: the select list should contain all image nodes
else: it should only contain already attached nodes
That's all for me at the drupalcon sprint code, but I'll try to help comitting this one (and more), if needed. :)
Regards,
David
#11
Committed with minor comment tweaks and with this bit removed from the patch:
- unset($node->iids[0]);+ //unset($node->iids[0]);
Thanks for all your help at the image code sprint today! We've managed to get so much done :)
#12
Automatically closed -- issue fixed for 2 weeks with no activity.
#13
To which branch was this committed? I can't find it in the latest beta.
#14
I see it right here in CVS HEAD.
Unless the beta has very badly misrolled, it should be in there too. (If that's the case file a critical please!)
#15
sorry, was on coffee withdrawal. :p
#16
I see the patch in this thread was committed, but it's not the feature I was expecting. With a subject "Image_attach granular permissions", I expected to see a change to permissions -- admin/user/permissions -- e.g. at the very least a "attach existing images". But alas, it's still only a globally configurable setting. In other words the question from #3 and #9 was never addressed:
"Is a distinction needed between picking an image node to attach and changing an existing attachment?" My answer is yes, and the attach patch provides the fix.
In this patch:
Apologies if I was not supposed to reopen this issue, but i thought it was pertinent.
Please let me know if i should put this in a new request.
#17
The last submitted patch, 72579-image_attach_existing_permission.patch, failed testing.
#18
Hmmm... seems reasonable, but this should be in a new issue -- can you file one please?
#19
OK, opened #820660: Add (role-based) permission for "attach existing images" re comment #16