Page 1 of 1

Show files from subcategory

Posted: 02 Nov 2020, 00:33
by mrRiddle
Hi!

I want to show some documents only to specific users. I have one category for public files that everyone should see and some subcategories, each for one user (who is set in category access rights). There I want put some invoices, contracts etc.

Is it possible to create one module which will show to user only what he is supposed to see?
I've tried to do this by custom module and Phoca download plugin. I've just put there tags for every categories like this:
{phocadownload view=filelist|id=6} <-- This one is for everyone
{phocadownload view=filelist|id=7} <-- This one is for user A only
{phocadownload view=filelist|id=8} <-- This one is for user B only
In that way everybody see everything although in file settings I've set not to display inaccessible files. I also noticed that plugin always show file even it's unpublished.
I use Joomla 3.9.22 and up to date plugin and component
What am I doing wrong?

Re: Show files from subcategory

Posted: 02 Nov 2020, 12:20
by Jan
Hi, if you need to manage access rights with Phoca Download, you should use component only. Component manages rights - so if you set some category will be accessible only for someone, it will be not displayed for public.

If you are using plugin, then all access rights are managed by the article, by com_content component, not by Phoca Download component.

Jan

Re: Show files from subcategory

Posted: 02 Nov 2020, 23:59
by mrRiddle
So is there any way to show this as a module with other content on page?

Re: Show files from subcategory

Posted: 04 Nov 2020, 23:47
by Jan
mrRiddle wrote: 02 Nov 2020, 23:59 So is there any way to show this as a module with other content on page?
Sorry, I don't understand.

If you will use component, the rights are managed by component, if you will use plugin or module inside the article, then the rights are just managed by the whole article.

Jan