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

gitserver: Move subrepoperms checks back to client #62022

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

eseliger
Copy link
Member

While starting this migration, it felt nice to move sub repo permission checks to the server side, because that means we can make certain optimizations and none of the clients need to reimplement the SRP checker implementation.

However, this moves sub repo authz over the wire, but doesn't move repo perms generally here, so this was a weird split.

This also unnecessarily couples Sourcegraph and gitserver, so for now this is going back into the client layer, like all the auth checks.

Please make sure to pay good attention to the backend and client implementation and help me validate that those are indeed equal.

Test plan:

Added tests, E2E perforce subrepo perms tests are still passing.

@github-actions github-actions bot added team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all labels Apr 18, 2024
@eseliger eseliger force-pushed the es/04-13-gitserverrenamerepoupdatetofetchrepository branch from a5ab314 to 0dd9747 Compare April 18, 2024 22:14
Base automatically changed from es/04-13-gitserverrenamerepoupdatetofetchrepository to main April 18, 2024 22:48
@eseliger eseliger force-pushed the es/04-18-gitservermovesubrepopermschecksbacktoclient branch from 50022bb to 4949f44 Compare April 18, 2024 23:14
While starting this migration, it felt nice to move sub repo permission checks to the server side, because that means we can make certain optimizations and none of the clients need to reimplement the SRP checker implementation.

However, this moves sub repo authz over the wire, but doesn't move repo perms generally here, so this was a weird split.

This also unnecessarily couples Sourcegraph and gitserver, so for now this is going back into the client layer, like all the auth checks.

Please make sure to pay good attention to the backend and client implementation and help me validate that those are indeed equal.

Test plan:

Added tests, E2E perforce subrepo perms tests are still passing.
@eseliger eseliger force-pushed the es/04-18-gitservermovesubrepopermschecksbacktoclient branch from 4949f44 to 02b05dc Compare April 18, 2024 23:47
@eseliger eseliger marked this pull request as ready for review April 19, 2024 00:05
@eseliger eseliger requested a review from a team April 19, 2024 00:05
@eseliger eseliger merged commit 4ad9fcf into main Apr 24, 2024
@eseliger eseliger deleted the es/04-18-gitservermovesubrepopermschecksbacktoclient branch April 24, 2024 23:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants