Closed eizedev closed 4 years ago
@eizedev
I hate to say it but it works for me.
$PasswordStateURL = 'https://pws/winapi'
$jsonData = '
{
"FolderID":"389",
"Permission":"A",
"ApplyPermissionsForSecurityGroupName":"LDS_DevOps"
}
'
$result = Invoke-Restmethod -Method Post -Uri "$PasswordstateURL/folderpermissions" -ContentType "application/json" -Body $jsonData -UseDefaultCredentials
As you can see i used the same command as you just edited my folderid and group.
I'll send you my Azure test environment details and you can use it if you'd like to see if you still get the same?
I'll review the pull request now.
@dnewsholme
Thanks for testing! :) But this is good news in general, at least I know that it works in general. The new functions should work, so feel free to test them after the merge.
In the meantime I will test it in your test environment, thanks for the email with the data. (currently i get a problem while authenticating with customcredentials, but that could possibly be a proxy issue)
@dnewsholme @trir262
I have opened a new pull request #114 which adds a few new functions, a rewrite of the New-PasswordStatePassword function (backward compatible - added all available api options and fixed some bugs). Some of these functions can be used to get/set/change/remove permissions of passwordstate objects. I have added the
New-*Permission
functions for now and not all*Permission
functions because of i have some problems testing these functions. I have opened a thread in the clickstudios community forum where i described my problem. I cannot use the*permission*
api methods at all, my functions and the example api request should work. Please take a look at this forum post.Example for the folders function: New-PasswordStateFolderPermission
Is it possible for you to test the new functions in your test or production environment for functionality? If it works for you, then it is because of my environment and I have to take a closer look. If not, could you please write this in the forum under my post?
Thanks :)