Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.1] fix siteadmin check in users connection endpoint#55323

Merged
coury-clark merged 1 commit into
5.1from
backport-55322-to-5.1
Jul 26, 2023
Merged

[Backport 5.1] fix siteadmin check in users connection endpoint#55323
coury-clark merged 1 commit into
5.1from
backport-55322-to-5.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

https://github.com/sourcegraph/sourcegraph/pull/50228 introduced a new actor field on UserResolver to reduce amount of user lookups required.
This wasnt being set in all places (or it was assumed that all instantiation of UserResolver was through NewUserResolver), resulting in actor being unset for this codepath, and hence nil panic when any of the fields that would reference the new field.

Not sure who to request PR review from, so feel free to stamp

Test plan

Added unit test coverage and manual testing in API console

Backport c3bfec8 from #55322

https://github.com/sourcegraph/sourcegraph/pull/50228 introduced a new
`actor` field on `UserResolver` to reduce amount of user lookups
required.
This wasnt being set in all places (or it was assumed that all
instantiation of `UserResolver` was through `NewUserResolver`),
resulting in actor being unset for this codepath, and hence nil panic
when any of the fields that would reference the new field.

Not sure who to request PR review from, so feel free to stamp

## Test plan

Added unit test coverage and manual testing in API console

(cherry picked from commit c3bfec8)
@coury-clark coury-clark enabled auto-merge (squash) July 26, 2023 16:02
@sourcegraph-bot

Copy link
Copy Markdown
Contributor

📖 Storybook live preview

@coury-clark coury-clark merged commit f8ebe36 into 5.1 Jul 26, 2023
@coury-clark coury-clark deleted the backport-55322-to-5.1 branch July 26, 2023 16:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants