diff --git a/messages/en-US.json b/messages/en-US.json index e48c9f05..ff0ca4e6 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1162,7 +1162,7 @@ "selectDomainTypeCnameName": "Single Domain (CNAME)", "selectDomainTypeCnameDescription": "Just this specific domain. Use this for individual subdomains or specific domain entries.", "selectDomainTypeWildcardName": "Wildcard Domain", - "selectDomainTypeWildcardDescription": "This domain and its first level of subdomains.", + "selectDomainTypeWildcardDescription": "This domain and its subdomains.", "domainDelegation": "Single Domain", "selectType": "Select a type", "actions": "Actions", diff --git a/server/routers/external.ts b/server/routers/external.ts index e64d3456..6f0b04dc 100644 --- a/server/routers/external.ts +++ b/server/routers/external.ts @@ -620,8 +620,6 @@ authenticated.post( authenticated.delete("/idp/:idpId", verifyUserIsServerAdmin, idp.deleteIdp); -authenticated.get("/idp", verifyUserIsServerAdmin, idp.listIdps); - authenticated.get("/idp/:idpId", verifyUserIsServerAdmin, idp.getIdp); authenticated.put( diff --git a/server/routers/resource/createResource.ts b/server/routers/resource/createResource.ts index 1c4ace3b..8f16b198 100644 --- a/server/routers/resource/createResource.ts +++ b/server/routers/resource/createResource.ts @@ -261,14 +261,6 @@ async function createHttpResource( ) ); } - if (parsedSubdomain.data.includes(".")) { - return next( - createHttpError( - HttpCode.BAD_REQUEST, - "Subdomain cannot contain a dot when using wildcard domains" - ) - ); - } fullDomain = `${subdomain}.${domainRes.domains.baseDomain}`; } else { fullDomain = domainRes.domains.baseDomain; diff --git a/server/routers/resource/updateResource.ts b/server/routers/resource/updateResource.ts index fda24f47..a20a7024 100644 --- a/server/routers/resource/updateResource.ts +++ b/server/routers/resource/updateResource.ts @@ -297,14 +297,6 @@ async function updateHttpResource( ) ); } - if (parsedSubdomain.data.includes(".")) { - return next( - createHttpError( - HttpCode.BAD_REQUEST, - "Subdomain cannot contain a dot when using wildcard domains" - ) - ); - } fullDomain = `${updateData.subdomain}.${domainRes.domains.baseDomain}`; } else { fullDomain = domainRes.domains.baseDomain; diff --git a/src/app/[orgId]/settings/access/users/create/page.tsx b/src/app/[orgId]/settings/access/users/create/page.tsx index 2158701d..b3ce8984 100644 --- a/src/app/[orgId]/settings/access/users/create/page.tsx +++ b/src/app/[orgId]/settings/access/users/create/page.tsx @@ -617,7 +617,7 @@ export default function Page() { idp || null ); }} - cols={3} + cols={2} /> diff --git a/src/components/DomainPicker.tsx b/src/components/DomainPicker.tsx index d7b38794..98ae6b6a 100644 --- a/src/components/DomainPicker.tsx +++ b/src/components/DomainPicker.tsx @@ -179,7 +179,7 @@ export default function DomainPicker({ }); } } else if (orgDomain.type === "wildcard") { - // For wildcard domains, allow the base domain or one level up + // For wildcard domains, allow the base domain or multiple levels up const userInputLower = userInput.toLowerCase(); const baseDomainLower = orgDomain.baseDomain.toLowerCase(); @@ -194,24 +194,22 @@ export default function DomainPicker({ domainId: orgDomain.domainId }); } - // Check if user input is one level up (subdomain.baseDomain) + // Check if user input ends with the base domain (allows multiple level subdomains) else if (userInputLower.endsWith(`.${baseDomainLower}`)) { const subdomain = userInputLower.slice( 0, -(baseDomainLower.length + 1) ); - // Only allow one level up (no dots in subdomain) - if (!subdomain.includes(".")) { - options.push({ - id: `org-${orgDomain.domainId}`, - domain: userInput, - type: "organization", - verified: orgDomain.verified, - domainType: "wildcard", - domainId: orgDomain.domainId, - subdomain: subdomain - }); - } + // Allow multiple levels (subdomain can contain dots) + options.push({ + id: `org-${orgDomain.domainId}`, + domain: userInput, + type: "organization", + verified: orgDomain.verified, + domainType: "wildcard", + domainId: orgDomain.domainId, + subdomain: subdomain + }); } } }); @@ -320,7 +318,7 @@ export default function DomainPicker({ setUserInput(validInput); }} /> -

+

{build === "saas" ? t("domainPickerDescriptionSaas") : t("domainPickerDescription")} @@ -328,42 +326,44 @@ export default function DomainPicker({ {/* Tabs and Sort Toggle */} -

- - setActiveTab( - value as "all" | "organization" | "provided" - ) - } - > - - - {t("domainPickerTabAll")} - - - {t("domainPickerTabOrganization")} - - {build == "saas" && ( - - {t("domainPickerTabProvided")} + {build === "saas" && ( +
+ + setActiveTab( + value as "all" | "organization" | "provided" + ) + } + > + + + {t("domainPickerTabAll")} - )} - - - -
+ + {t("domainPickerTabOrganization")} + + {build == "saas" && ( + + {t("domainPickerTabProvided")} + + )} +
+
+ +
+ )} {/* Loading State */} {isChecking && ( diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx index 07cdc3f5..df9f0dff 100644 --- a/src/components/ui/popover.tsx +++ b/src/components/ui/popover.tsx @@ -18,7 +18,7 @@ function PopoverTrigger({ function PopoverContent({ className, - align = "center", + align = "start", sideOffset = 4, ...props }: React.ComponentProps) {