Skip to content

Commit 5353bec

Browse files
committed
style(api): rename a local that shadowed the accounts package
gocritic importShadow: the local holding the resolved allow-list was named `accounts`, shadowing the imported internal/accounts package. Refs #1748.
1 parent 083d8f1 commit 5353bec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎internal/api/handler.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,14 +537,14 @@ func (h *Handler) getAccountScope(ctx context.Context, session *Session) (auth.A
537537
// everything even if a caller ignores the error.
538538
return auth.AccountScope{}, fmt.Errorf("authentication service not configured: cannot establish account scope")
539539
}
540-
accounts, err := h.auth.GetAllowedAccountsAPI(ctx, session.UserID)
540+
resolved, err := h.auth.GetAllowedAccountsAPI(ctx, session.UserID)
541541
if err != nil {
542542
return auth.AccountScope{}, err
543543
}
544544
// Safe here and only here: GetAllowedAccountsAPI has already failed closed
545545
// on an unestablishable scope, so an empty list at this point genuinely
546546
// means "no restriction configured".
547-
return auth.ScopeFromLegacyList(accounts), nil
547+
return auth.ScopeFromLegacyList(resolved), nil
548548
}
549549

550550
// setSecurityHeaders adds comprehensive security headers to the response.

0 commit comments

Comments
 (0)