Create Download from Front End - Permissions and Access
Introduction
Creating a new or editting an existing Download from the front end is a standard jDownloads feature. One of the menu item types available with jDownload is 'Create Download' and this provides the basic mechanism as described in Create Download Menu Item.(Opens in a new window/tab)
Before setting up the menu however there are several other aspects involved and various decisions that need to be made early on.
A key question is “Will all 'uploaders' be able to automatically publish their upload, or will it need approval?”. This could mean we will need two classes of 'uploaders', one class that can automatically publish, and another class that cannot. Another question is "Will the upload always be to a specific Category or will the 'uploader' be able to choose?". This could mean having four classes but in this example we will just have two classes and allow every 'uploader' to be able to select the Category. As jDownloads fully supports Joomla! Permissions and View Access then having two or more classes of 'uploaders' is straight forward. These choices are selectable in the jDownloads User Group Settings as discussed later.
Before setting up the menu however there are several other aspects involved and various decisions that need to be made early on.
A key question is “Will all 'uploaders' be able to automatically publish their upload, or will it need approval?”. This could mean we will need two classes of 'uploaders', one class that can automatically publish, and another class that cannot. Another question is "Will the upload always be to a specific Category or will the 'uploader' be able to choose?". This could mean having four classes but in this example we will just have two classes and allow every 'uploader' to be able to select the Category. As jDownloads fully supports Joomla! Permissions and View Access then having two or more classes of 'uploaders' is straight forward. These choices are selectable in the jDownloads User Group Settings as discussed later.
Create User Groups
General Issues
The first step is to use the Joomla User Manager to create the two User Groups. In this example we will use group names 'uploader' for people who will be able to upload but not publish, and 'uploader-full' for those who can upload and publish a Download.
Whilst the groups could have in principle any parent it is usually best to create the two user groups with Registered as their parent. This avoids unintended consequences such as an 'uploader' user being able to edit articles and similar if you use Editor or any higher level group.
To create a group just go to the Joomla! User Manager and select User Groups. After doing that groups could look like that shown opposite.
The User Manager enables allocating individuals to the relevant group. You might also require people to Register before they can download. So 'uploaders' would belong to both the Registered group and one of the 'uploader' groups.

Whilst the groups could have in principle any parent it is usually best to create the two user groups with Registered as their parent. This avoids unintended consequences such as an 'uploader' user being able to edit articles and similar if you use Editor or any higher level group.
To create a group just go to the Joomla! User Manager and select User Groups. After doing that groups could look like that shown opposite.
The User Manager enables allocating individuals to the relevant group. You might also require people to Register before they can download. So 'uploaders' would belong to both the Registered group and one of the 'uploader' groups.

Whatever group names and parents that you decide to use, the important aspect is to set the permissions on the Categories. It is usually sufficient to just set the permissions in the top level categories as the permissions will automatically cascade from parent to child down the tree.
Before committing it is probably useful to see the explanation and examples in Controlled Access to Categories and Downloads.[NEEDS REF] .
Also bear in mind that if you select a user group parent other than Registered then you may inadvertently give the user edit or similar rights to articles and other items on your website. Of course you could have a your user group with its own branch starting from Registered!
Before committing it is probably useful to see the explanation and examples in Controlled Access to Categories and Downloads.[NEEDS REF] .
Also bear in mind that if you select a user group parent other than Registered then you may inadvertently give the user edit or similar rights to articles and other items on your website. Of course you could have a your user group with its own branch starting from Registered!
Remember that the Joomla! permissions also pass down the User Group Tree. For example if someone is a member of the 'uploader-full' group then they will also be a member of the Registered and Public groups as well.
The 'root' is the Public group. This is also explained in Controlled Access to Categories and Downloads.[NEEDS REF]
The 'root' is the Public group. This is also explained in Controlled Access to Categories and Downloads.[NEEDS REF]
View Access Levels
The next step is to create two Viewing Access Levels, one for each user group. The reasons for this is so that when we create the menu items they will only appear for the appropriate user group menu item.
Here we will call the view levels 'Viewuploader' and 'ViewUploader-full' assigning user groups as illustrated opposite.
You could of course let the 'uploader-full' group have access to both menu items by simply adding the uploader group to the 'ViewUploader-full' Access level.

Here we will call the view levels 'Viewuploader' and 'ViewUploader-full' assigning user groups as illustrated opposite.
You could of course let the 'uploader-full' group have access to both menu items by simply adding the uploader group to the 'ViewUploader-full' Access level.


Menu Items
Whilst doing Joomla! related actions it is probably convenient to create the menu items at this stage.
As shown opposite the key point is that the access is set up to only show the menu item to members of a specific group.
If when creating the User Groups the 'uploader-full' group had 'uploader' as its parent group then members of the 'uploader-full' group would be able to see both menu items as they would also be members of the 'uploader' group by inheritance.

As shown opposite the key point is that the access is set up to only show the menu item to members of a specific group.
If when creating the User Groups the 'uploader-full' group had 'uploader' as its parent group then members of the 'uploader-full' group would be able to see both menu items as they would also be members of the 'uploader' group by inheritance.


In the Menu Options tab set up the appropriate details.


From the front end one or other of the menu items will only appear for users in the appropriate group, unless of course you decided to allow the uploader-full group have access to both menu items as noted earlier.



Setting jDownloads items
Check for Create Permission
Having set up the Joomla! Side of things now look at the jDownload side. Actually the next thing to do is to check that the Joomla! permissions allows Creation of Downloads. The most flexible way of doing this is to use the Permission settings of the top level categories. For each of these categories click on say 'uploader' then this will produce a view like the one opposite, which is a typical default setting.
The important point is that Create is allowed. If it is not allowed then set the middle column entry for the group to 'allowed', then Save and you will be shown the net result. Similarly check out the 'upload' group. If Create permission does not exist for the relevant user group then uploads are impossible.

Set Ranking value
Remember to set the Ranking in User Groups Setting to an appropriate value, say 123 for the uploader group and 125 for the uploader-full group. If a user belongs to more than one group jDownloads uses the group that 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, it is used to select which set of User Group Settings should be used. This is significant for 'uploaders' as it is the User Group Settings that control the questions asked in the upload form. This is discussed below.
We are now done with this one time setup of the access but if you should find that some categories will not allow the user to upload into them then you will need to check and ensure the groups have create permission at each level in the chain. If you originally set up the Public Access or the Registered Access to 'Download Allowed' then the defaults will have set the higher groups access in a suitable manner.
User Group settings
The next stage is configuring the jDownloads User Group Settings. This maybe accessed from the jDownloads Control Panel. Much of what is needed here is covered in detail in Introduction to User Group Settings (opens in new window/tab).So rather than go through those details here we will look at some specific points. Having gone to User Group Settings, selected say the uploader-full group then either click on the name or on the Change Settings button in the toolbar. Then select the Group Creation/Editing Settings as illustrated opposite.The 'May select a different Category' checkbox would normally be ticked.

The 'Publish new Downloads' checkbox could be ticked for the ' uploader-full' group but could perhaps left unticked for the 'uploader' group. Note also that the Allowed File Types text box would usually be edited so as to include more file types such as pdf, doc, docx, jpg, png and so on.
The three coumns below, which appear as a single column further down in the Group Creation/Editing Settings, allow control over what questions are presented to 'uploader' groups.
The title and category are mandatory, but of course the category could be preset. The first column of checkboxes is checked if the question is to be asked. The second one, if present, makes the question mandatory if checked.



ColinM November 2019