- 🇺🇸United States kthull Fort Wayne, Indiana
I had the same issue and #2 🐛 Notice: Undefined offset: 0 in Drupal\file\FileAccessControlHandler->checkAccess() (line 68 of core/modules/file/src/FileAccessControlHandler.php) Closed: won't fix cleared the warnings. Curious if this is only something that happens on new installs of the module where the file system is already borked.
- Status changed to Needs work
over 1 year ago 2:57pm 18 May 2023 - First commit to issue fork.
- @bharath-kondeti opened merge request.
- Status changed to Needs review
over 1 year ago 2:45pm 26 May 2023 - 🇮🇳India bharath-kondeti Hyderabad
Addressed #7 and raised an MR. Please review.
- 🇧🇪Belgium flyke
This same 3 extra check lines should also be added on core/modules/file/src/FileAccessControlHandler.php before line 68 like this:
if ($operation == 'delete' || $operation == 'update') { $account = $this->prepareUser($account); if ($entity->get('uid')->isEmpty()) { $entity->set('uid', 1); } $file_uid = $entity->get('uid')->getValue(); // Only the file owner can update or delete the file entity. if ($account->id() == $file_uid[0]['target_id']) { return AccessResult::allowed(); } return AccessResult::forbidden('Only the file owner can update or delete the file entity.'); }
- Status changed to Closed: won't fix
over 1 year ago 8:22pm 11 June 2023 - 🇺🇸United States douggreen Winchester, VA
I'm marking this as won't fix. The latest patch is to core, not to this module. And if there is a problem, I believe that it is in core. Can you reproduce the problem without this module, in just core? If so, then re-open an issue there.