Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for removing a user's team assignments #45

Open
Gby56 opened this issue Dec 2, 2022 · 6 comments
Open

Support for removing a user's team assignments #45

Gby56 opened this issue Dec 2, 2022 · 6 comments

Comments

@Gby56
Copy link
Contributor

Gby56 commented Dec 2, 2022

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.

@Gby56
Copy link
Contributor Author

Gby56 commented Dec 2, 2022

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 ....

@tjarrettveracode
Copy link
Member

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…

@Gby56
Copy link
Contributor Author

Gby56 commented Dec 2, 2022

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

@Gby56
Copy link
Contributor Author

Gby56 commented Dec 13, 2022

@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

@Gby56
Copy link
Contributor Author

Gby56 commented Dec 13, 2022

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

@Gby56
Copy link
Contributor Author

Gby56 commented Dec 13, 2022

Created #46 because it's needed for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants