ShareFile-PowerShell icon indicating copy to clipboard operation
ShareFile-PowerShell copied to clipboard

cannot remove access

Open robertfshort opened this issue 6 years ago • 0 comments

I tried two options for removing a users access to a folder:

$ACLuser = new-object ShareFile.Api.Models.AccessControl
$ACLuser.Principal = $USER
$ACLuser.CanUpload = $false
$ACLuser.CanDownload = $false
$ACLuser.CanDelete = $false
$ACLuser.CanManagePermissions = $false
$ACLuser.Canview = $false

    Send-SfRequest -Client $sflogin -Method patch -Entity Items -id $folder.id -navigation accesscontrols -Body $ACLuser

Or Send-SfRequest -Client $sflogin -Method delete -Entity items -id $folder.id -navigation accesscontrols -body $user

In the first instance, it doesn't change the user's access. In the second instance I get an error stating Method Not Allowed.

Judging by the documentation here: http://api.sharefile.com/rest/docs/resource.aspx?name=AccessControls this should not only be possible, but should be how to accomplish it as well.

robertfshort avatar Nov 12 '19 18:11 robertfshort