Which User-Group is Used?

All logged on users are in multiple groups.  Which User Group Setting values are used?

Which User Group is used?

As described in the article Introduction to User Group Settings, 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.

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

which user group 01

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

As can be seen the page gives a good overview.
which user group 02

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

Print Email

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.