Integrate with ACL module

Created on 21 April 2023, over 1 year ago
Updated 13 August 2024, 3 months ago

Problem/Motivation

This module includes actions to set and revoke role-based ACLs on an entity, but it does not include actions to set and revoke user-level ACLs on an entity.

When you set "Enable per content node access control settings" on an entity type with the Content Access module, the Access Control page for entities of that entity type include a fieldset labelled "User access control lists" where individual users can be added to the view/edit/delete ACLs for that entity.

If these ECA Actions can be added I imagine the labels for the existing Actions should be changed to "Content access: grant access to role" and "Content access: revoke access for role". The new actions would be labelled "Content access: grant access to user" and "Content access: revoke access for user."

Lastly, it would be ideal to be able to perform the user-level ACL Actions like we do for muli-value/list fields. In many of my use cases I want to first erase the Content Access user-level ACLs and then set them with new values. In this case my ECA Model won't necessarily know which users to revoke access without first pulling the current user-level ACL; it would be "easier" to be able to configure an ECA Action to delete an existing user ACL on an entity and then add a list of users to a user-level ACL (with a loop).

✨ Feature request
Status

Postponed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States trenttati

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @trenttati
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Wasn't aware that content_access also supports user level ACLs. Is that something in their 2.x branch or also available in 1.x?

  • πŸ‡ΊπŸ‡ΈUnited States trenttati

    The feature is available in both 2.x and 8.x-1.x.

    For what it's worth I verified on a dev site by removing ECA_content_access (due to declared dependency on content_access 8.x-1.x), and then installed content_access 2.0.0-alpha1 over 8.x-1.0-alpha4 with composer. The existing content_access configurations remained in place and the "Per content node access control settings" was still available.

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Yes, ACL per node is what makes content_access very useful. But the subject of this issue talks about user specific ACL and I wonder if that's a thing too?

  • πŸ‡ΊπŸ‡ΈUnited States trenttati

    Yes, the feature I am referring to is the combination of ACL per node and user-specific ACLs. I've included a screenshot of the user-level form element on an individual node.

    On a current system I am building I would like to use ECA Content Access to automate the process of granting users edit access to nodes when those users are referenced by one of several fields available in the content type. The OG and Group modules won't work in this case because the referenced users can be anybody from the organization and all users in the organization are authorized to view all nodes of this content type.

    Thank you @jurgenhaas! Your attention to clarity of communication and nuanced details is largely what is (quickly) making ECA and its ecosystem such an invaluable part of Drupal.

  • Status changed to Postponed over 1 year ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    I've had another look and still can't find any user ACL in the content_access module. That functionality comes from a different module ACL β†’ which isn't even Drupal 10 compatible yet. But the work is underway and will hopefully be ready before EOL of Drupal 9.

    As ACL is a module in its own right, it probably wouldn't be the best of ideas to integrate with it here in eca_content_access. If anyone wanted to integrate ECA and ACL, then that should be a separate module eca_acl. There are currently 3 known modules that integrate with ACL: Content Access, Flexi Access, Forum Access.

    So, if anyone wanted to get this done or had some funding, we could hire someone to get this done. Until then, marking this as postponed.

  • ACL has now a full fledged D10 (beta) out there.
    It would be an amazing use case to work together with user individual goals and with commerce as well.
    Did you already look into creating a ACL / user x node access sub module or something @jurgenhaas?

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    @Transmitter I haven't started on this yet. If you want to give this a try, I'd be happy to test and review.

  • πŸ‡ΊπŸ‡ΈUnited States drupgirl

    +1 for this feature.

Production build 0.71.5 2024