Hi I don't need to control who can upload per content type, but I do need to control who can download files attached by content type. It would be great if this module controlled both. I am currently trying to get Drupal to deny anon users download access to just "biblio" nodes.
Staff members where I work might attach PDFs to their paper references which they don't hold copyright for so it would be illegal for us to give public access to these files. But anon users should be able to access file attachments on any other node they have access to.
I haven’t found anything that does this yet, but this module comes close. If you can point me in the right direction I might be able to extend the module, I’m trying to work out how I can looking at upload.module and upload_perm_per_type.module
Comments
Comment #1
webchickYou could add this functionality with hook_file_download(), but the problem is that only kicks in when private files are enabled, and that's a big ugly performance mess since it requires an extra bootstrap of Drupal for each file download.
Also, I'd have to change the module name, obviously. ;)
But since this is the second time this has come up, and since you seem willing to investigate it (and you caught that silly paper-bag bug about README.txt :D), then if you can whip up a patch to do this, I'd definitely look at including it in the module. In fact, if you want maintainership of this module, you can probably have it. This was just a module I whipped up on a fluke dare from #drupal. ;)
Comment #2
physiotek commentedwow! funny stuff... webchick you know i had the same request, i.e. extend the module to download per content type. well, my goal was exactly the same: restrict copyrighted files from biblio module while access is granted to other modules.. !!!
Comment #3
meo commentedpht3k if you want to work on this together I'd be more than happy to tag team ;) Biblio is really useful but has a few limitations that are annoying, attached PDFs with permissions being one of them. I have created a formatter for Biblio node references so that they come out as actual references if that helps you pht3k.
Comment #4
physiotek commentedhi meo,
would be happy to work together but my php knowledge is too limited.
about the formatter, i would be interested to see how it looks.
i get some references also with rss from pubmed and i created a new filter which i called extra-filtered html. i removed all tables and image html tags, so it looks more professional. i apply the filter to the feed nodes using the module Input filter node types.
see here: http://www.physiotek.com/drupal/syndication/articles
i created as well a new view for the biblio so i can use the tabloid default view and the one i created, which looks like the rest of my website.
link: http://www.physiotek.com/drupal/biblioview
pht3k
Comment #5
physiotek commentedi am not sure if you are still trying to figure out how to achive this but i think we can do it combining those 3 modules:
http://drupal.org/project/downld
http://drupal.org/project/uploadpath
http://drupal.org/project/private_upload
i'll be back soon with the results!
pht3k
Comment #6
physiotek commentedno it'S not possible :/
this would be what we need: http://drupal.org/project/download_access
but still no module after 2 years.........
Comment #7
physiotek commentedargh just found a workaround!!!
give your user download access but don't add the download link from the biblio module.
usually, the user would see the file the full text view.
here's the trick: untick 'list' for the file in question.
now we dont see the file in the full text view
fine... but you will say i still want some peepz to be able to download it...
just add these peepz to a new role and add the download link in the biblio module just for this role
even if 'list' is off, the file is still there in the biblio view with the download link.
tadam!
but of course per node basis would be better.
and maybe a 'download link for own biblio' option.
Comment #8
physiotek commentedthe bad point with this solution is that you cannot let normal users upload their files and be the only one able to download their own file.
for this to be possible it would need:
1. a 'download link for own biblio' option
2. a hack to force the 'list' to be untick...
because i will not assume normal users to be enough meticulous to remove all the time by themself the 'list' option.
Comment #9
physiotek commentedrestarted an issue in biblio module
http://drupal.org/node/141602
Comment #10
Dave.Ingram commentedDevelopment for this module will continue only in Drupal 6 and beyond, and it seems safe to say that this functionality would be better suited to a separate module. If anyone still feels differently, please re-open an issue in the 6.x branch. Thanks!