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

feat: warn when setting project/org #194

Merged
merged 2 commits into from
Dec 5, 2024
Merged

feat: warn when setting project/org #194

merged 2 commits into from
Dec 5, 2024

Conversation

ctrox
Copy link
Contributor

@ctrox ctrox commented Dec 5, 2024

When setting the project or organization, it will now warn you if the
project does not exist, your current user does not have access to it or
if the organization is not in the list of available organizations. We
don't error out to still support some use-cases where a user might not
have the permission to get a project or might not be fully part of an
org but might still have access to some resource in it.

The first commit just refactors some code I had to touch for this.

ctrox added 2 commits December 4, 2024 16:21
everywhere we read the extension, we just need the org name so move this
into a method on the client to make sure we always return the correct
error message.
When setting the project or organization, it will now warn you if the
project does not exist, your current user does not have access to it or
if the organization is not in the list of available organizations. We
don't error out to still support some use-cases where a user might not
have the permission to get a project or might not be fully part of an
org but might still have access to some resource in it.
auth/set_project.go Show resolved Hide resolved
@ctrox ctrox merged commit 834497b into main Dec 5, 2024
2 checks passed
@ctrox ctrox deleted the set-project-check branch December 5, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants