Download files - restricted acces

Hi,
We would like only people with a CERN account to be able to download files on our website.
Could you please tell me how to proceed ?

Cheers,
Guylaine

You will need to upload files using drupal and selecting the private filesystem.

Then only people who has access to the content where the files are uploaded can download it.
https://www.drupal.org/docs/8/distributions/open-social/private-files

Thank you Eduardo.
I am not sure to sure to understand how to slect the private filesystem.
For the moment, I will leave my documents public

Normally when configuring a File field on your content types, you can select where the files will be stored, there you can chose public filesystem or private filesystem.
See
https://<YOUR_SITE>.web.cern.ch/admin/config/media/file-system

Then when Drupal prints the link to the file, it will use something like /system/files/… and the files will be protected by the same permissions the content they belong to.

So this way you can protect files. As an example, create a content type “private files”, add a File field and configure it to use the private filesystem.
Then configure the view permissions for this content type to only authenticated or CERN users.
and just upload the files there, you can later grab the links generated and use them on other parts of the website, blocks, menus, nodes, …

I hope that clarifies a little bit more your question

Hi Eduardo,

Thank you for your reply. I think the simplest for the moment would be to leave my files public as there is nothing confidential.
How can I do ? I did not create a specific content type but only a simply content:
See this page: https://alice-secretariat.web.cern.ch/user-0
For the moment, people needs to log in to access the document but they tell me that it does not work.

Best regards,
Guylaine

Hi,

unless you protect the content where those links are exposed, i don’t see another way. In any case with the link to the file anybody will be able to see the file, but perhaps this is not critical to you.

To protect the content with the links, you can for example use a module like https://www.drupal.org/project/node_view_permissions or Content Access