()
| 67 | } |
| 68 | |
| 69 | export function hasConsoleBillingAccess(): boolean { |
| 70 | // Check if cost reporting is disabled via environment variable |
| 71 | if (isEnvTruthy(process.env.DISABLE_COST_WARNINGS)) { |
| 72 | return false |
| 73 | } |
| 74 | |
| 75 | const config = getGlobalConfig() |
| 76 | return hasConsoleBillingAccessForSession(getAuthRuntime().getCurrentSession(), { |
| 77 | organizationRole: config.oauthAccount?.organizationRole, |
| 78 | workspaceRole: config.oauthAccount?.workspaceRole, |
| 79 | }) |
| 80 | } |
| 81 | |
| 82 | // Mock billing access for /mock-limits testing (set by mockRateLimits.ts) |
| 83 | let mockBillingAccessOverride: boolean | null = null |
no test coverage detected