Page 1 of 1
default permission level when admin uploads files
Posted: 27 Nov 2015, 02:53
by caliber
how can i set the default user level to "registered" when an admin uploads a file in the admin side of the website. We have many admins uploading and this is a common step that is missed. Is there a way to set it so any file is set to registered by default instead of public?
Re: default permission level when admin uploads files
Posted: 28 Nov 2015, 17:37
by Jan
Hi, when the file is uploaded and added in file edit, then you can set the rights directly there.
When the files are uploaded and added by multiple add function, there is no option to set rights, so this needs to be customized:
- to add the form of access rights
- and to manage it in controller and model when the form is sent
Jan
Re: default permission level when admin uploads files
Posted: 16 Dec 2015, 23:39
by caliber
we are looking to have it so that when an admin uploads from the admin of the site. When uploading a new document it is "registered" by default so t hat they do not have to choose the drop down to make it registered. Is there no way to do this?
Re: default permission level when admin uploads files
Posted: 18 Dec 2015, 02:34
by Jan
Hi, then you can set id directly in the code - 1 or 0 (depends on your needs) which will be set directly - without using the form select box
Jan
Re: default permission level when admin uploads files
Posted: 05 Jan 2016, 21:19
by caliber
what i am trying to accomplish is that when an admin or manager created a new file that the only access levels available is registered. Or i want to make registered default instead of having public default. We are trying to make it so that any manager creating a new file cannot accidentally have it set to public.
I have been unsuccessful in finding what file to edit to accomplish this.
Re: default permission level when admin uploads files
Posted: 07 Jan 2016, 15:04
by Jan
Hi, so instead of adding a select box - to check if the file will be for registered or public, you can set it directly in the code - so when uploading a file, the file will be directly set e.g. to registered and the one who uploads, do not change anything
Jan
Re: default permission level when admin uploads files
Posted: 25 Jan 2016, 01:24
by caliber
I see someone else is trying to do the same thing and doesnt appear to work.
http://forum.joomla.org/viewtopic.php?f=727&t=904156
I need to set a default value for the accesslevel in my code (not in admin panel) however when I add it, it does not work
Code:
<field name="access" type="accesslevel" default="2" label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" class="inputbox" size="1" />
If I do this, it does not work too!
Code:
<field name="access" type="radio" default="2" label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" class="btn-group btn-group-yesno">
<option value="8">Clients</option>
<option value="5">Guest</option>
<option value="1">Public</option>
<option value="7">Staff</option>
<option value="6">Super Users</option>
<option value="2">Registered</option>
<option value="3">Special</option>
</field>
any guidance on how to update the code would be greatly appreciated
Re: default permission level when admin uploads files
Posted: 27 Jan 2016, 13:00
by Jan
Hi, it depends where you add this code, if e.g. in frontend upload and there is no such code before, the controller and model needs to be customized too, so it can get this value (controller), manage it (controller) and store it to database (model)
Jan