MCPcopy Create free account
hub / github.com/Noumena-Network/code / hasOpusAccess

Function hasOpusAccess

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

Source from the content-addressed store, hash-verified

1920// Returns whether the user has Opus access at all, regardless of whether they
1921// are a subscriber or PayG.
1922export function hasOpusAccess(): boolean {
1923 const subscriptionType = getSubscriptionType()
1924
1925 return (
1926 subscriptionType === 'max' ||
1927 subscriptionType === 'enterprise' ||
1928 subscriptionType === 'team' ||
1929 subscriptionType === 'pro' ||
1930 // subscriptionType === null covers both API users and the case where
1931 // subscribers do not have subscription type populated. For those
1932 // subscribers, when in doubt, we should not limit their access to Opus.
1933 subscriptionType === null
1934 )
1935}
1936
1937export function getSubscriptionType(): SubscriptionType | null {
1938 // 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