Closed (fixed)
Project:
Editable Fields
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2012 at 19:52 UTC
Updated:
4 Oct 2013 at 19:31 UTC
Most contrib modules seem to provide configurable permissions for actions, and a client of mine had a requirement to provide more granularity as to who sees editable fields. You could theoretically provide a bunch of different view modes for the content in question, and serve them up based on some arbitrary rules, but that's a lot of work for something that should be handled by user_access().
Attached is a straightforward patch to provide a permission and test against it alongside update access for the content in question.
| Comment | File | Size | Author |
|---|---|---|---|
| editablefields-perm.patch | 1.22 KB | bradjones1 |
Comments
Comment #1
kingdee40 commentedThis works well, without the need for custom hook_permission.
Just set the permissions on editablefields and on the node.
Comment #2
bradjones1@kingdee - Could you clarify, do you mean this patch is unnecessary due to existing functionality I overlooked? Right now editablefields doesn't provide any permissions, hence my adding the hook, here. Or am I misunderstanding you?
Comment #3
kingdee40 commentedSorry, what I meant was your patch works better then the other option http://drupal.org/node/1344634 which requires a custom hook_permission.
Comment #4
bradjones1Thanks. Feel free to mark RTBC then :-)
Comment #5
kingdee40 commentedI have this patch running on several dev sites, permissions are working well.
Comment #6
MGParisi commentedTested!
Comment #7
dags commentedCommitted to 7.x-1.x. Thanks.
Comment #8
haegar der schreckliche commentedUsing this patch I cannot see any editable fields in my views anymore. I am using the field_permissions module to set permissions.
Comment #9
dags commentedCould you please describe your content type configuration and field_permission configuration in more detail?
Comment #10
haegar der schreckliche commentedSorry, my fault.
I should have mentioned that the "Use editablefields" permission field did not show up for me even though I cleared the caches. I still don't know why this happened.
But now one day later it suddenly appeared and everything is fine.
Comment #12
ncarty97 commentedI am using the alpha 2 release now and the 'Use editablefields" permission is no where to be found. I have cleared the caches.
I am using this module for a view of inventory from drupal commerce. The role I created to manage that can see the view, but the editable fields are not available to the role. Assigning a role of adminstrator to the user makes them available.
Comment #13
dags commentedBugs are fixed in the dev branch - it's not possible to go back and fix alpha2. Try using the dev branch.
Comment #13.0
dags commentedCleanup summary