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

Ranking feature not working when updating to 3.2.25 beta

Started by daveu, 18.02.2015 20:27:26

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

daveu

Joomla v. 3.3.6
jDownloads version 3.2.25 beta
System Information: PHP 5.4.36-0+deb7u3, MySQL 5.5.41-0+wheezy1-log

Since upgrading to 3.2.25 B, the ranking feature appears not to work when applying user permissions.

Symptoms:  For a given user, if I assign them to two or more user groups, and I give one of those levels a ranking of 1000 (for example) where all other rankings are below that number, jDownloads doesn't apply the proper permissions of the top-ranked group.

This started happening when I upgraded to the most recent version.  All caching and compression plugins are disabled.

I have followed the tutorial on setting Access Levels and Groups provided on the site.

Referring to the attached file, if I assign a user to both the "jDownloads user" group and the "Registered" group, then, as that user I can edit a download from the front end (the permissions of the "jDownloads user" provides this).
However, if I now assign the same user to the "officer" group along with the "jDownloads user" and "Registered" groups, then I receive a "you don't have permission to download" error and also that user can't edit the download from the front end.  The "Officer" group denies all access, but it is at a 'lower' level than the "jDownloads user" group AND the jDownloads user group has the maximum value as its ranking.  In other words, the "officer" group appears to be trumping the permissions of the "jDownloads user" and "registered" groups.

The permissions settings for all three groups are in the attached screen shots.

Thank you for any help you can provide.

[gelöscht durch Administrator]
  •  

ColinM

Hi
I see that you have decided to implement permissions by using the Component level permissions.  Presently I am mainly suggesting people use their top level Categories and set the permissions there.  This gives greater flexibility. But setting at the Component level does work OK.

The 'jdownload users'  group is curious.  At first I thought it was a group with Public as its parent, but that would not appear at that position in the tree.  So I believe it is a renamed Guest User Group.  Is that the case?

I have not used the Guest group but its characteristics change dependent on whether the user is logged on or not.  Basically anyone who is logged in will not be able to see anything that is permitted by the Guest user group. And hence jDownloads appears to 'misbehave'.  Please correct me if my assumption about a renamed guest group is incorrect.

These two articles explain a bit about the Guest group.
http://joom3.zemplate.com/the-administrative-interface/users-user-groups-and-access-levels/access-levels
https://brian.teeman.net/joomla/415-the-guest-user-group-hiding-menu-items-and-modules

There is a second problem which I have inadvertently caused by the way I wrote about ranking.  Having re-read the article(s) I can see that it is quite easy to interpret what is written as meaning that jDownloads uses the ranking values to determine which set of permissions should be used.  That is not the case, so apologies - and I will rewrite the relevant part to make it clearer.  Something like "If a user belongs to more than one group jDownloads uses the group in that set which has the highest ranking to select the User Group Settings that should be used.  jDownloads does not use the Rank value to select which set of permissions apply."

My excuse is that the permissions and access levels are a standard Joomla! feature, and jDownloads cannot change the cascading nature of the permissions.  One of the problems of writing documentation is to try to express it so that people unfamiliar with the subject can understand, but sometimes when one is familiar with something then ....

If you could let me know what organisation you wish to set up then I would be pleased to set up an example for you.

Colin

Colin M
  •  

daveu

Colin,

Thank you for your thoughtful reply.

What I'm trying to accomplish is this:
Registered users can download files (only)
Select users belonging to the group "jDownload Users" can upload, edit, delete, etc. from the front end.  (i.e., as per the permissions set in the screen capture above.)
Some users in the "jDownload Users" also belong to other, more administrative groups that have privileges to edit other Joomla content.

I realize this scenario is similar to one which you have posted instructions on your site, but even though I try to re-create it, the permissions don't seem to propagate correctly.

As per your question about creating the jDownload User group - I simply created a new group having "public" as its parent.  I did not rename or reconfigure the Guest group.

So, if I'm reading your response correctly, jDownloads will analyze which groups a user belongs to, and then apply the group settings for which the rank number is highest.  But since we can assign permissions for that highest-ranked group, doesn't it follow that the privileges corresponding thereto are also applied?

Thanks again for the reply.
  •  

ColinM

Hi
Let me respond to your last point first, namely
QuoteSo, if I'm reading your response correctly, jDownloads will analyze which groups a user belongs to, and then apply the group settings for which the rank number is highest.  But since we can assign permissions for that highest-ranked group, doesn't it follow that the privileges corresponding thereto are also applied?
.
Essentially if one wants to conform to standard Joomla! then the basic answer is no.  It would be technically possible to use the permissions as calculated for that specific Joomla user group but then jDownloads would be non standard.  That is it would exhibit behavior that no other Joomla! extension observes.  User Group Settings are a specific jDownloads attribute that is not in core Joomla!.  The essence of the difference is that Joomla! has defined parent child relationships between the user groups and does not have to solve the many to one problem. In Joomla! each permission is separate and the acts sequentially as a set of cascading logic gates as it moves down the chain to get a 'unique' result. jDownloads on the other hand needs to give user certainty over which set of User Group Settings will apply.  Early on in the development of jD series 2.5 and jD 3.2 we tried to to resolve this by trying to assess a unique priority to a user group but there was always the possibility that there were two or more equal user created User Groups.  That is they had the same parent, so it was unpredictable as to which one should be selected.  We dismissed the idea of using say the one with the lowest, or highest, ID.  As it was a jDownloads only feature using  a jDownloads specific criterion, the Ranking, gives an unambiguous result. It is possible that a user repeats the ranking value but that is readily avoidable.

In regard to the Guest User Group then any new user group that is created with Public as its parent is treated as a Guest. Joomla! does special things for Manager, Registered and SuperAdmin user groups so they do not count as guests even though Public is their parent.  As your list did not have Guest in that position I thought you may have renamed it.  Maybe you migrated from Joomla! 2.5 which does not have a Guest  user group by default.  The Guest type User Groups are a real oddity that is intended to allow non logged in users to see say a 'sign up' page which once a user is logged in no longer appears.

So for a start I suggest you change the "jDownload Users" group to have Registered as its parent.  That should allow those users to do the jDownloads things.  If they also need to do other admin items then add them to the Author, Editor or Publisher Group as appropriate, and as you have already probably done.

Colin
Colin M
  •