MCPcopy Index your code
hub / github.com/simstudioai/sim / hasSSOAccess

Function hasSSOAccess

apps/sim/lib/billing/core/subscription.ts:480–491  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

478 * In non-production environments, returns true for convenience.
479 */
480export async function hasSSOAccess(userId: string): Promise<boolean> {
481 try {
482 if (isSsoEnabled && !isHosted) {
483 return true
484 }
485
486 return isEnterpriseOrgAdminOrOwner(userId)
487 } catch (error) {
488 logger.error('Error checking SSO access', { error, userId })
489 return false
490 }
491}
492
493/**
494 * Check whether a workspace is entitled to the Access Control (Permission Groups)

Callers 1

route.tsFile · 0.90

Calls 2

errorMethod · 0.80

Tested by

no test coverage detected