The create operation for comment entity should be supported

Created on 14 November 2023, 11 months ago
Updated 15 November 2023, 11 months ago

Problem/Motivation

Due to changes in group 2 and 3, in some cases, the comment access control returns false for the create operation for the comment entity. This is because:

  public function supportsOperation($operation, $target): bool {
    // Close access to directly create comments in groups using add form. This
    // is because comments are being attached to groups automatically.
    // @See group_comment_entity_insert.
    if ($operation === 'create' && $target === 'entity') {
      return FALSE;
    }
    return $this->parent->supportsOperation($operation, $target);
  }

Proposed resolution

The create operation for comment entity should return only when trying to directly create a comment in a group.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium msnassar

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

Comments & Activities

Production build 0.71.5 2024