diff --git a/check-locale.js b/check-locale.js index 9bbb83d58..df7339e92 100644 --- a/check-locale.js +++ b/check-locale.js @@ -8,7 +8,6 @@ const allStrings = {}; const localeFile = require('./locales/en/common.json'); const files = fs.readdirSync('./', { recursive: true, withFileTypes: true }); -//console.log('files:', files); let error = false; @@ -25,7 +24,6 @@ files.forEach((file) => { (fileContent.match(regExp) || []).forEach((match) => { const id = match.replace("t('", '').replace("'", ''); - // console.log('match:', match); allStrings[id] = true; if (!localeFile[id]) { error = true; @@ -35,7 +33,6 @@ files.forEach((file) => { (fileContent.match(altRegExp) || []).forEach((match) => { const id = match.replace("i18nKey='", '').replace("'", ''); - // console.log('match:', match, id); allStrings[id] = true; if (!localeFile[id]) { error = true; diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index 739e4b29f..62d9846fd 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -10,7 +10,7 @@ import SSOLogo from '@components/logo/SSO'; import DSyncLogo from '@components/logo/DSync'; import AuditLogsLogo from '@components/logo/AuditLogs'; import Vault from '@components/logo/Vault'; -import { Cog8ToothIcon } from '@heroicons/react/24/outline'; +import Cog8ToothIcon from '@heroicons/react/24/outline/Cog8ToothIcon'; type SidebarProps = { isOpen: boolean; diff --git a/components/connection/utils.tsx b/components/connection/utils.tsx index 4c1652550..eafead97e 100644 --- a/components/connection/utils.tsx +++ b/components/connection/utils.tsx @@ -2,7 +2,8 @@ import { ButtonLink } from '@components/ButtonLink'; import { Dispatch, FormEvent, SetStateAction, useMemo, useState } from 'react'; import { EditViewOnlyFields, getCommonFields } from './fieldCatalog'; import { CopyToClipboardButton } from '@components/ClipboardButton'; -import { EyeIcon, EyeSlashIcon } from '@heroicons/react/24/outline'; +import EyeIcon from '@heroicons/react/24/outline/EyeIcon'; +import EyeSlashIcon from '@heroicons/react/24/outline/EyeSlashIcon'; import { IconButton } from '@components/IconButton'; import { useTranslation } from 'next-i18next'; diff --git a/ee/federated-saml/api/admin/[id]/index.ts b/ee/federated-saml/api/admin/[id]/index.ts index a6b9b55dd..4478f80ec 100644 --- a/ee/federated-saml/api/admin/[id]/index.ts +++ b/ee/federated-saml/api/admin/[id]/index.ts @@ -26,7 +26,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { } }; -// Get SAML Federation app by id +// Get Identity Federation app by id const handleGET = async (req: NextApiRequest, res: NextApiResponse) => { const { samlFederatedController } = await jackson(); @@ -43,7 +43,7 @@ const handleGET = async (req: NextApiRequest, res: NextApiResponse) => { }); }; -// Update SAML Federation app +// Update Identity Federation app const handlePATCH = async (req: NextApiRequest, res: NextApiResponse) => { const { samlFederatedController } = await jackson(); @@ -52,7 +52,7 @@ const handlePATCH = async (req: NextApiRequest, res: NextApiResponse) => { return res.status(200).json({ data: updatedApp }); }; -// Delete the SAML Federation app +// Delete the Identity Federation app const handleDELETE = async (req: NextApiRequest, res: NextApiResponse) => { const { samlFederatedController } = await jackson(); diff --git a/ee/federated-saml/api/admin/index.ts b/ee/federated-saml/api/admin/index.ts index 6b0dabd93..47a6c867f 100644 --- a/ee/federated-saml/api/admin/index.ts +++ b/ee/federated-saml/api/admin/index.ts @@ -22,7 +22,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { } }; -// Create new SAML Federation app +// Create new Identity Federation app const handlePOST = async (req: NextApiRequest, res: NextApiResponse) => { const { samlFederatedController } = await jackson(); @@ -31,7 +31,7 @@ const handlePOST = async (req: NextApiRequest, res: NextApiResponse) => { return res.status(201).json({ data: app }); }; -// Get SAML Federation apps +// Get Identity Federation apps const handleGET = async (req: NextApiRequest, res: NextApiResponse) => { const { samlFederatedController } = await jackson(); diff --git a/ee/federated-saml/pages/index.tsx b/ee/federated-saml/pages/index.tsx index 1948772fb..15dc74a1c 100644 --- a/ee/federated-saml/pages/index.tsx +++ b/ee/federated-saml/pages/index.tsx @@ -11,7 +11,11 @@ const AppsList = ({ hasValidLicense }: { hasValidLicense: boolean }) => { router.push(`/admin/federated-saml/${app.id}/edit`)} - actions={{ newApp: '/admin/federated-saml/new', idpConfiguration: '/.well-known/idp-configuration' }} + actions={{ + newApp: '/admin/federated-saml/new', + samlConfiguration: '/.well-known/idp-configuration', + oidcConfiguration: '/.well-known/openid-configuration', + }} /> ); }; diff --git a/internal-ui/src/dsync/DirectoryGroups.tsx b/internal-ui/src/dsync/DirectoryGroups.tsx index 3161b8808..a9e854449 100644 --- a/internal-ui/src/dsync/DirectoryGroups.tsx +++ b/internal-ui/src/dsync/DirectoryGroups.tsx @@ -1,6 +1,6 @@ import useSWR from 'swr'; import { useTranslation } from 'next-i18next'; -import { EyeIcon } from '@heroicons/react/24/outline'; +import EyeIcon from '@heroicons/react/24/outline/EyeIcon'; import type { Group } from '../types'; import { fetcher, addQueryParamsToPath } from '../utils'; import { DirectoryTab } from '../dsync'; diff --git a/internal-ui/src/dsync/DirectoryUsers.tsx b/internal-ui/src/dsync/DirectoryUsers.tsx index fb48e9c41..b79a50cfe 100644 --- a/internal-ui/src/dsync/DirectoryUsers.tsx +++ b/internal-ui/src/dsync/DirectoryUsers.tsx @@ -1,6 +1,6 @@ import useSWR from 'swr'; import { useTranslation } from 'next-i18next'; -import { EyeIcon } from '@heroicons/react/24/outline'; +import EyeIcon from '@heroicons/react/24/outline/EyeIcon'; import type { User } from '../types'; import { addQueryParamsToPath, fetcher } from '../utils'; import { DirectoryTab } from '../dsync'; diff --git a/internal-ui/src/dsync/DirectoryWebhookLogs.tsx b/internal-ui/src/dsync/DirectoryWebhookLogs.tsx index 817324dc2..96c72d3cd 100644 --- a/internal-ui/src/dsync/DirectoryWebhookLogs.tsx +++ b/internal-ui/src/dsync/DirectoryWebhookLogs.tsx @@ -1,7 +1,7 @@ import useSWR from 'swr'; import { useState } from 'react'; import { useTranslation } from 'next-i18next'; -import { EyeIcon } from '@heroicons/react/24/outline'; +import EyeIcon from '@heroicons/react/24/outline/EyeIcon'; import type { WebhookEventLog } from '../types'; import { fetcher, addQueryParamsToPath } from '../utils'; import { DirectoryTab } from '../dsync'; diff --git a/internal-ui/src/federated-saml/Edit.tsx b/internal-ui/src/federated-saml/Edit.tsx index ef33c3866..f46ead80c 100644 --- a/internal-ui/src/federated-saml/Edit.tsx +++ b/internal-ui/src/federated-saml/Edit.tsx @@ -5,8 +5,9 @@ import { useTranslation } from 'next-i18next'; import { useFormik } from 'formik'; import { Card } from '../shared'; import { defaultHeaders } from '../utils'; +import { ItemList } from '../shared/ItemList'; -type EditApp = Pick; +type EditApp = Pick; export const Edit = ({ app, @@ -23,12 +24,16 @@ export const Edit = ({ }) => { const { t } = useTranslation('common'); + const connectionIsOIDC = app.type === 'oidc'; + const connectionIsSAML = !connectionIsOIDC; + const formik = useFormik({ enableReinitialize: true, initialValues: { name: app.name || '', acsUrl: app.acsUrl || '', tenants: app.tenants || [], + redirectUrl: app.redirectUrl || [], }, onSubmit: async (values) => { const rawResponse = await fetch(urls.patch, { @@ -92,34 +97,74 @@ export const Edit = ({ /> )} - -