Hide download links from unauthorized users

Phoca Download - download manager
Hosch
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 27 Jan 2016, 15:05

Hide download links from unauthorized users

Post by Hosch »

Hi,
when I use the code from Phoca Download Plugin, the link displays, even though the wrong user (group) is logged in.

Is there a way to hide the link from users who don't have permission to download, anyway?
When the user clicks on that link, there is an empty page with only the "powered by PD" showing. Is there a way that at least I can tell them, that they are not allowed to access this file?

Hope you understand my problem :)

Thank you!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Hide download links from unauthorized users

Post by Jan »

Hi, yes, this is right behaviour. The plugin cannot manage rights as they are managed by the article.

So rights are managed in Phoca Download component - plugin links to component and if there is no access, no files will be displayed.

To manage rights for the plugin, you need to manage rights in article - e.g. to display article with plugin for users who have rights to download and display other article without plugin for users who have no access. Plugin itself does not manage rights, it only creates links to downloadable files rendered by component.

Jan
If you find Phoca extensions useful, please support the project
Post Reply