News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

File access & permissions

Started by etienne, 28.08.2017 11:28:10

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

etienne

Hello Colin,

I have a question about permissions and access rights :

I want to configure JDownloads to have :
- all files from all categories visible for Public users
- most files downloadable by Public users
- some files within some categories visible by Public but downloadable only by Registered users (download button not visible, message instead saying it is necessary to log in)
- but the same category can contain files downloadable by Public users.

This configuration is different from case n°3 in http://www.jdownloads.net/documentations/item/controlled-access-to-categories-and-downloads, where a root category has permissions that gives or not the access...

Thank you for your help. I can give you an admin account to go deeper.

Have a nice day.
Etienne
  •  

etienne

Hello all,

I think I have found a way to do it :
Set up file access to Denied within the download, and put the access level to Public...
But it's a long process to do it manually for each download.
Have a nice day
  •  

ColinM

Etienne
Using Denied is not a good idea!  It can have some unexpected situations.  Also you do not have to set each Download individually as the Downloads will inherit from its Category. So ultimately one only needs to set the top level categories to the correct state. I think you only have 4 top level Cats.

In your Situation you could use the Option Button on the jD Control Panel.  Goto Public User Group (UG) and set the Download Permission to Inherited.  Then go to Registered UG and set Download Permission to Allowed. Do a save and Close.

Next goto the jD Tools and use the Reset Downloads Permissions, then do Reset Categories Permissions.  This sets each Permission back to inherited.

Next go to a top level Category, select the Registered UG and set the Download Permission to Allowed. Now Do  a Save and then a Save And Close. Then do next top level cat until you have done all top level cats.
Finally go back to to the jD Control Panel and set the Registered UG to Inherited and Save & Close

This has now set your top level categories as the 'permissions' controllers which is much more flexible particularly if you want to allow creation/editing of Downloads from the Front End.

Colin
Colin M
  •  

etienne

Hello Colin,

I have read about this method in the help page, but it doesn't fit to my needs.
In fact, in the same category there is a mix of files which have public and registered download rights.
So they cannot inherit the category access rights...
I didn't found a solution to sort differently : a category is related to a song, and within the category the mp3 can be public and the pdf can be restricted.
Have a nice day
Etienne
  •  

ColinM

Etienne,
I now understand your requirement better.  one way to do this is to set the Access to the 'restricted pdfs' to the Registered view.  Public Users will not see them.  You could use the Category Description to explain.

And yes you have found a rare instance where Deny is useful provided it is on the individual Downloads as there are no onward or other inheritance problems but a lot of work.
Are you sure you do not want to have separate categories?
Colin
Colin M
  •  

etienne

Hello Colin,

Thank you for your interest for my particular need.
I prefer to keep a common category for the different file formats and permissions. (I use the link to category in articles...)
I have done the job manually one time, and now it works like I want.

For one category I have a strange permissions behaviour.
Do you know what "Not allowed (locked)" means ?
As you can see on the screenshot, I have a download which category has inherited allowed permissions for Public & Registered.
When I use "Deny" for Public users, the Registered users have a locked permission and cannot download...

Do you know why ?
Thank you.
Have a nice day
Regards
Etienne

[gelöscht durch Administrator]
  •  

ColinM

Etienne,
What you have discovered is because of the Inheritance rules used by Joomla!.

The Public UG is the Root UG. Guest, Manager, Registered and Super User UG's are all sons of Public. They start separate branches of the Family tree. Further, for example, Administrator UG is the son of Manager and the grandson of Public UG.  All the sons, grandsons, great grandsons and so on inherit permissions of their forefathers. Deny is the special case that cannot be overridden further down the chain. Once 'denied' it cannot be undone lower down the tree
So for the particular Category set the Deny back to Inherited, do a Save.  Then set the Registered to Allow and Save  (NB the Save or Save & Close does the propagation of the permissions down the Tree).

Also each Top Level Category starts what could be called a new Clan of sub categories.  Each sub category inherits the permissions ("genes") of its Father.  So there is a double inheritance at work!!  Deny permission can make a 'stop' in both sets of inheritance.  Yes it gets complex!!  The only safe place to use Deny is, in general, on individual Downloads as there are no children of a Download.
Colin
Colin M
  •  

etienne

Hello Colin,

In this case it is not like that.
If I put "Allow" to Registered users, and save
then I put "Deny" to Public users, and save
then I get "Not authorized (locked)" for Public users.

It is as if the inheritance is in the wrong direction.

Category permissions are defined as Inherited...

If you need, I can send you admin rights to check...
Best regards
Etienne
  •  

ColinM

Etienne,
Yes it would be a good idea to send, by PM, super admin rights to check.  Deny permission often has side effects.

Also please detail where it happens and how to get there!!
Colin
Colin M
  •  

ColinM

Etienne
Thanks for logon details - I will start checking
If you put Deny in Public UG then no one can download (except Super Users).  That is Registered UG is son of Public UG.  This is actually the right way soyes you do need to rethink the way it works.
Colin
Colin M
  •  

etienne

Hello Colin,

Thank you for cheching.
So I am blocked, it doesn't work like I want...
I am surprised that the Deny on Public is automatically applied to higher access levels.
In my opinion, the inheritance should be in the other direction, because Registered have more rights than Public users, Managers have more rights than Registered users, etc...

If I have to separate downloads from same song, into one public and one registered category, to keep inheritance, how can I group them by song ? Would the tag system be a solution ?
How can I embed downloads from a same tag in an article, to show them in the same page ?

Thank you in advance.
Best regards
Etienne
  •  

etienne

Hello Colin,

I have found a way to avoid this inheritance, that I don't want.
I have created a user group "Sitre visitors", child of Public.
In User parameters, I have set up the default user group for visitors on "Site visitors".
And now this works fine, without the status "Not allowed (locked)".

I was not very happy to use tags, because in the past I have defined manually tags for all my downloads, but during a JD upgrade, all the tags disappeared ! I don't know why, but they were not kept, so all my work was broken...
Do you know how to avoid this ?

Thank you for your help !
Regards
Etienne
  •  

ColinM

Etienne
I see you have set permission to Download in the 'Component Permissions'  for the Public UG; and have then controlled who can see the Download through the view Access for Public, for Registered and for Admin users.  Using a 'visitor UG' is not actually required.
This setup will not show public users the 'restricted' Downloads as they will not be shown.
Should you wish to show public users the details of a Download but not to allow them to physically download then a scheme based on permissions is quite possible.
Please let me know if you need help in such a circumstance.

The problem with Tags was caused by a Joomla! bug.  It has been reverted and I now find that tags work again.

I have been away for a few days so please remind me if there are other challenges
Colin
Colin M
  •  

etienne

Hello Colin,

Thank you for your reply, and excuse me for late answer.
Ok for permissions and tags, now I think all my problems are solved.
Have a nice day.
Best regards
Etienne
  •  

wyattreed

Set the top level categories to the correct state  :)
192.168.0.1 router login
  •