Keyword

Media Manager access to all image folder contents to all Users

  • George
  • George's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175852 by George
On the front end when adding/editing an item on the image and attachment tabs, you have the option to upload an image or document, but you are also given the option to search the server to conect with the item. This opens up the k2 media manager” which reveals the entire /images folder of the site. How would I restrict this to a dedicated folder for the user and hide all other content? I am looking for this to be similar to the way JCE and Simple Image Gallery works, which allow the user only access to their own folder and cannot view or use files from other folder/users.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #175855 by JoomlaWorks
What editing rights does the user have? If you're logged in as a super user, it's normal to see everything...

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • George
  • George's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175861 by George
Not this is a simple registered user. Users with "registered" rights seem to have a read access to all files in /images directory. Which is not intended, they see everything in this folder and each icon is marked with padlock as shown in the screen capture, so they can delete but can download and use.

I am not sure how to modify this so that it works like Simple Image Gallery and JCE and separates user access to their own folders. Registered Users should be able to upload and download only attachments and images form their own folder and not see or access others. I cannot see any settings that would configure this?

Please Log in or Create an account to join the conversation.

  • George
  • George's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175862 by George
Sorry forgot the attachment
Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #175865 by JoomlaWorks
There aren't any settings for that. Additionally, anything inside /images is public either way. So there is really no point in hiding anything.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • George
  • George's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175866 by George
Agreed that they can gather these images from the front end by right clicking but it still looks messy to allow registered users to access the back end files even if it is just for download.

Is it possible to turn off the "search browser" button in the image and attachment upload tabs in K2? This is not useful for our User case and just opens the backend up to our users?

I don't seem to be able to find the right line of code to in the template override to do that.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #175867 by JoomlaWorks
To hide the relevant upload options, create an override for /components/com_k2/default/itemform.php. That file is empty on purpose. So just copy the contents of the one that it references inside. Then modify as you want, inside your template's html/com_k2/default/itemform.php file.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • George
  • George's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175870 by George
Hi Fotis,

Yes that was my backup option. I use the template overrides already for other customisations but I was hoping for a more elegant solution at User access levels or system configuration. I am not sure what user case for a normal User would need to access the back end image folder from the front end so would have expected an option to switch off without template override.

Nevertheless, I have commented out in the "itemform.php" for each of my categories the "browse server" fields on the image tab as follows

<!--
<span class="sep"><?php echo JText::_('K2_OR'); ?></span>
<input type="text" name="existingImage" id="existingImageValue" class="text_area" readonly />
<input type="button" value="<?php echo JText::_('K2_BROWSE_SERVER'); ?>" id="k2ImageBrowseServer" />
-->

I included the above for the benefit of other forum users who may have similar issue as me.

However, I was not able to find the right class to do the same for the attachment field as it seems the classes here are defined elsewhere. Could you point me in the right direction for this tab to hide the "browse server" fields?

Much appreciated for any help on this last point.
Thanks

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #175880 by JoomlaWorks
I recommend that you use CSS to hide these fields (with display:none;). Target them by their id or class attributes.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • George
  • George's Avatar Topic Author
  • Offline
  • New Member
More
4 years 6 months ago #175888 by George
Thank you Fotis,

yes that is a neater solution. All done.

Just to say thank you for you quick and useful feedback, it what makes K2 a great extension to work with.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum