Allow users with 'administer content' to change ownership in AssignOwnerNode.php

Created on 21 December 2016, over 7 years ago
Updated 4 April 2023, over 1 year ago

After adding the advanced action "Change the author of content...", it is not possible to change the author from the anonymous user to anything even if the current user has the administer content permission.

Steps to reproduce:
1) Assign some content to the anonymous user (or cancel an account and assign content to uid 0)
2) create an advanced action "Change the author of content..."
3) try to use that action at /admin/content as an administrator

Because the administrator does not have access to edit user 0, access is forbidden. In other node access functions, the following is used

    if ($account->hasPermission('administer content types')) {
      return AccessResult::allowed()->cachePerPermissions();
    }

Adding patch to include this check on AssignOwnerNode.php

πŸ› Bug report
Status

Closed: duplicate

Version

10.1 ✨

Component
Node systemΒ  β†’

Last updated 1 minute ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States el1_1el

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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