File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,9 @@ func (api *API) userAuthMethods(rw http.ResponseWriter, r *http.Request) {
304
304
// @Router /users/oauth2/github/callback [get]
305
305
func (api * API ) userOAuth2Github (rw http.ResponseWriter , r * http.Request ) {
306
306
var (
307
- ctx = r .Context ()
307
+ // userOAuth2Github is a system function.
308
+ //nolint:gocritic
309
+ ctx = dbauthz .AsSystemRestricted (r .Context ())
308
310
state = httpmw .OAuth2 (r )
309
311
auditor = api .Auditor .Load ()
310
312
aReq , commitAudit = audit .InitRequest [database.APIKey ](rw , & audit.RequestParams {
@@ -489,7 +491,9 @@ type OIDCConfig struct {
489
491
// @Router /users/oidc/callback [get]
490
492
func (api * API ) userOIDC (rw http.ResponseWriter , r * http.Request ) {
491
493
var (
492
- ctx = r .Context ()
494
+ // userOIDC is a system function.
495
+ //nolint:gocritic
496
+ ctx = dbauthz .AsSystemRestricted (r .Context ())
493
497
state = httpmw .OAuth2 (r )
494
498
auditor = api .Auditor .Load ()
495
499
aReq , commitAudit = audit .InitRequest [database.APIKey ](rw , & audit.RequestParams {
You can’t perform that action at this time.
0 commit comments