MCPcopy Index your code
hub / github.com/codeaashu/claude-code / hasOpusAccess

Function hasOpusAccess

src/utils/auth.ts:1647–1660  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1645// Returns whether the user has Opus access at all, regardless of whether they
1646// are a subscriber or PayG.
1647export function hasOpusAccess(): boolean {
1648 const subscriptionType = getSubscriptionType()
1649
1650 return (
1651 subscriptionType === 'max' ||
1652 subscriptionType === 'enterprise' ||
1653 subscriptionType === 'team' ||
1654 subscriptionType === 'pro' ||
1655 // subscriptionType === null covers both API users and the case where
1656 // subscribers do not have subscription type populated. For those
1657 // subscribers, when in doubt, we should not limit their access to Opus.
1658 subscriptionType === null
1659 )
1660}
1661
1662export function getSubscriptionType(): SubscriptionType | null {
1663 // Check for mock subscription type first (ANT-only testing)

Callers

nothing calls this directly

Calls 1

getSubscriptionTypeFunction · 0.85

Tested by

no test coverage detected