Skip to content

Commit

Permalink
Make GitHub wpt org admins have admin access to wpt.fyi
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnedders committed Sep 17, 2024
1 parent 30026bc commit a59e9bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shared/github_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ func (gaci githubAccessControlImpl) IsValidAdmin() (bool, error) {
if !valid {
return false, errors.New("Invalid access token")
}
membership, _, err := gaci.oauthGHClient.Organizations.GetOrgMembership(gaci.ctx, "", "web-platform-tests")
if err == nil && *membership.Role == "admin" {
return true, nil
}
key := gaci.ds.NewNameKey("Admin", gaci.user.GitHubHandle)
var dst struct{}
if err := gaci.ds.Get(key, &dst); err == ErrNoSuchEntity {
Expand Down

0 comments on commit a59e9bf

Please sign in to comment.