News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Front End Child Category Uploads

Started by chepp, 27.05.2016 17:53:48

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chepp

The staff at my organization would like to upload documents students to download. The download structure looks like this:

Public
|-Registered User
|- - Student Files
| - - - Group 1
| - - - Group 2
| - - - Group 3
| - - Additional Groups

I would like to give the staff upload access to Student categories as well as the associated child categories (Groups 1 - 3), but not permit access to Registered User category or the Additional Groups categories. Is this possible?

Thanks
  •  

ColinM

Hi
Yes this is very possible but I would advise a different category structure because of the Joomla! inheritance rules.  The scheme you indicated is logical but does not map well into the Joomla! Permissions.   Also please look at the documentation section
http://www.jdownloads.net/documentations/category/access-controls-and-user-group-permissions

There are two aspects: the ability to download and the ability to view the Downloads.  An obvious implication is that if you cannot see something you cannot download it. The ability to see something is controlled by the View Access Level.  Permissions to do things are controlled on a User Group (UG) basis.  Also note that users may belong to multiple UGs. So the process is defining a set of UGs and view Access Levels.

If at some juncture you think to use a Deny permission then please think again as Deny has many unintended consequences!

The scheme outlined below is simplistic to aid understanding. More sophisticated variants are obviously possible.  Also note that the names I am using are aimed at improving understanding rather than being 'nice'.

The first step is to create a set of UGs for each Student Group, called say SG1ug, SG2ug, and so on.  In all cases ensure that the Parent UG is the Registered UG.  Also create UGs for the uploaders called say UP1ug, UP2ug and so on.  The Parent for these UGs will be  SG1ug for UP1ug, and so on.  This arrangement means that the UP<n>ug's will inherit any permissions we give to their parent UG.  We also need to create an uploader UG for the PublicCat which we can call UPpub-ug.

Now create the view Access levels View1, View2 and so on where the member UGs of View1 are SG1ug and UP1ug, and so on. Also create an Access level View123 wth members SG1ug, UP1ug, SG2ug, UP2ug, SG3ug and UP3ug UGs.

I would suggest you create two top level jD Categories.  One of these would be called say PublicCat and the other called StudentsCat. These cats have no parent. This may clearly be extended to other classes of users such as StaffCat.

The PublicCat would have appropriate sub categories, sub sub cats and so on as you find you need.  The StudentsCat would have subcats Group1Cat, Group2Cat and so on and each of these subcats would have StudentsCat as their parent. There may of course be sub sub cats, and so on.

The structure is now complete except for allocating the Permissions, the Access levels and in the case of the Uploader UGs the abilities each uploader UG is permitted in the jD User Groups Settings. In this scheme we only need to set Permissions and view Access levels to the top level cats and for the students the first sub cat level.

Just in case there are existing permissions go to Options on the jD Control Panel tool bar.  Ensure all UGs, especially the Public Ug has its permission set to Inherit, and Save as it is the Save which executes setting the permissions.  At this juncture no one should be able to Download.  You can also use the Permission reset tools in the jD Tools section to get to a known basis.

Select the PublicCat and in Permissions choose the Public UG.  Set Download Permission to Allow and Save.  This will cascade to all the subcats of PublicCat. Now go to the UPpub-ug and set permissions on Create, Edit and maybe Delete to Allowed, and Save.  The Download permission should have been inherited.  Also ensure that the Access level is set to Public.  In User Groups Settings set a suitable Ranking value and other settings for the UPpub-ug.

Select the StudentsCat and set its Access level to View123, and set Download permission to Allowed for the SG1ug, SG2ug and SG3ug UGs. Remember to Save. For the UP1ug UG in the StudentsCat set Create, Edit, Edit Own and perhaps Delete permissions to Allowed, and Save. Repeat for the UP2ug and the UP3ug UGs, and Save.

Now set the view Access level for Cat Group1Cat to View1, for Cat Group2Cat to View2, and so on.

The above scheme should wok fine but it could be improved.  In particular consider calling a student group UG by say its entry year, for example EntryOf2014-setA-UG.  That will avoid having to change the user group members each year.  Instead just change the permissions for the relevant Category.

Colin
Colin M
  •  

chepp

Sorry -- my question was poorly worded.

All students, parents and Staff are registered members and can access all the files listed. They have access to view all files included in Registered and everything below it (Student Files and subs, additional groups, etc.) . I'm not blocking view access anywhere past Registered. I'm not looking to control who can view which files. I have that figured out and it is working.

My question is how to control staff uploads. They do not have access to the administrative back-end, so they need to upload files from the front end. I want them to be able to upload to the Student Files category and all the related child categories, but not to any of the other categories on the site (there are many categories on the site that were omitted from the example). The only reason for the separate groups under Students is to organize the files on the front end for the students to download using {jd_file category==##} for each subcategory.

I set up a menu item on the front end that only staff and administrators can see. I can set up the default category to Student Files, but then the staff cannot upload to the sub-categories. If I don't set the default category, they can upload to any category. There is a chance they will upload files to the wrong place since I have many other categories with similar names for other purposes. The staff has no means to correct any errors since they do not have access to the back end. 

I attached a graphic that may better explain my example.

Thanks

[gelöscht durch Administrator]
  •  

ColinM

Hi
OK I now understand that it is just a  creating/editing Downloads problem.
The scheme below should meet your needs.  Please see pic students01.png for end result where users who are members of a particular UG are able to upload to Categories Students, Group1 and Group2 (I only setup two groups).

To check out I created a top level cat called RegUser with a subcat Sudents. In turn Students had subcats Group1 and Group2.  See students02.png.
There were multiple steps.
1. Created UG 'StudentsUploaderUG' with parent Registered.
2. Created view Access level 'ViewStudentUpload'.
3. Created Menu Item 'StudentsUploadMenu' of jDownloads type- 'Create Download' and view Access ViewStudentUpload.
4. Set ranking for StudentsUploaderUG to 119 and allowed 'may select a different category' etc  see students03.png.   
5. Went to jD category Students - selected Permissions and UG StudentsUploaderUG.  Allowed permissions as shown in students04.png
6. Checked permissions in jD cat Group1 for UG StudentsUploaderUG were correctly inherited -see students05.png
7. Created user 'UploaderToStudents' as member of UG StudentsUploaderUG. Is also member of Registered either explicitly or implicitly by inheritance.
8. Tested with user UploaderToStudents using both the menu item and the Add Button

Colin
PS If the a user in StudentsUploaderUG also needs to load elsewhere from Front End You will need another UG for such users and set it with a higher ranking

[gelöscht durch Administrator]
Colin M
  •