IEF and Group integration

Created on 28 December 2020, almost 4 years ago
Updated 11 May 2023, over 1 year ago

Problem/Motivation

IEF works really well, but if the Group module is used on a project (e.g. for content access and permission handling), IEF can not be used within the groups context.

Steps to reproduce

  1. Install and enable IEF and Group modules.
  2. Set permissions on group level for the article bundle and remove the article permissions on global level.
  3. If the user is a group member, article can be accessed (but not for group outsiders).
  4. If using IEF to add new articles to an entity reference field, the dropdown to select the item type (article) is not shown.
  5. If permissions for article are set on the global level, this breaks the group permissions and makes limiting the visibility of articles to group members only impossible.

Proposed resolution

Minor modifications in IEF are necessary to enable the integration with the Group module.

  • We check, if the Group module is enabled and provide a checkbox in the field widget settings "Use item in group context".
  • We add a boolean value to the configuration.
  • If the user selects the items to be handled in the group context, we check, whether the group is in the route and if not, whether the parent node, which holds the field with the IEF widget has one.
  • We check, whether the current user has sufficient group permissions to add new items to the group. If not, we fall back to the default IEF access check.
  • If the added entity is new, we create the necessary group - entity relationship. This allows the new entity to fully adhere to group permissions.

Remaining tasks

Provide a patch to introduce the above modifications.

User interface changes

Add new checkbox to the widget settings "Use item in group context".

API changes

None

Data model changes

Add a new config value "use_group".

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria jordik

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024