Which User-Group is Used? -Jun 2023

Introduction

All logged on users are in multiple groups.  So there is a dilemma over which User Group Setting values are used. The short answer is that in jDownloads each user Group is given a 'ranking value'. So for a particular user jDownloads selects the user group setting with the highest ranking value from those user groups to which the user belongs.

Details for Which User Group is used?

As described in the article Introduction to User Group Settings (opens in a new window/tab), jDownloads provides a wide range of customising for different user groups to have different capabilities.  This might be for instance having a different set of questions asked when creating a new download, or it could be that a particular user-group is limited to a maximum number of downloads per day, and so on.

In summary Joomla! adds considerable flexibility to the access control facilities by allowing a user to belong to multiple user-groups.  In fact every logged on user belongs to multiple groups   This is because Joomla! uses implied group membership by including the parents of the user group to which a user has been joined explicitly.  For example someone who is a member of the Registered Group is also a member of the Public Group as well.   If a user is in a site specific group such as say one called SigUploaders and this group is created with its parent as Publisher then any member of SigUploaders is also a member of  the Publisher, Editor, Author, Registered and Public groups.  So in this situation which user-group will jDownloads use?  This is a single to multiple problem. Of itself there is no unambiguous solution as to which user-group should be chosen from the set of those that the current user belongs.

jDownloads solves this problem through the Ranking value set in the User Groups Settings.  When a user belongs to multiple user groups, either directly or by inheritance, jDownloads uses the one with the highest ranking.   The only users that belong to just one group are those in the Public Group!  To avoid having to revisit the User Group Settings every time a new user group is created then jDownloads creates a new set of User Groups Setting with default values.  The default ranking value is set to zero.  And any user group with a zero ranking is ignored by jDownloads.  This means it is important to use a non zero value for the Ranking. The default Rankings are given below.

To repeat jDownloads uses a ranking system to unambiguously resolve the many to one situation. Each user-group settings may be given an integer ranking value in the range 0 to 32767, where 32767 is the highest ranking.   For all the user-groups to which the user belongs, jDownloads checks each ranking and selects that user-group with the highest ranking value.  The lowest ranking taken into account is unity.  That is any user-group settings with a ranking value of zero is ignored.

Initial State of Rankings


The initial state of the Rankings is Shown in the picture on the near right.







which user group 01

User Groups Settings page

The User Groups Settings start page shows all of the user-group rankings as illustrated in the example on the right.

As can be seen the page gives a good overview.

Note that two user groups have been added: Test-group with a zero ranking; and uploaderUG with a ranking of 131.
which user group 02

Changing the Ranking Value



To change a ranking then click on the particular Group title, the ranking value is immediately below the title as shown opposite

which user group 03
The Ranking allows certainty over which particular User Group Settings will be used for each user group.  Thus as stated in the opening remarks different groups can be set to have different download limits, different groups can be asked different questions when creating a new download.  Rankings enable the power of the user group settings to be used in full.

Colin Mercer July 2019, modified June 2023


Print Email

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.