function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RichardR1RichardR1 

How to remove access to files or attachments from a user

Just like I can remove access to a particular object, how can I remove the user's access to Files or Attachments? Right now they can still access it if they use the global search function. I think there is no way to disable the global search function too. Any ideas?
VinayVinay (Salesforce Developers) 
Hi Richard,

Try below.

Quick Find box, and select Profiles. Click Edit next to the user profile you want to change. In the Administrative Permissions section, enable or disable the Select Files from Salesforce checkbox, and click Save.

Also you cannot turn off Global search function for particular user,  check below Idea link for same and vote for this feature.

https://trailblazer.salesforce.com/ideaView?id=08730000000l31zAAA

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Suraj Tripathi 47Suraj Tripathi 47
Hi,

Please follow the below code:- https://help.salesforce.com/articleView?id=collab_files_change_access.htm&type=0#:~:text=On%20the%20file%20preview%20page,to%20stop%20sharing%20the%20file.

Please mark it as Best Answer if it helps you.

Thanks & Regards
Suraj Tripathi

 
mukesh guptamukesh gupta
Hi Richared,

Your files in Salesforce can be private to you, privately shared, or visible to your entire company.
User-added image

When a file sharing is private, only the file owner (the one who upload the file) and users with Modify All Data permission (this includes your System Administrators) will able to see the file, but not for users with View All Data permission. However, for Privately Shared files, users with "View all Data" permission will be able to see it.

Here actions user can do with the file by file owner, collaborator and viewer:

User-added image

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh