I have a Lightning Web Component, its job is to return all the documents related to a record. I have tested the web component by running it internally and it looks like it is performing as expected. As soon as I take the same web component and place it on a community portal page the LWC does not run leading me to believe that the Profile which the community user is running does not have access to the 2 default object: ContentDocumentLink and ContentDocument.
I have made sure that the community user profile has all the access levels to access this record to which these files are related.
Is there a way to give community portal user profile access to these 2 objects? I do not want to set the visibility of each file to everyone as this post suggests.