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

fix(Permissions Error): Permissions error was persisting after switching organizations #7544

Conversation

gatzjames
Copy link
Contributor

Highlights:

  • Fixes an issue where if permission to create a cloud project/mock-server failed in one organization, switching organizations would reuse the result and incorectly show the previous permission

@gatzjames gatzjames self-assigned this Jun 13, 2024
@gatzjames gatzjames requested a review from a team June 13, 2024 14:15
@jackkav
Copy link
Contributor

jackkav commented Jun 13, 2024

Why does this work?

@gatzjames
Copy link
Contributor Author

Why does this work?

We rely on the result of the fetcher data.error to be there and then show the upgrade modal.
When we create a new project in another org the fetcher runs for the new data but our use effect sees the previous state and shows the needs to upgrade modal.
This is a quirk of having to rely on the fetcher state and subscribing to that with a useEffect.

@gatzjames gatzjames force-pushed the feature/ins-3933-bug-switching-orgs-with-different-feature-flags-doesnt-allow branch 3 times, most recently from 983075a to 78a4641 Compare June 18, 2024 11:29
@jackkav jackkav force-pushed the feature/ins-3933-bug-switching-orgs-with-different-feature-flags-doesnt-allow branch from 78a4641 to 0163946 Compare June 20, 2024 10:36
@jackkav jackkav merged commit e2759d5 into Kong:develop Jun 20, 2024
5 checks passed
stefancruz pushed a commit to stefancruz/insomnia that referenced this pull request Jun 30, 2024
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.

None yet

2 participants