Skip to content

Commit e1820e5

Browse files
committed
feat(ee): add enterprise edition module structure
1 parent ef613ef commit e1820e5

File tree

44 files changed

+370
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+370
-109
lines changed

apps/sim/app/(auth)/sso/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { redirect } from 'next/navigation'
22
import { getEnv, isTruthy } from '@/lib/core/config/env'
3-
import SSOForm from '@/app/(auth)/sso/sso-form'
3+
import SSOForm from '@/ee/sso/components/sso-form'
44

55
export const dynamic = 'force-dynamic'
66

apps/sim/app/api/organizations/[id]/invitations/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { hasWorkspaceAdminAccess } from '@/lib/workspaces/permissions/utils'
2929
import {
3030
InvitationsNotAllowedError,
3131
validateInvitationsAllowed,
32-
} from '@/executor/utils/permission-check'
32+
} from '@/ee/access-control/utils/permission-check'
3333

3434
const logger = createLogger('OrganizationInvitations')
3535

apps/sim/app/api/workspaces/invitations/route.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('Workspace Invitations API Route', () => {
102102
inArray: vi.fn().mockImplementation((field, values) => ({ type: 'inArray', field, values })),
103103
}))
104104

105-
vi.doMock('@/executor/utils/permission-check', () => ({
105+
vi.doMock('@/ee/access-control/utils/permission-check', () => ({
106106
validateInvitationsAllowed: vi.fn().mockResolvedValue(undefined),
107107
InvitationsNotAllowedError: class InvitationsNotAllowedError extends Error {
108108
constructor() {

apps/sim/app/api/workspaces/invitations/route.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { getFromEmailAddress } from '@/lib/messaging/email/utils'
2121
import {
2222
InvitationsNotAllowedError,
2323
validateInvitationsAllowed,
24-
} from '@/executor/utils/permission-check'
24+
} from '@/ee/access-control/utils/permission-check'
2525

2626
export const dynamic = 'force-dynamic'
2727

@@ -38,7 +38,6 @@ export async function GET(req: NextRequest) {
3838
}
3939

4040
try {
41-
// Get all workspaces where the user has permissions
4241
const userWorkspaces = await db
4342
.select({ id: workspace.id })
4443
.from(workspace)
@@ -55,10 +54,8 @@ export async function GET(req: NextRequest) {
5554
return NextResponse.json({ invitations: [] })
5655
}
5756

58-
// Get all workspaceIds where the user is a member
5957
const workspaceIds = userWorkspaces.map((w) => w.id)
6058

61-
// Find all invitations for those workspaces
6259
const invitations = await db
6360
.select()
6461
.from(workspaceInvitation)

apps/sim/app/chat/[identifier]/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import {
1414
ChatMessageContainer,
1515
EmailAuth,
1616
PasswordAuth,
17-
SSOAuth,
1817
VoiceInterface,
1918
} from '@/app/chat/components'
2019
import { CHAT_ERROR_MESSAGES, CHAT_REQUEST_TIMEOUT_MS } from '@/app/chat/constants'
2120
import { useAudioStreaming, useChatStreaming } from '@/app/chat/hooks'
21+
import SSOAuth from '@/ee/sso/components/sso-auth'
2222

2323
const logger = createLogger('ChatClient')
2424

apps/sim/app/chat/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export { default as EmailAuth } from './auth/email/email-auth'
22
export { default as PasswordAuth } from './auth/password/password-auth'
3-
export { default as SSOAuth } from './auth/sso/sso-auth'
43
export { ChatErrorState } from './error-state/error-state'
54
export { ChatHeader } from './header/header'
65
export { ChatInput } from './input/input'

apps/sim/app/workspace/[workspaceId]/knowledge/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { redirect } from 'next/navigation'
22
import { getSession } from '@/lib/auth'
33
import { verifyWorkspaceMembership } from '@/app/api/workflows/utils'
4-
import { getUserPermissionConfig } from '@/executor/utils/permission-check'
4+
import { getUserPermissionConfig } from '@/ee/access-control/utils/permission-check'
55
import { Knowledge } from './knowledge'
66

77
interface KnowledgePageProps {
@@ -23,7 +23,6 @@ export default async function KnowledgePage({ params }: KnowledgePageProps) {
2323
redirect('/')
2424
}
2525

26-
// Check permission group restrictions
2726
const permissionConfig = await getUserPermissionConfig(session.user.id)
2827
if (permissionConfig?.hideKnowledgeBaseTab) {
2928
redirect(`/workspace/${workspaceId}`)

apps/sim/app/workspace/[workspaceId]/templates/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getSession } from '@/lib/auth'
66
import { verifyWorkspaceMembership } from '@/app/api/workflows/utils'
77
import type { Template as WorkspaceTemplate } from '@/app/workspace/[workspaceId]/templates/templates'
88
import Templates from '@/app/workspace/[workspaceId]/templates/templates'
9-
import { getUserPermissionConfig } from '@/executor/utils/permission-check'
9+
import { getUserPermissionConfig } from '@/ee/access-control/utils/permission-check'
1010

1111
interface TemplatesPageProps {
1212
params: Promise<{

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { OAuthRequiredModal } from '@/app/workspace/[workspaceId]/w/[workflowId]
1818
import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate'
1919
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
2020
import type { SubBlockConfig } from '@/blocks/types'
21+
import { useCredentialSets } from '@/ee/credential-sets/hooks/credential-sets'
2122
import { CREDENTIAL, CREDENTIAL_SET } from '@/executor/constants'
22-
import { useCredentialSets } from '@/hooks/queries/credential-sets'
2323
import { useOAuthCredentialDetail, useOAuthCredentials } from '@/hooks/queries/oauth-credentials'
2424
import { useOrganizations } from '@/hooks/queries/organization'
2525
import { useSubscriptionData } from '@/hooks/queries/subscription'
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
export { AccessControl } from './access-control/access-control'
21
export { ApiKeys } from './api-keys/api-keys'
32
export { BYOK } from './byok/byok'
43
export { Copilot } from './copilot/copilot'
5-
export { CredentialSets } from './credential-sets/credential-sets'
64
export { CustomTools } from './custom-tools/custom-tools'
75
export { Debug } from './debug/debug'
86
export { EnvironmentVariables } from './environment/environment'
97
export { Files as FileUploads } from './files/files'
108
export { General } from './general/general'
119
export { Integrations } from './integrations/integrations'
1210
export { MCP } from './mcp/mcp'
13-
export { SSO } from './sso/sso'
1411
export { Subscription } from './subscription/subscription'
1512
export { TeamManagement } from './team-management/team-management'
1613
export { WorkflowMcpServers } from './workflow-mcp-servers/workflow-mcp-servers'

0 commit comments

Comments
 (0)