BulkSet AccessControls returns a list of successful entries without any changes made to them

  • 1
  • Problem
  • Updated 4 weeks ago
I am using the Java SDK and have created a SFAccessControlsBulkParams object and populated it with a list of SFAccessControlParams where each AccessControl have a user with email as its only declared variable. Other than that, I set canView, canDownload and canUpload to false for each user. When I call SFAccessControlsEntity.bulkSet i get a list of successful entries back where all users still have canView, canDownload and canUpload set to true. 
Does anyone know why this is happening?

This is basically how my data is structured: 
{
"NotifyUser":false,

"AccessControlParams":
    [
        {
        "AccessControl":
        {
            "Principal":{"Email":"user1@company.com"},
            "CanUpload":false,
            "CanDownload":false,
            "CanView":false
        },
        "NotifyUser":false
        },
        {
        "AccessControl":
        {
            "Principal":{"Email":"user2@company.com"},
            "CanUpload":false,
            "CanDownload":false,
            "CanView":false
        }
        "NotifyUser":false
        }
    ]
}
Photo of Markus Pike

Markus Pike

  • 5 Posts
  • 0 Reply Likes

Posted 4 weeks ago

  • 1
Photo of Nick Nicholls

Nick Nicholls, Employee

  • 21 Posts
  • 2 Reply Likes
We require you set at least one of Upload/Download/View to true.
You can play around with the different valid combinations on the sharefile website (navigate to a folder and select "Add People to Folder").

Does it work if you try something like:

        "AccessControl":
        {
            "Principal":{"Email":"user1@company.com"},
            "CanUpload":false,
            "CanDownload":false,
            "CanView":true
        }
Photo of Markus Pike

Markus Pike

  • 5 Posts
  • 0 Reply Likes
Thank you for the quick reply. So I guess we have to remove the AccessControl in order achieve the same effect as setting Upload/Download/View to false?
Photo of Nick Nicholls

Nick Nicholls, Employee

  • 21 Posts
  • 2 Reply Likes
That is correct. This method is "SFAccessControlsEntity.delete(url)"