Support for removing a user's team assignments
I think this comes down to the incremental vs partial choice in the api I managed to add new teams to a users, it was really easy because I just had to give the new team's id and it was added on the existing... but I knew this would probably be a problem if I wanted to remove that after.
~~Ah nevermind ! I could use the update_team and do the whole thing there also~~
Damn... the update_team is also incremental... there's no function yet to remove people from teams I think @tjarrettveracode ....
Yeah, the way you have to do it is to fetch the team's current info, remove the user from the list of team members, and update the team with the updated list. I don't think you need to specify incremental in that case…
But I think the incremental is hardcoded so I can't do a full replacement of the team members
Just checked and the Params are hardcoded yeah
@tjarrettveracode Here's why I think it's currently not possible to remove a user from a team, from the user's API, it's hardcoded incremental. So I'll implement the other way as you mentioned, take the whole team members and remove, and push that to the team again https://github.com/veracode/veracode-api-py/blob/main/veracode_api_py/identity.py#L110
I actually don't think there is an API in the client to get all the members in a team right now... so I can't do that pull, remove, replace either
Created https://github.com/veracode/veracode-api-py/issues/46 because it's needed for this issue