- π¨π¦Canada kylebehse
I'm having the same issue. I have an Account Manager role, and they need to be able to save the profile of a user that has uploaded a private file. But it is throwing access errors.
There is a strange case that happens when dealing with private file fields on a profile. If an administrator uploads a file to the private file field, the profile owner can no longer save the profile.
Steps to reproduce:
The Test User will receive the error: You do not have access to the referenced entity (file: [fid]).
and will be unable to save the profile.
If you do these same steps on a Node, the Test User does not see the above error, and can save the node.
So far I've tracked the issue to Drupal\file\FileAccessControlHandler::checkAccess()
where "view" access is checked for the referencing entity (the profile).
This check is failing: $referencing_entity->access('view', $account, TRUE)
, but I'm not sure how to proceed debugging further. Any help is appreciated.
I've tried changing the owner of the file to be the owner of the profile, but the Test User still receives the error message and is unable to save the profile.
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I'm having the same issue. I have an Account Manager role, and they need to be able to save the profile of a user that has uploaded a private file. But it is throwing access errors.