This seems like such a simple question that I feel like I must be missing something obvious.
I'm using Drupal 7, and have created a content type which allows files to be attached. I am using private file uploads. When viewing the node, the list of attached files is visible.
What I want to happen:
Authenticated users (those logged in) should be able to click a file link and download the files attached to the node. Anonymous (guest) users should be able to see the list of files, but clicking a file link should present the user with the login page, forcing them to log in to download the attached files.
What currently happens:
Guest users can download the files.
Any ideas? I've searched for this functionality in Drupal Core, and can't see it. I've searched for a module to provide the functionality, and have found none. I've searched for raw PHP code to provide this functionality, and find none. And yet this seems very often requested. Seeing as files exist by default in Drupal, it seems only logical to add a "Can download files" permission by default.