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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

msnassar created an issue. See original summary.

msnassar’s picture

Issue summary: View changes
msnassar’s picture

StatusFileSize
new4.38 KB
msnassar’s picture

StatusFileSize
new4.48 KB

Add the missing @param to the docblock

msnassar’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.