0

In my org there is a permission set group called ReadOnlyFundingOpportunity with the following permission sets:

  • ReadOnlyFundingOpp on the FundingOpportunity object.

I assumed a user assigned with this permission set group should not be able to upload Files. However, I found out during testing that all the fields were read-only but I could still upload files to a record. This user is not assigned with other permission sets.

I'm confused because I found conflicting info

Read and Edit permissions are required (It's for Attachments but I thought there's little difference between the 2?)

Allow Read only users to Attach files to records

Insufficient privileges when uploading attachment to record

Read and Edit permission sets are not required

https://ideas.salesforce.com/s/idea/a0B8W00000GdaSMUAZ/controlling-permission-on-notes-attachments-irrespective-of-objective-perm

Read-only permissions on Files

Is there a setting for this or an Apex-based solution?

3
  • You could always add a Custom Permission to the PS and test that in Apex on a trigger on ContentDocumentLink.
    – cropredy
    Commented Dec 1, 2023 at 18:47
  • What do I put in the custom permission? I already has read-only for the object
    – ash
    Commented Dec 3, 2023 at 10:00
  • the custom permission can be tested in apex to see if the running user has that permission - and then the trigger can do addError if they try and upload a file
    – cropredy
    Commented Dec 3, 2023 at 20:46

0

You must log in to answer this question.

Browse other questions tagged .