Problem/Motivation

The Webform access module allows groups of users to be assigned specific permissions to multiple webform nodes. Only users with the 'administer webform' permission can currently manage these groups. Ideally selected users should be able to administer users assigned to an access group.

Proposed resolution

Add admin users to access groups. Admin users will be able to add and remove user accounts from an access group. Admin users can only manage users and will not be able to change what Webform nodes or permissions assigned to an access group.

Remaining tasks

  • Add webform_access_admin table
  • Add update hook to create a new table
  • Update access group form to include 'Administrators' element
  • Update APIs to support admins
  • Update webform_access.schema.yml
  • Update 'Access group' (/admin/structure/webform/access/group/manage) listing to include admins
  • Update demo to create admin accounts
  • Add ‘Manage users’ to 'Access group' operations
  • Update 'Access' tab (/admin/structure/webform/access/group/manage) to allow admins to view assigned groups
  • Write tests
  • Create a change record
  • Tag new beta release

Notes

  • Admin will not be automatically assigned as a user to an acess group
  • Admin can only add and remove users. All other group settings will be hidden, this includes title, description, webforms, and permissions.
  • Admins can only add users via the 'Webform: Access' tab (/admin/structure/webform/access/group/manage).

User interface changes

  • Access group admins will be displayed on the group list and editable in the group edit form

API changes

TDB

Data model changes

  • New 'webform_access_admin' table

Release notes snippet

TDB

Comments

jrockowitz created an issue. See original summary.

brt’s picture

This solution sound very useful.

Along the same lines it would be great if an access group could be assigned an email address. One could the have an email handler that can send mails to the group email, which does not need to belong to a drupal user.

jrockowitz’s picture

Adding custom email address support to access group tokens is not a lot of work but should be handled in a dedicated ticket.

jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes

  • jrockowitz committed 5002ad6 on 3043276-access-group
    Issue #3043276: Allow selected users to administer webform access groups
    
  • jrockowitz committed 50d5a6b on 3043276-access-group
    Issue #3043276: Allow selected users to administer webform access groups
    
jrockowitz’s picture

Issue summary: View changes

  • jrockowitz committed 9fe35fe on 3043276-access-group
    Issue #3043276 by jrockowitz: Allow selected users to administer webform...
jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new32.11 KB

The attached patch is fairly complete but has no test coverage.

  • jrockowitz committed 8df0b3b on 3043276-access-group
    Issue #3043276 by jrockowitz: Allow selected users to administer webform...
jrockowitz’s picture

StatusFileSize
new35.02 KB

Attached patch includes test coverage.

  • jrockowitz committed 6109230 on 3043276-access-group
    Issue #3043276 by jrockowitz: Allow selected users to administer webform...
jrockowitz’s picture

Issue summary: View changes

This patch is ready for review.

  • jrockowitz committed 837d3e4 on 3043276-access-group
    Issue #3043276 by jrockowitz: Allow selected users to administer webform...

  • jrockowitz committed 21eef81 on 3043276-access-group
    Issue #3043276 by jrockowitz: Allow selected users to administer webform...
jrockowitz’s picture

StatusFileSize
new36.99 KB

  • jrockowitz committed e187444 on 3043276-access-group
    Issue #3043276: Allow selected users to administer webform access groups...
jrockowitz’s picture

Status: Needs review » Closed (outdated)

All work related to this ticket is being merged into the patch for #3043755: Allow access groups to have custom email addresses.

brt’s picture

I've tested this from

https://www.drupal.org/project/webform/issues/3043755#comment-13052258

and it seems to be working as expected.

This it great, thank you.