Active
Project:
Webform Submissions ACL
Version:
6.x-1.0
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2009 at 21:16 UTC
Updated:
18 Aug 2011 at 18:26 UTC
This module is already very usefull to me but are there any plans to implement a role based ACL? Maybe I'll give it a try myself as an introduction to drupal development
Comments
Comment #1
matt bSubscribing!
Comment #2
investigacoes commentedsubscribing!
this would be perfect!!
Comment #3
Zyxtrio commentedI'm fairly new to all this but here is a hardcoded solution <.< (please don't yell at me :) )
First off add the following code to webform_submissions_acl.module
This is the basic function to return all users with a certain role ($rid).
Next, go to webform_submissions_acl.pages.inc
Under function webform_submissions_acl_form_validate($form, &$form_state) {, change
to
and under function webform_submissions_acl_form_submit($form, &$form_state) {
change
to
Now in that last code block change the 3 in
$node_add_users = webform_submissions_acl_users_by_role($form_state['values']['nid'],3);to the role id of the desired role you want to add. To find the role id, go to admin/user/roles and click on edit role and take note of the number at the end of the url.Now I have two different admin accounts (a content administrator and a site administrator) hence the
$node_add_users = webform_submissions_acl_users_by_role($form_state['values']['nid'],4);(3 is content admin and 4 is site admin)If you only have one role that you want to mass include, remove
Now to add all admin users just type admin into the username textfield on the acl form and hit submit :)
Now I realize this is dirty and not oop :P I'm willing to work on that if someone wants a more user friendly version (Roles listed with a number to fill in as the username?)