Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bduffany committed Dec 19, 2024
1 parent 327a776 commit b9fead3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions enterprise/server/webhooks/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ func (*githubGitProvider) IsTrusted(ctx context.Context, accessToken, repoURL, u
}
return false, status.UnknownErrorf("get permission level: %s", err)
}
// Trusted workflows get cache write perms, so if the user doesn't have
// write perms for the repo then don't consider the workflow trusted.
return level.GetPermission() == "admin" || level.GetPermission() == "write", nil
}

Expand Down

0 comments on commit b9fead3

Please sign in to comment.