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, different groups could have different custom questions, 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.  Of all the groups a user belongs too then 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 the default ranking is automatically 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 has introduced a ranking system to resolve the unambiguously solve the many to one situation. Each set of 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 the 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.

Ignoring the zero ranking is important because when a new user-group is created by the Joomla User Manager then a new set of user-group settings will be created automatically by jDownloads.  This new set will, by default, be created with a zero ranking.  This means that it will not change any ranking precedence that has already been set up.  In other words a jDownloads administrator only has to be concerned with those user groups that are 'used' in connection with jDownloads.  Typically this is less than half a dozen or so user-groups.

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



 The initial state of the Rankings is


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


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 2014, modified December 2014


Tags: faq32

Print Email