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

Error out if creds has no project access #748

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

manish-hashicorp
Copy link
Contributor

@manish-hashicorp manish-hashicorp commented Feb 6, 2024

🛠️ Description

We recently introduced no-role access which allows a user to become member of the org without access to any project. If such a user tries to use the provider then it will panic because the provider expects to have at least one project in project.List response which in this case will be empty array. Instead of panicing, error out saying the provider needs access to at least one project.

🏗️ Acceptance tests

  • Are there any feature flags that are required to use this functionality?
  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

We recently introduced no-role access which allows a user to become
member of the org without access to any project. If such a user tries to
use the provider then it will panic because the provider expects to have
at least one project in project.List response which in this case will be
empty array. Instead of panicing, error out saying the provider needs
access to at least one project.
@manish-hashicorp manish-hashicorp requested a review from a team as a code owner February 6, 2024 20:27
@manish-hashicorp manish-hashicorp merged commit b396bee into main Feb 9, 2024
6 checks passed
@manish-hashicorp manish-hashicorp deleted the handle-no-project-access branch February 9, 2024 00:25
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

Successfully merging this pull request may close these issues.

2 participants