Skip to content

fix: Ensure GitHub OAuth2 users are active in organization #4416

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

Merged
merged 2 commits into from
Oct 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix PR comment
  • Loading branch information
mafredri committed Oct 7, 2022
commit d0dbf6469ee0b35dd30edcf5c355be80560ae28d
3 changes: 2 additions & 1 deletion coderd/userauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func TestUserOAuth2Github(t *testing.T) {
t.Parallel()

stateActive := "active"
statePending := "pending"

t.Run("NotInAllowedOrganization", func(t *testing.T) {
t.Parallel()
Expand Down Expand Up @@ -307,7 +308,7 @@ func TestUserOAuth2Github(t *testing.T) {
OAuth2Config: &oauth2Config{},
ListOrganizationMemberships: func(ctx context.Context, client *http.Client) ([]*github.Membership, error) {
return []*github.Membership{{
State: nil,
State: &statePending,
Organization: &github.Organization{
Login: github.String("coder"),
},
Expand Down