The module denies access to regular user with 'clone own node' permission.

Problem

In NodeCloneFormController::access() node owner id (uid) is queried in a way which results in NULL. Hence following comparisons wont work.

Solution

Replace

$node->uid->value

with

$node->getOwner()->id()
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ragnarkurm created an issue. See original summary.

rajeshwari10’s picture

Assigned: Unassigned » rajeshwari10
ragnarkurm’s picture

rajeshwari10’s picture

Status: Active » Needs review
FileSize
751 bytes

Changes as per suggestion.

Thanks!!

ragnarkurm’s picture

Just out of curiosity - what is patch naming convention (why 2746363-fix-broken-access.patch -> 2746363-3.patch) ?

asrob’s picture

Status: Needs review » Reviewed & tested by the community

I successfully applied rajeshwari10's patch, but as I can see ragnarkurm's one is good as well. RTBC'ed!

mallezie’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
751 bytes

Patch would not apply with composer patches. Rerolled.