SOAP - How to get list of Virtual Directories for a user?
Is it possible to get a list of virtual directories for a user with SOAP (eg. powershell)?
From what I can see its possible to add a virtual directory or remove but there is no option to list them?
getUserInformationRequest also doesnt have this information.
Is such information available through SOAP and if no, would it be possible to add it somewhere?
-
Official comment
You will have to access the directories assigned to the user explicitly as well as those assigned to groups the user is a member of.
`GetUserInformation` returns a user object having a `rootList` property representing all of the virtual directories directly assigned to the user.
Here is a code-snippet that assumes you have have dot-sourced Example-UserManipulation.ps1 from our examples:
PS > $getUserRequest.userName = "loadtest"
PS > $getUserResp = $CerberusSvc.GetUserInformation($getUserRequest)
PS > $getUserResp.UserInformation.rootList
name path permissions
---- ---- -----------
ftproot c:\ftproot CerberusFtp.DirectoryPermissions
nodl c:\ftproot CerberusFtp.DirectoryPermissionsThen examine the groups the user is a member of for more virtual directories they have access to:
PS > $getUserResp.UserInformation.groupList
name
----
SimpleDirModeDisabled_anotherroot
PS > $getGroupRequest.name = "SimpleDirModeDisabled_anotherroot"
PS > $getGroupResp = $CerberusSvc.GetGroupInformation($getGroupRequest)
PS > $getGroupResp.group.rootList
name path permissions
---- ---- -----------
c c CerberusFtp.DirectoryPermissionsComment actions
Please sign in to leave a comment.
Comments
2 comments