codefresh-io / terraform-provider-codefresh

Terraform provider for the Codefresh API
https://registry.terraform.io/providers/codefresh-io/codefresh
Mozilla Public License 2.0
18 stars 24 forks source link

Fix - codefresh_current_account data source returns 403 #143

Closed ilia-medvedev-codefresh closed 7 months ago

ilia-medvedev-codefresh commented 7 months ago

What

Remove unnecessary call to GetUserByID that requires admin token to get the account admins info. Instead infer admin info from /user endpoint which returns the info for all users. As admins are also users the data is there, it is enough to just locate the admins in this existing list.

Why

Closes #131

Notes

Checklist

ilia-medvedev-codefresh commented 7 months ago

/test

ilia-medvedev-codefresh commented 7 months ago

/test

ilia-medvedev-codefresh commented 7 months ago

/test