This repository was archived by the owner on Sep 30, 2024. It is now read-only.
[gitlab] Disable repo permissions syncing if auth type is oauth#51452
Merged
[gitlab] Disable repo permissions syncing if auth type is oauth#51452
Conversation
sashaostrikov
approved these changes
May 4, 2023
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff d18f9de...5cd5710.
|
kopancek
reviewed
May 4, 2023
Contributor
kopancek
left a comment
There was a problem hiding this comment.
Suggested some wording changes
Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>
Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>
github-actions bot
pushed a commit
that referenced
this pull request
May 4, 2023
(cherry picked from commit f20f1ed)
unknwon
pushed a commit
that referenced
this pull request
May 4, 2023
… is oauth (#51460) Disables repo-based permissions syncing if the auth provider type for a GitLab code host connection is set as oauth. Repo-based permissions syncing has a lot of gotchas when it comes to token permissions, and they are _very_ hard to debug and fundamentally flawed. ## Test plan Updated unit tests <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> <br> Backport f20f1ed from #51452 Co-authored-by: Petri-Johan Last <petri.last@sourcegraph.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disables repo-based permissions syncing if the auth provider type for a GitLab code host connection is set as oauth. Repo-based permissions syncing has a lot of gotchas when it comes to token permissions, and they are very hard to debug.
In particular, when GitLab Groups are involved, which users a token can and cannot see become a bit unpredictable.
Test plan
Updated unit tests and verified locally by doing the following:
Set up a GitLab Project
Invite a group that the owner of the GitLab Project is not a part of
Set up a code host connection using the owner of the project's Personal Access Token
Before this PR:
Users of the invited group would lose access to the project whenever the project's repository permissions are synced, and they would regain access when their own permissions are synced.
After this PR:
User access is consistent, as access is only managed by their own token.