Does UserRecordAccess report edit-ability of ContentDocument or ContentVersion records?

Every user I query URA with for either object returns HasEditAccess=true even if the content is not shared with them (or with a group they are part of) - that is, they are not Collaborators at all.

| improve this question | | | | |
  • Sorry if that wasn't clear. – newbie Aug 21 '14 at 17:35
  • 1
    What I mean to ask is can the Editablity of a ContentDocument record (or a new version of ContentVersion) be detected using UserRecordAccess. I want to only show a link that allows a new ContentVersion record if the current user is in a CollaborationGroup with Collaborator rights to the ContentDocument.... – newbie Aug 21 '14 at 17:36
  • Are you querying for UserRecordAccess as a foreign key to ContentDocument or directly via the UserRecordAccess object. If as a foreign key, there is a known issue where it reports object level access and not the specific record level access: success.salesforce.com/issues_view?id=a1p30000000T4NxAAK. also review @crmprogdev post as it may apply. A code snippet may help to clarify your question as well. – Eric Aug 21 '14 at 17:49
  • 1
    thanks - I was querying the object directly....from the other answer looks like I was misinterpreting the intent of the object.... – newbie Aug 21 '14 at 19:27

Object level security is different than record level security. What's happening is that you're querying Object level security, which your users will have. Since they may not be the owner of the record, depending on your security model, they may not have edit or even read access to it.

| improve this answer | | | | |
  • 1
    Thanks - i guess the only way to query record level security is to compare the user's public groups / role to the __share tables (or ContentDocumentLink) - It would be nice to have Record Security in a query-able format like we have for Object Security....oh well.... – newbie Aug 21 '14 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.