News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Public Access to unrestricted file not working

Started by ScubaGuy, 23.07.2015 09:34:01

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ScubaGuy

OK, I've dug deep into my JDownloads 3.2.35 but can't find anything ... here's the problem: I have most files that are restricted for download by registered users only (while all remaining visible) and some that are publicly available for download. One of those files is visible and, when clicked on, shows the download button. However, when a download is attempted, I get a "You do not have permission to download the requested file." message. Weird! Permissions show download is allowed, but still it doesn't work without a login...

Any ideas out there? Help!?

Thanks!
  •  

ScubaGuy

Update: so I've found that the reason that the public can't download public files is that the JDownloads Permissions say 'Inherited', though I'm not sure what they're inherited from! When I set them to 'Allowed' it all works, except that restricted files become available, also... I'm stumped!

I guess my questions are:
1. where do JDownloads Permissions inherit from, and
2. How can I set the permissions, so that all files (regardless of their classification) remain visible, but only those that are public can be downloaded without a login?

Obviously, any files that are classified as restricted should only be downloadable to the registered users, but they would remain visible to all.

Any and all help appreciated (in layman's language, pls)  :D
  •  

ColinM

Hi
There are several articles on permissions and access in the documentation
This one might help as scheme as Example 3 is what you want - but read bits before
http://www.jdownloads.net/documentations/item/controlled-access-to-categories-and-downloads

Basically what people can see is controlled by the view Access Level.  The default for this is Public so everyone can see all categories and all Downloads.

The Base of the  Permissions 'tree' is inherited from the Component Options tab. BUT leave or ensure all permissions for the Public User Group (UG) and for the Registered Group are set to 'Inherited' as we need to control them at the Category level.  Now I assume all the Downloads that are available to every one are in a category chain that has a top level category  called say 'public-cat' and those that are only down loadable by Registered users are in a set of categories with a top level category called 'reg-cat'. 

Now set the Download permission in 'public-cat' for the UG Public to Allowed. Do a Save and see what is now the computed permission (the Save, or Save and Close, is essential as that triggers setting the rest of the 'tree'). There are two effects here. One is that all sub cats and their downloads will now 'inherit' the computed Download Permission of Allowed for UG Public.  The second thing to note is that a user who is a member of the Registered UG means they are also automatically a member of the Public UG irrespective of whether the Admin positively set them in Public UG or not.  That is being a member of a UG means the user is also a member of the parent UG and its parent and so on.  This is the bit of info that is often missed out!

Having set up the Public UG in its top level cat now go to the 'reg-cat'.  In that one set the Download permission for the Registered UG to 'Allowed' and again Save.

You are now done.

More complex schemes can be set up but the above is the essence.  If you have both Public Downloads and Registered Downloads in the same Category or sub-cat then is is more challenging as you have to split the 'tree' at an intermediate level.

Please ask if you need more

Colin
Colin M
  •