Hi,
Just trying to use entity forms for an enquiry system.. I need to have three different enquiry (entity) forms and the submissions of each need to be managed by users of different roles..
In other words entityform_1 submissions managed by users in role_1, entityform_2 submissions managed by users in role_2 and entityform_3 submissions managed by users in role_3.. Users in role_2 and role_3 can't have access to submissions of entityform_1. Users in role_1 and role_3 has no access to entityform_2. Users in role_1 and role_2 can't access submissions of entityform_3..
Looking at the available permissions it seems that its only possible to grant access to view and edit the submissions of ALL entity forms at once or none.. I couldn't see anywhere to be more selective..
Am I missing something? Is this functionality available and if so how would I achieve it?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | entityform_access.zip | 1.37 KB | wlofgren |
Comments
Comment #1
mrchristophy commentedI also need this functionality. Does anyone have any ideas on how to achieve this, if the module does not provide itself?
Comment #2
tedbowThis module does not support this now.
Comment #3
capysara commentedFWIW, I needed to give permission to edit a specific entityform based on the user's role and I didn't want that role to be able to edit all my other entityforms. I made a custom module with hook_permission and hook_entityform_access_alter (as suggested in elsewhere in the issue queue) so I can use the permissions UI to allow editing based on role. It would be cumbersome to individually extend it to lots of entityforms, but this worked for my limited use. I think the ideal solution would be to model the Node permissions (e.g., '[ENTITYFORM]: Create new content').
Comment #4
scareyclott commentedHi Capysara,
#3 looks like it would work for me but i am a bit new to using the hook function in Drupal
can you advise on which parts of the 'hook_entityform_access_alter' function i need to amend
Below is what i have so far
module is called 'sample_access_module'
form machine name is 'sampling_input'
user role i want to have edit rights to this form is 'Sample Admin' I can't see where i need to put this in
Comment #5
capysara commentedIn this case, you're creating a permission 'Edit sampling input entityform.' You would just go thru the UI and give the Sample Admin role that new permission.
I just made mine a little more complicated because I found that I wanted to be sure that my administrator role always had access, while the roles with the default 'edit entityform' permission could not access this one. I also found that I needed to add the View in addition to edit (I think this is necessary to see the admin view of all the entityforms).
Alternatively, if you're doing it strictly by Role (in other words, you don't want to give any individual people a permission thru the UI) I think you you could do it all with code. Then you wouldn't need the hook_permission. I didn't test it, but something like...
Comment #6
scareyclott commentedThanks Capysara,
I will give it a go and let you know how i get on
Comment #7
scareyclott commentedHi Capyara,
I have managed to get the simple version working ok. I added delete as these users need this option
Thanks for your help it is much appreciated, yay my first module :)
Regards Scott
Comment #8
wlofgren commentedI've put together this simple module that will provide granular permissions per entityform type.
entityform_access.info
entityform_access.module
Comment #9
wlofgren commented