Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement: migrate org machine identity page to v3 components

Scott Wilson54ae157e6f75
diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts
index e94f89113d..6438548e93 100644
--- a/backend/src/ee/services/license/license-fns.ts
+++ b/backend/src/ee/services/license/license-fns.ts
@@ -71,7 +71,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
rbac: false,
githubOrgSync: false,
customRateLimits: false,
- subOrganization: false,
+ subOrganization: true,
customAlerts: false,
secretAccessInsights: false,
auditLogs: false,
diff --git a/frontend/src/components/organization/LastLoginSection/LastLoginSection.tsx b/frontend/src/components/organization/LastLoginSection/LastLoginSection.tsx
index 9059f022d9..933191de7a 100644
--- a/frontend/src/components/organization/LastLoginSection/LastLoginSection.tsx
+++ b/frontend/src/components/organization/LastLoginSection/LastLoginSection.tsx
@@ -12,20 +12,20 @@ export const LastLoginSection = ({ lastLoginTime, lastLoginAuthMethod }: Props)
<div className="font-medium">Last Login</div>
</div>
<div className="mb-2 flex items-center gap-2 text-sm">
- <div className="flex items-center justify-center rounded-sm bg-container p-2">
+ <div className="flex items-center justify-center rounded-sm bg-container/50 p-2">
<ShieldIcon className="size-5" />
</div>
<div className="flex flex-col">
- <div className="text-sm font-medium text-label">Authentication Method</div>
+ <div className="text-xs font-medium text-label">Authentication Method</div>
<div className="text-sm">{lastLoginAuthMethod}</div>
</div>
</div>
<div className="flex items-center gap-2 text-sm">
- <div className="flex items-center justify-center rounded-sm bg-container p-2">
+ <div className="flex items-center justify-center rounded-sm bg-container/50 p-2">
<ClockIcon className="size-5" />
</div>
<div className="flex flex-col">
- <div className="text-sm font-medium text-label">Time</div>
+ <div className="text-xs font-medium text-label">Time</div>
<div className="text-sm">{format(lastLoginTime, "PPpp")} </div>
</div>
</div>
diff --git a/frontend/src/components/v3/generic/Card/Card.tsx b/frontend/src/components/v3/generic/Card/Card.tsx
index 9c51521b42..3a10ec5c7b 100644
--- a/frontend/src/components/v3/generic/Card/Card.tsx
+++ b/frontend/src/components/v3/generic/Card/Card.tsx
@@ -35,7 +35,10 @@ function UnstableCardTitle({ className, ...props }: React.ComponentProps<"div">)
return (
<div
data-slot="card-title"
- className={cn("text-lg leading-none font-semibold", className)}
+ className={cn(
+ "flex flex-wrap items-center gap-1.5 text-lg leading-none font-semibold",
+ className
+ )}
{...props}
/>
);
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplatesTable.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplatesTable.tsx
index 517fc78232..e26655bc54 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplatesTable.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityAuthTemplatesTable.tsx
@@ -1,36 +1,36 @@
import {
- faArrowDown,
- faArrowUp,
- faBan,
- faEdit,
- faEllipsisV,
- faEye,
- faMagnifyingGlass,
- faServer,
- faTrash
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+ ChevronDownIcon,
+ EditIcon,
+ EyeIcon,
+ MoreHorizontalIcon,
+ SearchIcon,
+ TrashIcon
+} from "lucide-react";
+import { twMerge } from "tailwind-merge";
import { OrgPermissionCan } from "@app/components/permissions";
import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuTrigger,
- EmptyState,
- IconButton,
- Input,
- Pagination,
- Spinner,
- Table,
- TableContainer,
- TableSkeleton,
- TBody,
- Td,
- Th,
- THead,
- Tr
-} from "@app/components/v2";
+ InputGroup,
+ InputGroupAddon,
+ InputGroupInput,
+ Skeleton,
+ UnstableDropdownMenu,
+ UnstableDropdownMenuContent,
+ UnstableDropdownMenuItem,
+ UnstableDropdownMenuTrigger,
+ UnstableEmpty,
+ UnstableEmptyDescription,
+ UnstableEmptyHeader,
+ UnstableEmptyTitle,
+ UnstableIconButton,
+ UnstablePagination,
+ UnstableTable,
+ UnstableTableBody,
+ UnstableTableCell,
+ UnstableTableHead,
+ UnstableTableHeader,
+ UnstableTableRow
+} from "@app/components/v3";
import { OrgPermissionSubjects, useOrganization, useSubscription } from "@app/context";
import { OrgPermissionMachineIdentityAuthTemplateActions } from "@app/context/OrgPermissionContext/types";
import {
@@ -89,7 +89,7 @@ export const IdentityAuthTemplatesTable = ({ handlePopUpOpen }: Props) => {
const organizationId = currentOrg?.id || "";
const { subscription } = useSubscription();
- const { data, isPending, isFetching } = useGetIdentityAuthTemplates({
+ const { data, isPending } = useGetIdentityAuthTemplates({
organizationId,
limit,
offset,
@@ -116,175 +116,180 @@ export const IdentityAuthTemplatesTable = ({ handlePopUpOpen }: Props) => {
setOrderDirection(OrderByDirection.ASC);
};
+ const isFiltered = debouncedSearch.trim().length > 0;
+
return (
<div>
- <div className="mb-4 flex items-center space-x-2">
- <Input
- value={search}
- onChange={(e) => setSearch(e.target.value)}
- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
- placeholder="Search templates by name..."
- />
+ <div className="mb-4 flex gap-2">
+ <InputGroup className="flex-1">
+ <InputGroupAddon>
+ <SearchIcon />
+ </InputGroupAddon>
+ <InputGroupInput
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ placeholder="Search templates by name..."
+ />
+ </InputGroup>
</div>
- <TableContainer>
- <Table>
- <THead>
- <Tr className="h-14">
- <Th className="w-1/6">
- <div className="flex items-center">
+ {/* eslint-disable-next-line no-nested-ternary */}
+ {(!isPending || !subscription.machineIdentityAuthTemplates) && !templates.length ? (
+ <UnstableEmpty className="border">
+ <UnstableEmptyHeader>
+ <UnstableEmptyTitle>
+ {isFiltered
+ ? "No templates match search filter"
+ : "No identity auth templates have been added"}
+ </UnstableEmptyTitle>
+ <UnstableEmptyDescription>
+ {isFiltered ? "Adjust your search criteria." : "Create a template to get started."}
+ </UnstableEmptyDescription>
+ </UnstableEmptyHeader>
+ </UnstableEmpty>
+ ) : (
+ <>
+ <UnstableTable>
+ <UnstableTableHeader>
+ <UnstableTableRow>
+ <UnstableTableHead
+ className="w-1/4 cursor-pointer"
+ onClick={() => handleSort(TemplatesOrderBy.Name)}
+ >
Name
- <IconButton
- variant="plain"
- className={`ml-2 ${orderBy === TemplatesOrderBy.Name ? "" : "opacity-30"}`}
- ariaLabel="sort"
- onClick={() => handleSort(TemplatesOrderBy.Name)}
- >
- <FontAwesomeIcon
- icon={
+ <ChevronDownIcon
+ className={twMerge(
+ "transition-transform",
+ orderBy === TemplatesOrderBy.Name &&
orderDirection === OrderByDirection.DESC &&
- orderBy === TemplatesOrderBy.Name
- ? faArrowUp
- : faArrowDown
- }
- />
- </IconButton>
- </div>
- </Th>
- <Th className="w-1/6">
- <div className="flex items-center">
+ "rotate-180",
+ orderBy !== TemplatesOrderBy.Name && "opacity-30"
+ )}
+ />
+ </UnstableTableHead>
+ <UnstableTableHead
+ className="w-1/4 cursor-pointer"
+ onClick={() => handleSort(TemplatesOrderBy.AuthMethod)}
+ >
Method
- <IconButton
- variant="plain"
- className={`ml-2 ${orderBy === TemplatesOrderBy.AuthMethod ? "" : "opacity-30"}`}
- ariaLabel="sort"
- onClick={() => handleSort(TemplatesOrderBy.AuthMethod)}
- >
- <FontAwesomeIcon
- icon={
+ <ChevronDownIcon
+ className={twMerge(
+ "transition-transform",
+ orderBy === TemplatesOrderBy.AuthMethod &&
orderDirection === OrderByDirection.DESC &&
- orderBy === TemplatesOrderBy.AuthMethod
- ? faArrowUp
- : faArrowDown
- }
- />
- </IconButton>
- </div>
- </Th>
- <Th className="w-2/3">URL</Th>
- <Th className="w-16">{isFetching ? <Spinner size="xs" /> : null}</Th>
- </Tr>
- </THead>
- <TBody>
- {subscription.machineIdentityAuthTemplates && isPending && (
- <TableSkeleton columns={4} innerKey="identity-auth-templates" />
- )}
-
- {!isPending &&
- templates?.map((template) => (
- <Tr
- className="h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
- key={`template-${template.id}`}
- >
- <Td>{template.name}</Td>
- <Td>
- <div className="flex items-center">
+ "rotate-180",
+ orderBy !== TemplatesOrderBy.AuthMethod && "opacity-30"
+ )}
+ />
+ </UnstableTableHead>
+ <UnstableTableHead>URL</UnstableTableHead>
+ <UnstableTableHead className="w-5" />
+ </UnstableTableRow>
+ </UnstableTableHeader>
+ <UnstableTableBody>
+ {isPending &&
+ Array.from({ length: perPage }).map((_, i) => (
+ <UnstableTableRow key={`skeleton-${i + 1}`}>
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-full" />
+ </UnstableTableCell>
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-full" />
+ </UnstableTableCell>
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-full" />
+ </UnstableTableCell>
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-4" />
+ </UnstableTableCell>
+ </UnstableTableRow>
+ ))}
+ {!isPending &&
+ templates?.map((template) => (
+ <UnstableTableRow key={`template-${template.id}`}>
+ <UnstableTableCell isTruncatable>{template.name}</UnstableTableCell>
+ <UnstableTableCell>
<span className="uppercase">{template.authMethod}</span>
- </div>
- </Td>
- <Td>
- <span className="text-sm text-mineshaft-400">
+ </UnstableTableCell>
+ <UnstableTableCell isTruncatable>
{template.templateFields.url}
- </span>
- </Td>
- <Td>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <IconButton
- ariaLabel="Options"
- className="w-6"
- colorSchema="secondary"
- variant="plain"
- >
- <FontAwesomeIcon icon={faEllipsisV} />
- </IconButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent sideOffset={2} align="end">
- <DropdownMenuItem
- icon={<FontAwesomeIcon icon={faEye} />}
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("viewUsages", { template });
- }}
- >
- {TEMPLATE_UI_LABELS.VIEW_USAGES}
- </DropdownMenuItem>
- <OrgPermissionCan
- I={OrgPermissionMachineIdentityAuthTemplateActions.EditTemplates}
- a={OrgPermissionSubjects.MachineIdentityAuthTemplate}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- icon={<FontAwesomeIcon icon={faEdit} />}
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("editTemplate", { template });
- }}
- isDisabled={!isAllowed}
- >
- {TEMPLATE_UI_LABELS.EDIT_TEMPLATE}
- </DropdownMenuItem>
- )}
- </OrgPermissionCan>
- <OrgPermissionCan
- I={OrgPermissionMachineIdentityAuthTemplateActions.DeleteTemplates}
- a={OrgPermissionSubjects.MachineIdentityAuthTemplate}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("deleteTemplate", {
- templateId: template.id,
- name: template.name
- });
- }}
- isDisabled={!isAllowed}
- icon={<FontAwesomeIcon icon={faTrash} />}
- >
- {TEMPLATE_UI_LABELS.DELETE_TEMPLATE}
- </DropdownMenuItem>
- )}
- </OrgPermissionCan>
- </DropdownMenuContent>
- </DropdownMenu>
- </Td>
- </Tr>
- ))}
- </TBody>
- </Table>
- {!isPending && data && totalCount > 0 && (
- <Pagination
- count={totalCount}
- page={page}
- perPage={perPage}
- onChangePage={(newPage) => setPage(newPage)}
- onChangePerPage={handlePerPageChange}
- />
- )}
- {!subscription.machineIdentityAuthTemplates && (
- <EmptyState title="This feature has not been activated for your license." icon={faBan} />
- )}
- {!isPending && templates.length === 0 && (
- <EmptyState
- title={
- debouncedSearch.trim().length > 0
- ? "No templates match search filter"
- : "No identity auth templates have been created"
- }
- icon={faServer}
- />
- )}
- </TableContainer>
+ </UnstableTableCell>
+ <UnstableTableCell>
+ <UnstableDropdownMenu>
+ <UnstableDropdownMenuTrigger asChild>
+ <UnstableIconButton
+ variant="ghost"
+ size="xs"
+ onClick={(e) => e.stopPropagation()}
+ >
+ <MoreHorizontalIcon />
+ </UnstableIconButton>
+ </UnstableDropdownMenuTrigger>
+ <UnstableDropdownMenuContent align="end">
+ <UnstableDropdownMenuItem
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("viewUsages", { template });
+ }}
+ >
+ <EyeIcon />
+ {TEMPLATE_UI_LABELS.VIEW_USAGES}
+ </UnstableDropdownMenuItem>
+ <OrgPermissionCan
+ I={OrgPermissionMachineIdentityAuthTemplateActions.EditTemplates}
+ a={OrgPermissionSubjects.MachineIdentityAuthTemplate}
+ >
+ {(isAllowed) => (
+ <UnstableDropdownMenuItem
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("editTemplate", { template });
+ }}
+ isDisabled={!isAllowed}
+ >
+ <EditIcon />
+ {TEMPLATE_UI_LABELS.EDIT_TEMPLATE}
+ </UnstableDropdownMenuItem>
+ )}
+ </OrgPermissionCan>
+ <OrgPermissionCan
+ I={OrgPermissionMachineIdentityAuthTemplateActions.DeleteTemplates}
+ a={OrgPermissionSubjects.MachineIdentityAuthTemplate}
+ >
+ {(isAllowed) => (
+ <UnstableDropdownMenuItem
+ variant="danger"
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("deleteTemplate", {
+ templateId: template.id,
+ name: template.name
+ });
+ }}
+ isDisabled={!isAllowed}
+ >
+ <TrashIcon />
+ {TEMPLATE_UI_LABELS.DELETE_TEMPLATE}
+ </UnstableDropdownMenuItem>
+ )}
+ </OrgPermissionCan>
+ </UnstableDropdownMenuContent>
+ </UnstableDropdownMenu>
+ </UnstableTableCell>
+ </UnstableTableRow>
+ ))}
+ </UnstableTableBody>
+ </UnstableTable>
+ {totalCount > 0 && (
+ <UnstablePagination
+ count={totalCount}
+ page={page}
+ perPage={perPage}
+ onChangePage={setPage}
+ onChangePerPage={handlePerPageChange}
+ />
+ )}
+ </>
+ )}
</div>
);
};
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
index 6b6086b0bb..9609fabb8b 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
@@ -1,14 +1,27 @@
import { useState } from "react";
-import { faPlus } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { InfoIcon } from "lucide-react";
+import { InfoIcon, PlusIcon } from "lucide-react";
import { twMerge } from "tailwind-merge";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Button, DeleteActionModal, Modal, ModalContent, Tooltip } from "@app/components/v2";
-import { DocumentationLinkBadge } from "@app/components/v3";
+import {
+ Button as ButtonV2,
+ DeleteActionModal,
+ Modal,
+ ModalContent,
+ Tooltip
+} from "@app/components/v2";
+import {
+ Button,
+ DocumentationLinkBadge,
+ UnstableCard,
+ UnstableCardAction,
+ UnstableCardContent,
+ UnstableCardDescription,
+ UnstableCardHeader,
+ UnstableCardTitle
+} from "@app/components/v3";
import {
OrgPermissionIdentityActions,
OrgPermissionSubjects,
@@ -94,88 +107,95 @@ export const IdentitySection = withPermission(
};
return (
- <div>
- <div className="rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex flex-wrap items-center justify-between gap-2">
- <div className="flex flex-1 items-center gap-x-2">
- <p className="text-xl font-medium text-mineshaft-100">
+ <>
+ <div className="flex flex-col gap-4">
+ <UnstableCard>
+ <UnstableCardHeader>
+ <UnstableCardTitle>
{isSubOrganization ? "Sub-" : ""}Organization Machine Identities
- </p>
- <DocumentationLinkBadge href="https://infisical.com/docs/documentation/platform/identities/machine-identities" />
- </div>
- <div className="flex items-center">
- <OrgPermissionCan
- I={OrgPermissionIdentityActions.Create}
- a={OrgPermissionSubjects.Identity}
- >
- {(isAllowed) => (
- <Button
- variant="outline_bg"
- type="submit"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
- onClick={() => {
- if (!isMoreIdentitiesAllowed && !isEnterprise) {
- handlePopUpOpen("upgradePlan", {
- description:
- "You can add more machine identities if you upgrade your Infisical Pro plan."
- });
- return;
- }
+ <DocumentationLinkBadge href="https://infisical.com/docs/documentation/platform/identities/machine-identities" />
+ </UnstableCardTitle>
+ <UnstableCardDescription>
+ Create and manage {isSubOrganization ? "sub-" : ""}organization machine identities
+ </UnstableCardDescription>
+ <UnstableCardAction>
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Create}
+ a={OrgPermissionSubjects.Identity}
+ >
+ {(isAllowed) => (
+ <Button
+ variant={isSubOrganization ? "sub-org" : "org"}
+ onClick={() => {
+ if (!isMoreIdentitiesAllowed && !isEnterprise) {
+ handlePopUpOpen("upgradePlan", {
+ description:
+ "You can add more machine identities if you upgrade your Infisical Pro plan."
+ });
+ return;
+ }
- if (!isSubOrganization) {
- setWizardStep(IdentityWizardSteps.CreateIdentity);
- }
+ if (!isSubOrganization) {
+ setWizardStep(IdentityWizardSteps.CreateIdentity);
+ }
- handlePopUpOpen("identity");
- }}
- isDisabled={!isAllowed}
- >
- {isSubOrganization
- ? "Add Machine Identity to Sub-Organization"
- : "Create Organization Machine Identity"}
- </Button>
- )}
- </OrgPermissionCan>
- </div>
- </div>
- <IdentityTable handlePopUpOpen={handlePopUpOpen} />
- </div>
- {/* Identity Auth Templates Section */}
- <div className="mt-4 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex flex-wrap items-center justify-between gap-2">
- <div className="flex items-center gap-x-2">
- <p className="text-xl font-medium text-mineshaft-100">
+ handlePopUpOpen("identity");
+ }}
+ isDisabled={!isAllowed}
+ >
+ <PlusIcon />
+ {isSubOrganization
+ ? "Add Machine Identity to Sub-Organization"
+ : "Create Organization Machine Identity"}
+ </Button>
+ )}
+ </OrgPermissionCan>
+ </UnstableCardAction>
+ </UnstableCardHeader>
+ <UnstableCardContent>
+ <IdentityTable handlePopUpOpen={handlePopUpOpen} />
+ </UnstableCardContent>
+ </UnstableCard>
+ <UnstableCard>
+ <UnstableCardHeader>
+ <UnstableCardTitle>
Machine Identity Auth Templates
- </p>
- <DocumentationLinkBadge href="https://infisical.com/docs/documentation/platform/identities/auth-templates" />
- </div>
- <OrgPermissionCan
- I={OrgPermissionMachineIdentityAuthTemplateActions.CreateTemplates}
- a={OrgPermissionSubjects.MachineIdentityAuthTemplate}
- >
- {(isAllowed) => (
- <Button
- variant="outline_bg"
- type="submit"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
- onClick={() => {
- if (subscription && !subscription.machineIdentityAuthTemplates) {
- handlePopUpOpen("upgradePlan", {
- isEnterpriseFeature: true,
- text: "Your current plan does not include access to creating Machine Identity Auth Templates. To unlock this feature, please upgrade to Infisical Enterprise plan."
- });
- return;
- }
- handlePopUpOpen("createTemplate");
- }}
- isDisabled={!isAllowed}
+ <DocumentationLinkBadge href="https://infisical.com/docs/documentation/platform/identities/auth-templates" />
+ </UnstableCardTitle>
+ <UnstableCardDescription>
+ Create and manage machine identity authentication templates
+ </UnstableCardDescription>
+ <UnstableCardAction>
+ <OrgPermissionCan
+ I={OrgPermissionMachineIdentityAuthTemplateActions.CreateTemplates}
+ a={OrgPermissionSubjects.MachineIdentityAuthTemplate}
>
- Create Template
- </Button>
- )}
- </OrgPermissionCan>
- </div>
- <IdentityAuthTemplatesTable handlePopUpOpen={handlePopUpOpen} />
+ {(isAllowed) => (
+ <Button
+ variant={isSubOrganization ? "sub-org" : "org"}
+ onClick={() => {
+ if (subscription && !subscription.machineIdentityAuthTemplates) {
+ handlePopUpOpen("upgradePlan", {
+ isEnterpriseFeature: true,
+ text: "Your current plan does not include access to creating Machine Identity Auth Templates. To unlock this feature, please upgrade to Infisical Enterprise plan."
+ });
+ return;
+ }
+ handlePopUpOpen("createTemplate");
+ }}
+ isDisabled={!isAllowed}
+ >
+ <PlusIcon />
+ Create Template
+ </Button>
+ )}
+ </OrgPermissionCan>
+ </UnstableCardAction>
+ </UnstableCardHeader>
+ <UnstableCardContent>
+ <IdentityAuthTemplatesTable handlePopUpOpen={handlePopUpOpen} />
+ </UnstableCardContent>
+ </UnstableCard>
</div>
<IdentityAuthTemplateModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
<MachineAuthTemplateUsagesModal
@@ -216,7 +236,7 @@ export const IdentitySection = withPermission(
{isSubOrganization && (
<div className="mb-4 flex items-center justify-center gap-x-2">
<div className="flex w-3/4 gap-x-0.5 rounded-md border border-mineshaft-600 bg-mineshaft-800 p-1">
- <Button
+ <ButtonV2
variant="outline_bg"
onClick={() => {
setWizardStep(IdentityWizardSteps.CreateIdentity);
@@ -230,8 +250,8 @@ export const IdentitySection = withPermission(
)}
>
Create New
- </Button>
- <Button
+ </ButtonV2>
+ <ButtonV2
variant="outline_bg"
onClick={() => {
setWizardStep(IdentityWizardSteps.LinkIdentity);
@@ -245,7 +265,7 @@ export const IdentitySection = withPermission(
)}
>
Assign Existing
- </Button>
+ </ButtonV2>
</div>
<Tooltip
className="max-w-sm"
@@ -325,7 +345,7 @@ export const IdentitySection = withPermission(
text={popUp.upgradePlan.data?.text}
isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}
/>
- </div>
+ </>
);
},
{ action: OrgPermissionIdentityActions.Read, subject: OrgPermissionSubjects.Identity }
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx
index 1983f9428b..ce57e9bbe3 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx
@@ -1,51 +1,54 @@
import { useCallback, useState } from "react";
-import {
- faArrowDown,
- faArrowUp,
- faCheckCircle,
- faChevronRight,
- faEdit,
- faEllipsisV,
- faFilter,
- faInfoCircle,
- faMagnifyingGlass,
- faServer,
- faTrash
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useNavigate } from "@tanstack/react-router";
+import {
+ ChevronDownIcon,
+ EditIcon,
+ FilterIcon,
+ InfoIcon,
+ MoreHorizontalIcon,
+ SearchIcon,
+ TrashIcon
+} from "lucide-react";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
import { LastLoginSection } from "@app/components/organization/LastLoginSection";
import { OrgPermissionCan } from "@app/components/permissions";
import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuTrigger,
- DropdownSubMenu,
- DropdownSubMenuContent,
- DropdownSubMenuTrigger,
- EmptyState,
- IconButton,
- Input,
- Pagination,
+ Badge,
+ InputGroup,
+ InputGroupAddon,
+ InputGroupInput,
+ OrgIcon,
Select,
+ SelectContent,
SelectItem,
- Spinner,
- Table,
- TableContainer,
- TableSkeleton,
- TBody,
- Td,
- Th,
- THead,
+ SelectTrigger,
+ SelectValue,
+ Skeleton,
+ SubOrgIcon,
Tooltip,
- Tr
-} from "@app/components/v2";
-import { Badge, OrgIcon, SubOrgIcon } from "@app/components/v3";
+ TooltipContent,
+ TooltipTrigger,
+ UnstableDropdownMenu,
+ UnstableDropdownMenuCheckboxItem,
+ UnstableDropdownMenuContent,
+ UnstableDropdownMenuItem,
+ UnstableDropdownMenuLabel,
+ UnstableDropdownMenuTrigger,
+ UnstableEmpty,
+ UnstableEmptyDescription,
+ UnstableEmptyHeader,
+ UnstableEmptyTitle,
+ UnstableIconButton,
+ UnstablePagination,
+ UnstableTable,
+ UnstableTableBody,
+ UnstableTableCell,
+ UnstableTableHead,
+ UnstableTableHeader,
+ UnstableTableRow
+} from "@app/components/v3";
import { OrgPermissionIdentityActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import {
getUserTablePreference,
@@ -112,7 +115,7 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
const { mutateAsync: updateMutateAsync } = useUpdateOrgIdentity();
- const { data, isPending, isFetching } = useSearchOrgIdentityMemberships({
+ const { data, isPending } = useSearchOrgIdentityMemberships({
offset,
limit,
orderDirection,
@@ -172,175 +175,173 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
const isTableFiltered = Boolean(filter.roles.length);
+ const isFiltered = debouncedSearch.trim().length > 0 || isTableFiltered;
+
return (
- <div>
- <div className="mb-4 flex items-center space-x-2">
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <IconButton
- ariaLabel="Filter Machine Identities"
- variant="plain"
- size="sm"
- className={twMerge(
- "flex h-9.5 w-[2.6rem] items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
- isTableFiltered && "border-primary/50 text-primary"
- )}
+ <>
+ <div className="mb-4 flex gap-2">
+ <InputGroup className="flex-1">
+ <InputGroupAddon>
+ <SearchIcon />
+ </InputGroupAddon>
+ <InputGroupInput
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ placeholder={`Search ${isSubOrganization ? "sub-organization" : "organization"} machine identities by name...`}
+ />
+ </InputGroup>
+ <UnstableDropdownMenu>
+ <UnstableDropdownMenuTrigger asChild>
+ <UnstableIconButton
+ variant={
+ // eslint-disable-next-line no-nested-ternary
+ isTableFiltered ? (isSubOrganization ? "sub-org" : "org") : "outline"
+ }
>
- <FontAwesomeIcon icon={faFilter} />
- </IconButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="start" className="p-0">
- <DropdownMenuLabel>Filter By</DropdownMenuLabel>
- <DropdownSubMenu>
- <DropdownSubMenuTrigger
- iconPos="right"
- icon={<FontAwesomeIcon icon={faChevronRight} size="sm" />}
+ <FilterIcon />
+ </UnstableIconButton>
+ </UnstableDropdownMenuTrigger>
+ <UnstableDropdownMenuContent align="end" className="max-h-80 overflow-y-auto">
+ <UnstableDropdownMenuLabel>Filter by Organization Role</UnstableDropdownMenuLabel>
+ {roles?.map(({ id, slug, name }) => (
+ <UnstableDropdownMenuCheckboxItem
+ key={id}
+ checked={filter.roles.includes(slug)}
+ onClick={(e) => {
+ e.preventDefault();
+ handleRoleToggle(slug);
+ }}
>
- Roles
- </DropdownSubMenuTrigger>
- <DropdownSubMenuContent className="max-h-80 thin-scrollbar overflow-y-auto rounded-l-none">
- <DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
- Filter {isSubOrganization ? "Sub-" : ""}Organization Machine Identities by Role
- </DropdownMenuLabel>
- {roles?.map(({ id, slug, name }) => (
- <DropdownMenuItem
- onClick={(evt) => {
- evt.preventDefault();
- handleRoleToggle(slug);
- }}
- key={id}
- icon={filter.roles.includes(slug) && <FontAwesomeIcon icon={faCheckCircle} />}
- iconPos="right"
- >
- <div className="flex items-center">
- <div
- className="mr-2 h-2 w-2 rounded-full"
- style={{ background: "#bec2c8" }}
- />
- {name}
- </div>
- </DropdownMenuItem>
- ))}
- </DropdownSubMenuContent>
- </DropdownSubMenu>
- </DropdownMenuContent>
- </DropdownMenu>
- <Input
- value={search}
- onChange={(e) => setSearch(e.target.value)}
- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
- placeholder={`Search ${isSubOrganization ? "sub-organization" : "organization"} machine identities by name...`}
- />
+ {name}
+ </UnstableDropdownMenuCheckboxItem>
+ ))}
+ </UnstableDropdownMenuContent>
+ </UnstableDropdownMenu>
</div>
- <TableContainer>
- <Table>
- <THead>
- <Tr className="h-14">
- <Th className="w-2/3">
- <div className="flex items-center">
+ {!isPending && !data?.identities?.length ? (
+ <UnstableEmpty className="border">
+ <UnstableEmptyHeader>
+ <UnstableEmptyTitle>
+ {isFiltered
+ ? `No ${isSubOrganization ? "sub-" : ""}organization machine identities match search filter`
+ : `No machine identities have been added to this ${isSubOrganization ? "sub-" : ""}organization`}
+ </UnstableEmptyTitle>
+ <UnstableEmptyDescription>
+ {isFiltered
+ ? "Adjust your search or filter criteria."
+ : "Add a machine identity to get started."}
+ </UnstableEmptyDescription>
+ </UnstableEmptyHeader>
+ </UnstableEmpty>
+ ) : (
+ <>
+ <UnstableTable>
+ <UnstableTableHeader>
+ <UnstableTableRow>
+ <UnstableTableHead
+ className="w-1/2 cursor-pointer"
+ onClick={() => handleSort(OrgIdentityOrderBy.Name)}
+ >
Name
- <IconButton
- variant="plain"
- className={`ml-2 ${orderBy === OrgIdentityOrderBy.Name ? "" : "opacity-30"}`}
- ariaLabel="sort"
- onClick={() => handleSort(OrgIdentityOrderBy.Name)}
- >
- <FontAwesomeIcon
- icon={
+ <ChevronDownIcon
+ className={twMerge(
+ "transition-transform",
+ orderBy === OrgIdentityOrderBy.Name &&
orderDirection === OrderByDirection.DESC &&
- orderBy === OrgIdentityOrderBy.Name
- ? faArrowUp
- : faArrowDown
- }
- />
- </IconButton>
- </div>
- </Th>
- <Th>
- <div className="flex items-center">
+ "rotate-180",
+ orderBy !== OrgIdentityOrderBy.Name && "opacity-30"
+ )}
+ />
+ </UnstableTableHead>
+ <UnstableTableHead
+ className="cursor-pointer"
+ onClick={() => handleSort(OrgIdentityOrderBy.Role)}
+ >
{isSubOrganization ? "Sub-" : ""}Organization Role
- <IconButton
- variant="plain"
- className={`ml-2 ${orderBy === OrgIdentityOrderBy.Role ? "" : "opacity-30"}`}
- ariaLabel="sort"
- onClick={() => handleSort(OrgIdentityOrderBy.Role)}
- >
- <FontAwesomeIcon
- icon={
+ <ChevronDownIcon
+ className={twMerge(
+ "transition-transform",
+ orderBy === OrgIdentityOrderBy.Role &&
orderDirection === OrderByDirection.DESC &&
- orderBy === OrgIdentityOrderBy.Role
- ? faArrowUp
- : faArrowDown
- }
- />
- </IconButton>
- </div>
- </Th>
- {isSubOrganization && <Th>Managed By</Th>}
- <Th className="w-16">{isFetching ? <Spinner size="xs" /> : null}</Th>
- </Tr>
- </THead>
- <TBody>
- {isPending && (
- <TableSkeleton columns={isSubOrganization ? 4 : 3} innerKey="org-identities" />
- )}
- {!isPending &&
- data?.identities?.map(
- ({
- identity: { id, name, orgId },
- role,
- customRole,
- lastLoginAuthMethod,
- lastLoginTime
- }) => {
- const isSubOrgIdentity = currentOrg.id === orgId;
+ "rotate-180",
+ orderBy !== OrgIdentityOrderBy.Role && "opacity-30"
+ )}
+ />
+ </UnstableTableHead>
+ {isSubOrganization && <UnstableTableHead>Managed By</UnstableTableHead>}
+ <UnstableTableHead className="w-5" />
+ </UnstableTableRow>
+ </UnstableTableHeader>
+ <UnstableTableBody>
+ {isPending &&
+ Array.from({ length: perPage }).map((_, i) => (
+ <UnstableTableRow key={`skeleton-${i + 1}`}>
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-full" />
+ </UnstableTableCell>
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-full" />
+ </UnstableTableCell>
+ {isSubOrganization && (
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-full" />
+ </UnstableTableCell>
+ )}
+ <UnstableTableCell>
+ <Skeleton className="h-4 w-4" />
+ </UnstableTableCell>
+ </UnstableTableRow>
+ ))}
+ {!isPending &&
+ data?.identities?.map(
+ ({
+ identity: { id, name, orgId },
+ role,
+ customRole,
+ lastLoginAuthMethod,
+ lastLoginTime
+ }) => {
+ const isSubOrgIdentity = currentOrg.id === orgId;
- return (
- <Tr
- className="h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
- key={`identity-${id}`}
- onClick={() =>
- navigate({
- to: "/organizations/$orgId/identities/$identityId",
- params: {
- identityId: id,
- orgId: currentOrg.id
- }
- })
- }
- >
- <Td className="group max-w-0 truncate">
- {name}
- {lastLoginAuthMethod && lastLoginTime && (
- <Tooltip
- className="max-w-96 min-w-52 px-3"
- content={
- <LastLoginSection
- lastLoginAuthMethod={identityAuthToNameMap[lastLoginAuthMethod]}
- lastLoginTime={lastLoginTime}
- />
+ return (
+ <UnstableTableRow
+ key={`identity-${id}`}
+ className="cursor-pointer"
+ onClick={() =>
+ navigate({
+ to: "/organizations/$orgId/identities/$identityId",
+ params: {
+ identityId: id,
+ orgId: currentOrg.id
}
+ })
+ }
+ >
+ <UnstableTableCell isTruncatable className="group">
+ {name}
+ {lastLoginAuthMethod && lastLoginTime && (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <InfoIcon className="ml-2 inline size-3.5 text-mineshaft-400 opacity-0 transition-all group-hover:opacity-100" />
+ </TooltipTrigger>
+ <TooltipContent className="max-w-96 min-w-52">
+ <LastLoginSection
+ lastLoginAuthMethod={identityAuthToNameMap[lastLoginAuthMethod]}
+ lastLoginTime={lastLoginTime}
+ />
+ </TooltipContent>
+ </Tooltip>
+ )}
+ </UnstableTableCell>
+ <UnstableTableCell>
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Edit}
+ a={OrgPermissionSubjects.Identity}
>
- <FontAwesomeIcon
- icon={faInfoCircle}
- className="ml-2 text-mineshaft-400 opacity-0 transition-all group-hover:opacity-100"
- />
- </Tooltip>
- )}
- </Td>
- <Td>
- <OrgPermissionCan
- I={OrgPermissionIdentityActions.Edit}
- a={OrgPermissionSubjects.Identity}
- >
- {(isAllowed) => {
- return (
+ {(isAllowed) => (
<Select
value={role === "custom" ? (customRole?.slug as string) : role}
- isDisabled={!isAllowed}
- className="h-8 w-48 bg-mineshaft-700"
- position="popper"
- dropdownContainerClassName="border border-mineshaft-600 bg-mineshaft-800"
+ disabled={!isAllowed}
onValueChange={(selectedRole) =>
handleChangeRole({
identityId: id,
@@ -348,120 +349,119 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
})
}
>
- {(roles || []).map(({ slug, name: roleName }) => (
- <SelectItem value={slug} key={`owner-option-${slug}`}>
- {roleName}
- </SelectItem>
- ))}
+ <SelectTrigger
+ className="w-full max-w-32 lg:max-w-64"
+ size="sm"
+ onClick={(e) => e.stopPropagation()}
+ >
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent className="max-w-32 lg:max-w-64">
+ {(roles || []).map(({ slug, name: roleName }) => (
+ <SelectItem value={slug} key={`owner-option-${slug}`}>
+ {roleName}
+ </SelectItem>
+ ))}
+ </SelectContent>
</Select>
- );
- }}
- </OrgPermissionCan>
- </Td>
- {isSubOrganization && (
- <Td>
- <Badge variant={isSubOrgIdentity ? "sub-org" : "org"}>
- {isSubOrgIdentity ? (
- <>
- <SubOrgIcon />
- Sub-Organization
- </>
- ) : (
- <>
- <OrgIcon />
- Root Organization
- </>
)}
- </Badge>
- </Td>
- )}
- <Td>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <IconButton
- ariaLabel="Options"
- className="w-6"
- colorSchema="secondary"
- variant="plain"
- >
- <FontAwesomeIcon icon={faEllipsisV} />
- </IconButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent sideOffset={2} align="end">
- <OrgPermissionCan
- I={OrgPermissionIdentityActions.Edit}
- a={OrgPermissionSubjects.Identity}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- icon={<FontAwesomeIcon icon={faEdit} />}
- onClick={(e) => {
- e.stopPropagation();
- navigate({
- to: "/organizations/$orgId/identities/$identityId",
- params: {
- identityId: id,
- orgId
- }
- });
- }}
- isDisabled={!isAllowed}
- >
- Edit Machine Identity {isSubOrgIdentity ? "" : "Membership"}
- </DropdownMenuItem>
+ </OrgPermissionCan>
+ </UnstableTableCell>
+ {isSubOrganization && (
+ <UnstableTableCell>
+ <Badge variant={isSubOrgIdentity ? "sub-org" : "org"}>
+ {isSubOrgIdentity ? (
+ <>
+ <SubOrgIcon />
+ Sub-Organization
+ </>
+ ) : (
+ <>
+ <OrgIcon />
+ Root Organization
+ </>
)}
- </OrgPermissionCan>
- <OrgPermissionCan
- I={OrgPermissionIdentityActions.Delete}
- a={OrgPermissionSubjects.Identity}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("deleteIdentity", {
- identityId: id,
- name
- });
- }}
- isDisabled={!isAllowed}
- icon={<FontAwesomeIcon icon={faTrash} />}
- >
- {isSubOrgIdentity
- ? "Delete Machine Identity"
- : "Remove From Sub-Organization"}
- </DropdownMenuItem>
- )}
- </OrgPermissionCan>
- </DropdownMenuContent>
- </DropdownMenu>
- </Td>
- </Tr>
- );
- }
- )}
- </TBody>
- </Table>
- {!isPending && data && totalCount > 0 && (
- <Pagination
- count={totalCount}
- page={page}
- perPage={perPage}
- onChangePage={(newPage) => setPage(newPage)}
- onChangePerPage={handlePerPageChange}
- />
- )}
- {!isPending && data && data?.identities.length === 0 && (
- <EmptyState
- title={
- debouncedSearch.trim().length > 0 || filter.roles?.length > 0
- ? `No ${isSubOrganization ? "sub-" : ""}organization machine identities match search filter`
- : `No machine identities have been created in this ${isSubOrganization ? "sub-" : ""}organization`
- }
- icon={faServer}
- />
- )}
- </TableContainer>
- </div>
+ </Badge>
+ </UnstableTableCell>
+ )}
+ <UnstableTableCell>
+ <UnstableDropdownMenu>
+ <UnstableDropdownMenuTrigger asChild>
+ <UnstableIconButton
+ variant="ghost"
+ size="xs"
+ onClick={(e) => e.stopPropagation()}
+ >
+ <MoreHorizontalIcon />
+ </UnstableIconButton>
+ </UnstableDropdownMenuTrigger>
+ <UnstableDropdownMenuContent align="end">
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Edit}
+ a={OrgPermissionSubjects.Identity}
+ >
+ {(isAllowed) => (
+ <UnstableDropdownMenuItem
+ onClick={(e) => {
+ e.stopPropagation();
+ navigate({
+ to: "/organizations/$orgId/identities/$identityId",
+ params: {
+ identityId: id,
+ orgId
+ }
+ });
+ }}
+ isDisabled={!isAllowed}
+ >
+ <EditIcon />
+ Edit Machine Identity {isSubOrgIdentity ? "" : "Membership"}
+ </UnstableDropdownMenuItem>
+ )}
+ </OrgPermissionCan>
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Delete}
+ a={OrgPermissionSubjects.Identity}
+ >
+ {(isAllowed) => (
+ <UnstableDropdownMenuItem
+ variant="danger"
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("deleteIdentity", {
+ identityId: id,
+ name
+ });
+ }}
+ isDisabled={!isAllowed}
+ >
+ <TrashIcon />
+ {isSubOrgIdentity
+ ? "Delete Machine Identity"
+ : "Remove From Sub-Organization"}
+ </UnstableDropdownMenuItem>
+ )}
+ </OrgPermissionCan>
+ </UnstableDropdownMenuContent>
+ </UnstableDropdownMenu>
+ </UnstableTableCell>
+ </UnstableTableRow>
+ );
+ }
+ )}
+ </UnstableTableBody>
+ </UnstableTable>
+ {totalCount > 0 && (
+ <UnstablePagination
+ count={totalCount}
+ page={page}
+ perPage={perPage}
+ onChangePage={setPage}
+ onChangePerPage={handlePerPageChange}
+ />
+ )}
+ </>
+ )}
+ </>
);
};
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx
index 9f60faab2a..f921323c41 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx
@@ -212,10 +212,7 @@ export const OrgMembersSection = () => {
<UnstableCardHeader>
<UnstableCardTitle>
{isSubOrganization ? "Sub-" : ""}Organization Users
- <DocumentationLinkBadge
- className="ml-2"
- href="https://infisical.com/docs/documentation/platform/identities/user-identities"
- />
+ <DocumentationLinkBadge href="https://infisical.com/docs/documentation/platform/identities/user-identities" />
</UnstableCardTitle>
<UnstableCardDescription>
Invite and manage {isSubOrganization ? "sub-" : ""}organization users
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersTable.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersTable.tsx
index 0d48cc9326..a34fff271c 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersTable.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersTable.tsx
@@ -336,7 +336,7 @@ export const OrgMembersTable = ({
</UnstableDropdownMenuTrigger>
<UnstableDropdownMenuContent align="end">
<UnstableDropdownMenuLabel>
- Filter Users by {isSubOrganization ? "Sub-" : ""}Organization Role
+ Filter by {isSubOrganization ? "Sub-" : ""}Organization Role
</UnstableDropdownMenuLabel>
{roles?.map(({ id, slug, name }) => (
<UnstableDropdownMenuCheckboxItem
@@ -359,7 +359,7 @@ export const OrgMembersTable = ({
<UnstableEmptyHeader>
<UnstableEmptyTitle>
{members.length
- ? `No ${isSubOrganization ? "sub-" : ""}organization users match search...`
+ ? `No ${isSubOrganization ? "sub-" : ""}organization users match search`
: `No ${isSubOrganization ? "sub-" : ""}organization users found`}
</UnstableEmptyTitle>
<UnstableEmptyDescription>
@@ -563,7 +563,7 @@ export const OrgMembersTable = ({
>
<SelectTrigger
size="sm"
- className="!w-full max-w-32 lg:max-w-64"
+ className="w-full max-w-32 lg:max-w-64"
onClick={(e) => e.stopPropagation()}
>
<SelectValue />
@@ -614,10 +614,7 @@ export const OrgMembersTable = ({
</OrgPermissionCan>
)}
<UnstableDropdownMenu>
- <UnstableDropdownMenuTrigger
- disabled={userId === u?.id}
- onClick={(e) => e.stopPropagation()}
- >
+ <UnstableDropdownMenuTrigger asChild>
<UnstableIconButton
variant="ghost"
size="xs"