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

How to hide specific category

Started by svherpen, 22.11.2016 21:12:51

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

svherpen

I'm trying to achieve the following:
Default registered users may not see the contents of a specific jDownloads category. Preferable they cannot see the category at all when browsing the top-level category structure.

If that's not possible, then only the category name, without the possibility to access the category.
I have been trying myself with specific Joomla user groups, combined with jDownload access settings, but I'm still able to access the restricted category and see the files in it, although I cannot download them.

What is the best way of implementing this special access rights, linked to a specific Joomla usergroup?

Added: I'm running on Joomla 3.6.4 and jDownloads 3.2.46 with PHP 5.6.27

Best regards, Sjaak
  •  

svherpen

Sometimes it's worth to keep trying finding a solution yourself  :)
I managed to achieve what I wanted by creating a dedicated Joomla User group and assign the jDownload category to that Joomla group. So far so good, only members of the dedicated Joonla User group can see the jDownloads category and its contents.  :D
But, when a standard user tries to access that category (for instance via a menu link), a 404 page error is thrown. Is there a way to prevent that behavior, or redirect to a warning page saying "Sorry, you don't have access to that category' ?

When browsing in the jDownloads category overview, the restricted access category is not shown (as I wanted it), so in that situation it's not possible to select a category which is restricted.
  •  

ColinM

#2
Hi
Yes there is a solution by using View Access Level. The Access Level determines which UGs can see an item At the moment I guess you left the Access Level at its default of Public.  So create an Access level with the special UG as its member. For example if your UG is called say 'RestrictedUG' then create an Access Level called say  'RestrictedView'. Then set the category or sub category concerned to have an Access Level of 'RestrictedView'.  Users who are not members of 'RestrictedUG' will not be shown that category or its descedants.

You might find the articles in the set below useful
http://www.jdownloads.net/documentations/category/access-controls-and-user-group-permissions

Colin
EDIT  If you are using a menu link to the 'restricted' category then set the view access level in the menu item setup to RestictedView so that only permitted users see the menu item

Colin
Colin M
  •  

svherpen

Thanks Colin, you are confirming the approach I've implemented.

But what about my question regarding the 404 error ?
  •  

ColinM

Hi
Think you may have misunderstood my reply.  The Access Levels are additional to the Permissions.  Permissions say what a user can do, Access Level sets what they can see.

So you initially set up the permissions so that only users in a particular group can download. One then sets up the Access Level as appropriate.  See also my added note about setting the Access Level on a menu item.
QuoteIf you are using a menu link to the 'restricted' category then set the view access level in the menu item setup to access level RestictedView so that only permitted users see the menu item
This means then that only those users in one of the groups listed in the Access Level will see the menu item.

Colin
Colin M
  •  

svherpen

#5
Thanks for your clarification Colin, I got the concept clear now and by setting the Menulink with the permission of the special usergroup, the 404 error page issue is gone.

What still remains though, but that's in another topic issue, is that I cannot set actions allowed in jDownloads for these additional user groups created in Joomla. But Arno is looking into that issue, so I'm confident that will be solved as well.
http://www.jdownloads.com/index.php/support-forum.html?topic=9174.0
  •  

ColinM

Hi
Glad that it has been solved.
Have you read the documentation?
I am sure between us we can solve your Joomla! permission problem.  But please did you set Deny permission anywhere?
ColinColin
Colin M
  •  

svherpen

Yes, I've been reading the various documents and based upon that information I was able to created the Joomla user groups, Joomla access views. But then it went wrong when I want to set the jDownloads permissions as the checkout error appears when I click on them.

To the best of my knowledge I've not set anything to Deny as you mention, but I might have been doing something wrong :-(
I'll wait the response of Arno who has been given a admin account on my site to take a look. Send him the account details via PM yesterday.

Regards,
Sjaak
  •