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: Fix repeated 403 due to app namespace being undefined (#20699) (cherry-pick #20819) #20860

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked fix: Fix repeated 403 due to app namespace being undefined (#20699) (#20819)

Fixes #20699

Constructor may not get called every time the application changes, so previous this.appNamespace could be stale. But the update to use this.props.match.params.appnamespace could also fail if it's undefined.
As a fix, create and use a helper function getAppNamespace which has a special case handling for undefined.

Also, use a namespaced endpoint when namespace is not undefined.

It needs to be cherry-picked to v2.11-2.13.

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

…20819)

Fixes #20699

Constructor may not get called every time the application changes, so previous this.appNamespace could be stale. But the update to use `this.props.match.params.appnamespace` could also fail if it's undefined.
As a fix, create and use a helper function `getAppNamespace` which has a special case handling for undefined.

Also, use a namespaced endpoint when namespace is not undefined.

It needs to be cherry-picked to v2.11-2.13.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
@gcp-cherry-pick-bot gcp-cherry-pick-bot bot requested a review from a team as a code owner November 20, 2024 10:57
@pasha-codefresh pasha-codefresh merged commit 68606c6 into release-2.13 Nov 20, 2024
18 of 19 checks passed
@pasha-codefresh pasha-codefresh deleted the cherry-pick-944d92-release-2.13 branch November 20, 2024 11:13
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