Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/pages/settings/organization/Security.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1448,8 +1448,8 @@ onMounted(async () => {
</div>
</section>

<!-- SSO Configuration Section (Enterprise only) -->
<section v-if="hasOrgPerm && currentOrganization?.sso_enabled" class="p-6 border rounded-lg border-slate-200 dark:border-slate-700">
<!-- SSO Configuration Section -->
<section v-if="hasOrgPerm" class="p-6 border rounded-lg border-slate-200 dark:border-slate-700">
<!-- Enterprise Plan: Show SSO Configuration -->
<template v-if="isEnterprisePlan">
<div class="flex items-start gap-4 mb-6">
Expand Down
5 changes: 0 additions & 5 deletions src/types/supabase.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,6 @@ export type Database = {
password_policy_config: Json | null
require_apikey_expiration: boolean
required_encryption_key: string | null
sso_enabled: boolean
stats_refresh_requested_at: string | null
stats_updated_at: string | null
updated_at: string | null
Expand All @@ -1697,7 +1696,6 @@ export type Database = {
password_policy_config?: Json | null
require_apikey_expiration?: boolean
required_encryption_key?: string | null
sso_enabled?: boolean
stats_refresh_requested_at?: string | null
stats_updated_at?: string | null
updated_at?: string | null
Expand All @@ -1722,7 +1720,6 @@ export type Database = {
password_policy_config?: Json | null
require_apikey_expiration?: boolean
required_encryption_key?: string | null
sso_enabled?: boolean
stats_refresh_requested_at?: string | null
stats_updated_at?: string | null
updated_at?: string | null
Expand Down Expand Up @@ -3543,7 +3540,6 @@ export type Database = {
require_apikey_expiration: boolean
required_encryption_key: string
role: string
sso_enabled: boolean
stats_refresh_requested_at: string
stats_updated_at: string
subscription_end: string
Expand Down Expand Up @@ -3581,7 +3577,6 @@ export type Database = {
require_apikey_expiration: boolean
required_encryption_key: string
role: string
sso_enabled: boolean
stats_refresh_requested_at: string
stats_updated_at: string
subscription_end: string
Expand Down
17 changes: 1 addition & 16 deletions supabase/functions/_backend/private/sso/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { closeClient, getPgClient } from '../../utils/pg.ts'
import { requireEnterprisePlan } from '../../utils/plan-gating.ts'
import { checkPermission } from '../../utils/rbac.ts'
import { createSSOProvider, deleteSSOProvider, ManagementAPIError } from '../../utils/supabase-management.ts'
import { supabaseAdmin, supabaseWithAuth } from '../../utils/supabase.ts'
import { supabaseWithAuth } from '../../utils/supabase.ts'
import { version } from '../../utils/version.ts'

const createBodySchema = type({
Expand Down Expand Up @@ -142,21 +142,6 @@ app.post('/', async (c) => {
await requireManageSsoPermission(c, body.org_id)
await requireEnterprisePlan(c, body.org_id)

const adminClient = supabaseAdmin(c)
const { data: orgData, error: orgError } = await adminClient
.from('orgs')
.select('sso_enabled')
.eq('id', body.org_id)
.single()

if (orgError || !orgData) {
return quickError(404, 'org_not_found', 'Organization not found')
}

if (!orgData.sso_enabled) {
return quickError(403, 'sso_not_enabled', 'SSO is not enabled for this organization')
}

let managementProvider: Awaited<ReturnType<typeof createSSOProvider>>
try {
managementProvider = await createSSOProvider(c, domain, body.metadata_url, attributeMapping)
Expand Down
5 changes: 0 additions & 5 deletions supabase/functions/_backend/utils/supabase.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,6 @@ export type Database = {
password_policy_config: Json | null
require_apikey_expiration: boolean
required_encryption_key: string | null
sso_enabled: boolean
stats_refresh_requested_at: string | null
stats_updated_at: string | null
updated_at: string | null
Expand All @@ -1697,7 +1696,6 @@ export type Database = {
password_policy_config?: Json | null
require_apikey_expiration?: boolean
required_encryption_key?: string | null
sso_enabled?: boolean
stats_refresh_requested_at?: string | null
stats_updated_at?: string | null
updated_at?: string | null
Expand All @@ -1722,7 +1720,6 @@ export type Database = {
password_policy_config?: Json | null
require_apikey_expiration?: boolean
required_encryption_key?: string | null
sso_enabled?: boolean
stats_refresh_requested_at?: string | null
stats_updated_at?: string | null
updated_at?: string | null
Expand Down Expand Up @@ -3543,7 +3540,6 @@ export type Database = {
require_apikey_expiration: boolean
required_encryption_key: string
role: string
sso_enabled: boolean
stats_refresh_requested_at: string
stats_updated_at: string
subscription_end: string
Expand Down Expand Up @@ -3581,7 +3577,6 @@ export type Database = {
require_apikey_expiration: boolean
required_encryption_key: string
role: string
sso_enabled: boolean
stats_refresh_requested_at: string
stats_updated_at: string
subscription_end: string
Expand Down
Loading
Loading