Hide user list in File field

More
12 years 11 months ago #20806 by ma57er
Registered users can publish items in the site. I want to activate and file upload field for them, but i don't want they can see other users files (now they see userlist in the form). Can be done this? (this is suggestion for future feature too).

I use FC 1.5.4 & Joomla 1.5.25

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

More
12 years 11 months ago #20823 by ggppdk
Replied by ggppdk on topic Hide user list in File field
This is already implemented if you have FLEXIaccess, but you can force to be limited to the owner (uploader)

-- In file administrator/components/com_flexicontent/models/filemanager.php

Replace line:
$CanViewAllFiles = ($user->gid < 25) ? FAccess::checkComponentAccess('com_flexicontent', 'viewallfiles', 'users', $user->gmid) : 1;

with:
$user =& JFactory::getUser();
$CanViewAllFiles = ($user->usertype == "Super Administrator") || ($user->usertype == "Administrator);

This way, the $CanViewAllFiles will be zeroed for all non-administrator users, and the file list will display only the user uploaded files.

NOTE: this is a core hack, PLEASE make a special file fc_upgrade.txt, to take note to reapply hack if you upgrade.

Usually, i don't POST or recommend hacks

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 11 months ago #20829 by ma57er
Replied by ma57er on topic Hide user list in File field
Thank you a lot, ggppdk! You are best! Really!

You spend lot of time to help users and this is truly commendable

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

More
12 years 11 months ago #20830 by ma57er
Replied by ma57er on topic Hide user list in File field
Hmmm, nothing happen with this modification. Am i wrong somewhere?

When i make changes i continue to see userlist in "Select Uploader" and can see other users files.

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

More
12 years 11 months ago #20849 by ggppdk
Replied by ggppdk on topic Hide user list in File field
Are you logged as admin?

An administrator will see all


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 11 months ago #20856 by ma57er
Replied by ma57er on topic Hide user list in File field
I tested with admin user and normal (registered) and there is no difference.

I will test again now step by step (to be 101% sure)

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.755 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline