mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 10:28:00 +00:00
fix: type-check issues
This commit is contained in:
@@ -157,7 +157,7 @@ const NewProjectForm = ({ onOpenChange }: NewProjectFormProps) => {
|
|||||||
onOpenChange(false);
|
onOpenChange(false);
|
||||||
navigate({
|
navigate({
|
||||||
to: getProjectHomePage(project.type, project.environments),
|
to: getProjectHomePage(project.type, project.environments),
|
||||||
params: { projectId: project.id }
|
params: { projectId: project.id, orgId: currentOrg.id }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const onSubmit = handleSubmit((data) => {
|
const onSubmit = handleSubmit((data) => {
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ export const ProjectSelect = () => {
|
|||||||
<Link
|
<Link
|
||||||
to={getProjectHomePage(currentWorkspace.type, currentWorkspace.environments)}
|
to={getProjectHomePage(currentWorkspace.type, currentWorkspace.environments)}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id,
|
||||||
|
orgId: currentWorkspace.orgId
|
||||||
}}
|
}}
|
||||||
className="group flex cursor-pointer items-center gap-x-1.5 overflow-hidden hover:text-white"
|
className="group flex cursor-pointer items-center gap-x-1.5 overflow-hidden hover:text-white"
|
||||||
>
|
>
|
||||||
@@ -154,7 +155,8 @@ export const ProjectSelect = () => {
|
|||||||
const url = linkOptions({
|
const url = linkOptions({
|
||||||
to: getProjectHomePage(workspace.type, workspace.environments),
|
to: getProjectHomePage(workspace.type, workspace.environments),
|
||||||
params: {
|
params: {
|
||||||
projectId: workspace.id
|
projectId: workspace.id,
|
||||||
|
orgId: workspace.orgId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
subOrganization: currentOrg?.subOrganization?.name
|
subOrganization: currentOrg?.subOrganization?.name
|
||||||
|
|||||||
+3
-1
@@ -20,7 +20,7 @@ import {
|
|||||||
Tr
|
Tr
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { useProject } from "@app/context";
|
import { useOrganization, useProject } from "@app/context";
|
||||||
import {
|
import {
|
||||||
PkiSync,
|
PkiSync,
|
||||||
useAddCertificatesToPkiSync,
|
useAddCertificatesToPkiSync,
|
||||||
@@ -49,6 +49,7 @@ export const CertificateManagePkiSyncsModal = ({ popUp, handlePopUpToggle }: Pro
|
|||||||
const [currentPage, setCurrentPage] = useState(1);
|
const [currentPage, setCurrentPage] = useState(1);
|
||||||
const [searchTerm, setSearchTerm] = useState("");
|
const [searchTerm, setSearchTerm] = useState("");
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { certificateId, commonName } = popUp.data || {};
|
const { certificateId, commonName } = popUp.data || {};
|
||||||
@@ -92,6 +93,7 @@ export const CertificateManagePkiSyncsModal = ({ popUp, handlePopUpToggle }: Pro
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { useNavigate, useSearch } from "@tanstack/react-router";
|
|||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub, useProject } from "@app/context";
|
import { ProjectPermissionSub, useOrganization, useProject } from "@app/context";
|
||||||
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { ProjectType } from "@app/hooks/api/projects/types";
|
import { ProjectType } from "@app/hooks/api/projects/types";
|
||||||
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
@@ -14,6 +14,7 @@ import { PkiSyncsTab } from "./components";
|
|||||||
|
|
||||||
export const IntegrationsListPage = () => {
|
export const IntegrationsListPage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
@@ -30,7 +31,8 @@ export const IntegrationsListPage = () => {
|
|||||||
selectedTab: tab as IntegrationsListPageTabs
|
selectedTab: tab as IntegrationsListPageTabs
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
projectId: currentProject?.id
|
projectId: currentProject?.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
+4
-2
@@ -39,7 +39,7 @@ import {
|
|||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { Badge } from "@app/components/v3";
|
import { Badge } from "@app/components/v3";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionSub, useOrganization } from "@app/context";
|
||||||
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { PKI_SYNC_MAP } from "@app/helpers/pkiSyncs";
|
import { PKI_SYNC_MAP } from "@app/helpers/pkiSyncs";
|
||||||
import { useToggle } from "@app/hooks";
|
import { useToggle } from "@app/hooks";
|
||||||
@@ -82,6 +82,7 @@ export const PkiSyncRow = ({
|
|||||||
|
|
||||||
const { syncOption } = usePkiSyncOption(destination);
|
const { syncOption } = usePkiSyncOption(destination);
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const [isIdCopied, setIsIdCopied] = useToggle(false);
|
const [isIdCopied, setIsIdCopied] = useToggle(false);
|
||||||
|
|
||||||
const handleCopyId = useCallback(() => {
|
const handleCopyId = useCallback(() => {
|
||||||
@@ -127,7 +128,8 @@ export const PkiSyncRow = ({
|
|||||||
to: ROUTE_PATHS.CertManager.PkiSyncDetailsByIDPage.path,
|
to: ROUTE_PATHS.CertManager.PkiSyncDetailsByIDPage.path,
|
||||||
params: {
|
params: {
|
||||||
syncId: id,
|
syncId: id,
|
||||||
projectId
|
projectId,
|
||||||
|
orgId: currentOrg.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
+8
-6
@@ -8,7 +8,7 @@ import { CreatePkiSyncModal } from "@app/components/pki-syncs";
|
|||||||
import { Button, Spinner } from "@app/components/v2";
|
import { Button, Spinner } from "@app/components/v2";
|
||||||
import { DocumentationLinkBadge } from "@app/components/v3";
|
import { DocumentationLinkBadge } from "@app/components/v3";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub, useProject } from "@app/context";
|
import { ProjectPermissionSub, useOrganization, useProject } from "@app/context";
|
||||||
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
import { useListPkiSyncs } from "@app/hooks/api/pkiSyncs";
|
import { useListPkiSyncs } from "@app/hooks/api/pkiSyncs";
|
||||||
@@ -26,18 +26,19 @@ export const PkiSyncsTab = () => {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const memoizedSearch = useMemo(() => search, [search]);
|
const memoizedSearch = useMemo(() => search, [search]);
|
||||||
|
|
||||||
const navigateToBase = useCallback(() => {
|
const navigateToBase = useCallback(() => {
|
||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
projectId: currentProject?.id
|
projectId: currentProject?.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
},
|
},
|
||||||
search: memoizedSearch
|
search: memoizedSearch
|
||||||
});
|
});
|
||||||
}, [navigate, currentProject?.id, memoizedSearch]);
|
}, [navigate, currentProject?.id, currentOrg.id, memoizedSearch]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!addSync) return;
|
if (!addSync) return;
|
||||||
@@ -59,7 +60,7 @@ export const PkiSyncsTab = () => {
|
|||||||
handlePopUpOpen("addSync", { destination: parsedData.destination, initialData });
|
handlePopUpOpen("addSync", { destination: parsedData.destination, initialData });
|
||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
||||||
params: { projectId: currentProject?.id },
|
params: { projectId: currentProject?.id, orgId: currentOrg.id },
|
||||||
search: { selectedTab: IntegrationsListPageTabs.PkiSyncs },
|
search: { selectedTab: IntegrationsListPageTabs.PkiSyncs },
|
||||||
replace: true
|
replace: true
|
||||||
});
|
});
|
||||||
@@ -79,7 +80,8 @@ export const PkiSyncsTab = () => {
|
|||||||
connectionId,
|
connectionId,
|
||||||
connectionName,
|
connectionName,
|
||||||
navigate,
|
navigate,
|
||||||
currentProject?.id
|
currentProject?.id,
|
||||||
|
currentOrg.id
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const { data: pkiSyncs = [], isPending: isPkiSyncsPending } = useListPkiSyncs(
|
const { data: pkiSyncs = [], isPending: isPkiSyncsPending } = useListPkiSyncs(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
|
|
||||||
const PageContent = () => {
|
const PageContent = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { syncId, projectId } = useParams({
|
const { syncId, projectId, orgId } = useParams({
|
||||||
from: ROUTE_PATHS.CertManager.PkiSyncDetailsByIDPage.id
|
from: ROUTE_PATHS.CertManager.PkiSyncDetailsByIDPage.id
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -77,7 +77,8 @@ const PageContent = () => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId,
|
||||||
|
orgId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
selectedTab: IntegrationsListPageTabs.PkiSyncs
|
selectedTab: IntegrationsListPageTabs.PkiSyncs
|
||||||
|
|||||||
+4
-2
@@ -36,7 +36,7 @@ import {
|
|||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { Badge } from "@app/components/v3";
|
import { Badge } from "@app/components/v3";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionSub, useOrganization } from "@app/context";
|
||||||
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionPkiSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { PKI_SYNC_MAP } from "@app/helpers/pkiSyncs";
|
import { PKI_SYNC_MAP } from "@app/helpers/pkiSyncs";
|
||||||
import { usePopUp, useToggle } from "@app/hooks";
|
import { usePopUp, useToggle } from "@app/hooks";
|
||||||
@@ -69,6 +69,7 @@ export const PkiSyncActionTriggers = ({ pkiSync }: Props) => {
|
|||||||
const updatePkiSyncMutation = useUpdatePkiSync();
|
const updatePkiSyncMutation = useUpdatePkiSync();
|
||||||
|
|
||||||
const { syncOption } = usePkiSyncOption(destination);
|
const { syncOption } = usePkiSyncOption(destination);
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
|
|
||||||
const destinationName = PKI_SYNC_MAP[destination].name;
|
const destinationName = PKI_SYNC_MAP[destination].name;
|
||||||
|
|
||||||
@@ -287,7 +288,8 @@ export const PkiSyncActionTriggers = ({ pkiSync }: Props) => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.CertManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId,
|
||||||
|
orgId: currentOrg.id
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
selectedTab: IntegrationsListPageTabs.PkiSyncs
|
selectedTab: IntegrationsListPageTabs.PkiSyncs
|
||||||
|
|||||||
+8
-3
@@ -2,7 +2,7 @@ import { faFingerprint } from "@fortawesome/free-solid-svg-icons";
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link } from "@tanstack/react-router";
|
import { Link } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { useProject, useSubscription } from "@app/context";
|
import { useOrganization, useProject, useSubscription } from "@app/context";
|
||||||
import { EventType } from "@app/hooks/api/auditLogs/enums";
|
import { EventType } from "@app/hooks/api/auditLogs/enums";
|
||||||
import { TPkiSync } from "@app/hooks/api/pkiSyncs";
|
import { TPkiSync } from "@app/hooks/api/pkiSyncs";
|
||||||
import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";
|
import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";
|
||||||
@@ -20,7 +20,7 @@ type Props = {
|
|||||||
export const PkiSyncAuditLogsSection = ({ pkiSync }: Props) => {
|
export const PkiSyncAuditLogsSection = ({ pkiSync }: Props) => {
|
||||||
const { subscription } = useSubscription();
|
const { subscription } = useSubscription();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;
|
const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -53,7 +53,12 @@ export const PkiSyncAuditLogsSection = ({ pkiSync }: Props) => {
|
|||||||
<p>
|
<p>
|
||||||
Please{" "}
|
Please{" "}
|
||||||
{subscription && subscription.slug !== null ? (
|
{subscription && subscription.slug !== null ? (
|
||||||
<Link to="/organization/billing" target="_blank" rel="noopener noreferrer">
|
<Link
|
||||||
|
to="/organizations/$orgId/billing"
|
||||||
|
params={{ orgId: currentOrg.id }}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
<span className="cursor-pointer underline transition-all hover:text-white">
|
<span className="cursor-pointer underline transition-all hover:text-white">
|
||||||
upgrade your subscription
|
upgrade your subscription
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
+4
-2
@@ -235,8 +235,9 @@ export const OrgGroupsTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
<Tr
|
<Tr
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/groups/$groupId",
|
to: "/organizations/$orgId/groups/$groupId",
|
||||||
params: {
|
params: {
|
||||||
|
orgId,
|
||||||
groupId: id
|
groupId: id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -334,8 +335,9 @@ export const OrgGroupsTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
icon={<FontAwesomeIcon icon={faUserGroup} />}
|
icon={<FontAwesomeIcon icon={faUserGroup} />}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/groups/$groupId",
|
to: "/organizations/$orgId/groups/$groupId",
|
||||||
params: {
|
params: {
|
||||||
|
orgId,
|
||||||
groupId: id
|
groupId: id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
+6
-4
@@ -301,9 +301,10 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
key={`identity-${id}`}
|
key={`identity-${id}`}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/identities/$identityId",
|
to: "/organizations/$orgId/identities/$identityId",
|
||||||
params: {
|
params: {
|
||||||
identityId: id
|
identityId: id,
|
||||||
|
orgId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -397,9 +398,10 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/identities/$identityId",
|
to: "/organizations/$orgId/identities/$identityId",
|
||||||
params: {
|
params: {
|
||||||
identityId: id
|
identityId: id,
|
||||||
|
orgId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
+3
-2
@@ -61,9 +61,10 @@ export const MachineAuthTemplateUsagesModal = ({
|
|||||||
key={`usage-${usage.identityId}`}
|
key={`usage-${usage.identityId}`}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/identities/$identityId",
|
to: "/organizations/$orgId/identities/$identityId",
|
||||||
params: {
|
params: {
|
||||||
identityId: usage.identityId
|
identityId: usage.identityId,
|
||||||
|
orgId: organizationId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -64,9 +64,10 @@ export const OrgIdentityLinkForm = ({ onClose }: Props) => {
|
|||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/identities/$identityId",
|
to: "/organizations/$orgId/identities/$identityId",
|
||||||
params: {
|
params: {
|
||||||
identityId: identity.id
|
identityId: identity.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
+3
-2
@@ -155,9 +155,10 @@ export const OrgIdentityModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
|
|
||||||
handlePopUpToggle("identity", false);
|
handlePopUpToggle("identity", false);
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/identities/$identityId",
|
to: "/organizations/$orgId/identities/$identityId",
|
||||||
params: {
|
params: {
|
||||||
identityId: createdId
|
identityId: createdId,
|
||||||
|
orgId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-4
@@ -481,9 +481,10 @@ export const OrgMembersTable = ({
|
|||||||
className="h-10 w-full cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
|
className="h-10 w-full cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/members/$membershipId" as const,
|
to: "/organizations/$orgId/members/$membershipId" as const,
|
||||||
params: {
|
params: {
|
||||||
membershipId: orgMembershipId
|
membershipId: orgMembershipId,
|
||||||
|
orgId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -619,9 +620,10 @@ export const OrgMembersTable = ({
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/members/$membershipId" as const,
|
to: "/organizations/$orgId/members/$membershipId" as const,
|
||||||
params: {
|
params: {
|
||||||
membershipId: orgMembershipId
|
membershipId: orgMembershipId,
|
||||||
|
orgId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
+6
-4
@@ -280,9 +280,10 @@ export const OrgRoleTable = () => {
|
|||||||
className="h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
|
className="h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/roles/$roleId",
|
to: "/organizations/$orgId/roles/$roleId",
|
||||||
params: {
|
params: {
|
||||||
roleId: id
|
roleId: id,
|
||||||
|
orgId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -339,9 +340,10 @@ export const OrgRoleTable = () => {
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/roles/$roleId",
|
to: "/organizations/$orgId/roles/$roleId",
|
||||||
params: {
|
params: {
|
||||||
roleId: id
|
roleId: id,
|
||||||
|
orgId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const Page = () => {
|
|||||||
|
|
||||||
const { data, isPending } = useGetGroupById(groupId);
|
const { data, isPending } = useGetGroupById(groupId);
|
||||||
|
|
||||||
const { isSubOrganization } = useOrganization();
|
const { isSubOrganization, currentOrg } = useOrganization();
|
||||||
|
|
||||||
const { mutateAsync: deleteMutateAsync } = useDeleteGroup();
|
const { mutateAsync: deleteMutateAsync } = useDeleteGroup();
|
||||||
|
|
||||||
@@ -62,7 +62,8 @@ const Page = () => {
|
|||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/access-management" as const,
|
to: "/organizations/$orgId/access-management" as const,
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: {
|
search: {
|
||||||
selectedTab: TabSections.Groups
|
selectedTab: TabSections.Groups
|
||||||
}
|
}
|
||||||
@@ -78,7 +79,8 @@ const Page = () => {
|
|||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto w-full max-w-8xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
<Link
|
<Link
|
||||||
to="/organization/access-management"
|
to="/organizations/$orgId/access-management"
|
||||||
|
params={{ orgId: currentOrg.id }}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: TabSections.Groups
|
selectedTab: TabSections.Groups
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -6,11 +6,14 @@ export const Route = createFileRoute(
|
|||||||
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/groups/$groupId"
|
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/groups/$groupId"
|
||||||
)({
|
)({
|
||||||
component: GroupDetailsByIDPage,
|
component: GroupDetailsByIDPage,
|
||||||
context: () => ({
|
context: ({ params }) => ({
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
{
|
{
|
||||||
label: "Access Control",
|
label: "Access Control",
|
||||||
link: linkOptions({ to: "/organization/access-management" })
|
link: linkOptions({
|
||||||
|
to: "/organizations/$orgId/access-management" as const,
|
||||||
|
params
|
||||||
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "groups"
|
label: "groups"
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ const Page = () => {
|
|||||||
|
|
||||||
handlePopUpClose("deleteIdentity");
|
handlePopUpClose("deleteIdentity");
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/access-management",
|
to: "/organizations/$orgId/access-management" as const,
|
||||||
|
params: { orgId },
|
||||||
search: {
|
search: {
|
||||||
selectedTab: OrgAccessControlTabSections.Identities
|
selectedTab: OrgAccessControlTabSections.Identities
|
||||||
}
|
}
|
||||||
@@ -73,7 +74,8 @@ const Page = () => {
|
|||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto w-full max-w-8xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
<Link
|
<Link
|
||||||
to="/organization/access-management"
|
to="/organizations/$orgId/access-management"
|
||||||
|
params={{ orgId }}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: OrgAccessControlTabSections.Identities
|
selectedTab: OrgAccessControlTabSections.Identities
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ export const Route = createFileRoute(
|
|||||||
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/identities/$identityId"
|
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/identities/$identityId"
|
||||||
)({
|
)({
|
||||||
component: IdentityDetailsByIDPage,
|
component: IdentityDetailsByIDPage,
|
||||||
context: () => ({
|
context: ({ params }) => ({
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
{
|
{
|
||||||
label: "Access Control",
|
label: "Access Control",
|
||||||
link: linkOptions({ to: "/organization/access-management" })
|
link: linkOptions({ to: "/organizations/$orgId/access-management" as const, params })
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Identities"
|
label: "Identities"
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ export const Page = () => {
|
|||||||
|
|
||||||
handlePopUpClose("deleteOrgRole");
|
handlePopUpClose("deleteOrgRole");
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/access-management" as const,
|
to: "/organizations/$orgId/access-management" as const,
|
||||||
|
params: { orgId },
|
||||||
search: {
|
search: {
|
||||||
selectedTab: OrgAccessControlTabSections.Roles
|
selectedTab: OrgAccessControlTabSections.Roles
|
||||||
}
|
}
|
||||||
@@ -70,7 +71,8 @@ export const Page = () => {
|
|||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto w-full max-w-8xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
<Link
|
<Link
|
||||||
to="/organization/access-management"
|
to="/organizations/$orgId/access-management"
|
||||||
|
params={{ orgId }}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: OrgAccessControlTabSections.Roles
|
selectedTab: OrgAccessControlTabSections.Roles
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -59,8 +59,9 @@ const Content = ({ role, onClose }: ContentProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/roles/$roleId",
|
to: "/organizations/$orgId/roles/$roleId" as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: role.orgId,
|
||||||
roleId: newRole.id
|
roleId: newRole.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -97,8 +97,9 @@ export const RoleModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
|
|
||||||
handlePopUpToggle("role", false);
|
handlePopUpToggle("role", false);
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/roles/$roleId",
|
to: "/organizations/$orgId/roles/$roleId" as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId,
|
||||||
roleId: newRole.id
|
roleId: newRole.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ enum SecretSharingPageTabs {
|
|||||||
|
|
||||||
export const ShareSecretSection = () => {
|
export const ShareSecretSection = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { isSubOrganization } = useOrganization();
|
const { isSubOrganization, currentOrg } = useOrganization();
|
||||||
|
|
||||||
const { selectedTab } = useSearch({
|
const { selectedTab } = useSearch({
|
||||||
from: ROUTE_PATHS.Organization.SecretSharing.id
|
from: ROUTE_PATHS.Organization.SecretSharing.id
|
||||||
@@ -26,6 +26,7 @@ export const ShareSecretSection = () => {
|
|||||||
const updateSelectedTab = (tab: string) => {
|
const updateSelectedTab = (tab: string) => {
|
||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.Organization.SecretSharing.path,
|
to: ROUTE_PATHS.Organization.SecretSharing.path,
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: (prev) => ({ ...prev, selectedTab: tab as SecretSharingPageTabs })
|
search: (prev) => ({ ...prev, selectedTab: tab as SecretSharingPageTabs })
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-1
@@ -57,7 +57,8 @@ export const OAuthCallbackPage = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.Organization.SettingsPage.path
|
to: ROUTE_PATHS.Organization.SettingsPage.path,
|
||||||
|
params: { orgId: currentOrg.id }
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -17,6 +17,7 @@ import {
|
|||||||
THead,
|
THead,
|
||||||
Tr
|
Tr
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
|
import { useOrganization } from "@app/context";
|
||||||
import { useListAppConnections } from "@app/hooks/api/appConnections/queries";
|
import { useListAppConnections } from "@app/hooks/api/appConnections/queries";
|
||||||
import {
|
import {
|
||||||
useDeleteVaultExternalMigrationConfig,
|
useDeleteVaultExternalMigrationConfig,
|
||||||
@@ -33,6 +34,8 @@ export const VaultConnectionSection = () => {
|
|||||||
const [configToDelete, setConfigToDelete] = useState<TVaultExternalMigrationConfig | null>(null);
|
const [configToDelete, setConfigToDelete] = useState<TVaultExternalMigrationConfig | null>(null);
|
||||||
|
|
||||||
const { data: configs = [], isPending: isLoadingConfigs } = useGetVaultExternalMigrationConfigs();
|
const { data: configs = [], isPending: isLoadingConfigs } = useGetVaultExternalMigrationConfigs();
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { data: appConnections = [] } = useListAppConnections();
|
const { data: appConnections = [] } = useListAppConnections();
|
||||||
const { mutateAsync: deleteConfig } = useDeleteVaultExternalMigrationConfig();
|
const { mutateAsync: deleteConfig } = useDeleteVaultExternalMigrationConfig();
|
||||||
|
|
||||||
@@ -157,7 +160,8 @@ export const VaultConnectionSection = () => {
|
|||||||
Configure namespace-specific connections to enable in-platform migration features. Manage
|
Configure namespace-specific connections to enable in-platform migration features. Manage
|
||||||
connections in the{" "}
|
connections in the{" "}
|
||||||
<Link
|
<Link
|
||||||
to="/organization/app-connections"
|
to="/organizations/$orgId/app-connections"
|
||||||
|
params={{ orgId: currentOrg.id }}
|
||||||
className="text-primary underline hover:text-primary-300"
|
className="text-primary underline hover:text-primary-300"
|
||||||
>
|
>
|
||||||
App Connections
|
App Connections
|
||||||
|
|||||||
+5
-1
@@ -44,7 +44,11 @@ export const SubOrgNameChangeSection = (): JSX.Element => {
|
|||||||
subOrgId: currentOrg.id
|
subOrgId: currentOrg.id
|
||||||
});
|
});
|
||||||
|
|
||||||
navigate({ to: "/organization/settings", search: { subOrganization: name } });
|
navigate({
|
||||||
|
to: "/organizations/$orgId/settings",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
|
search: { subOrganization: name }
|
||||||
|
});
|
||||||
queryClient.invalidateQueries();
|
queryClient.invalidateQueries();
|
||||||
await router.invalidate({ sync: true });
|
await router.invalidate({ sync: true });
|
||||||
createNotification({
|
createNotification({
|
||||||
|
|||||||
+2
-1
@@ -263,7 +263,8 @@ export const LDAPGroupMapModal = ({ popUp, handlePopUpOpen, handlePopUpToggle }:
|
|||||||
size="sm"
|
size="sm"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/access-management"
|
to: "/organizations/$orgId/access-management",
|
||||||
|
params: { orgId: currentOrg.id }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ const Page = withPermission(
|
|||||||
|
|
||||||
handlePopUpClose("removeMember");
|
handlePopUpClose("removeMember");
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/access-management" as const,
|
to: "/organizations/$orgId/access-management" as const,
|
||||||
|
params: { orgId },
|
||||||
search: {
|
search: {
|
||||||
selectedTab: OrgAccessControlTabSections.Member
|
selectedTab: OrgAccessControlTabSections.Member
|
||||||
}
|
}
|
||||||
@@ -103,7 +104,8 @@ const Page = withPermission(
|
|||||||
{membership && (
|
{membership && (
|
||||||
<div className="mx-auto w-full max-w-8xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
<Link
|
<Link
|
||||||
to="/organization/access-management"
|
to="/organizations/$orgId/access-management"
|
||||||
|
params={{ orgId }}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: OrgAccessControlTabSections.Member
|
selectedTab: OrgAccessControlTabSections.Member
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ export const Route = createFileRoute(
|
|||||||
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/members/$membershipId"
|
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/members/$membershipId"
|
||||||
)({
|
)({
|
||||||
component: UserDetailsByIDPage,
|
component: UserDetailsByIDPage,
|
||||||
context: () => ({
|
context: ({ params }) => ({
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
{
|
{
|
||||||
label: "Access Control",
|
label: "Access Control",
|
||||||
link: linkOptions({ to: "/organization/access-management" })
|
link: linkOptions({ to: "/organizations/$orgId/access-management" as const, params })
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Users"
|
label: "Users"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { useNavigate, useSearch } from "@tanstack/react-router";
|
import { useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { useProject } from "@app/context";
|
import { useOrganization, useProject } from "@app/context";
|
||||||
import { getProjectBaseURL } from "@app/helpers/project";
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import { ProjectType } from "@app/hooks/api/projects/types";
|
import { ProjectType } from "@app/hooks/api/projects/types";
|
||||||
import { ProjectAccessControlTabs } from "@app/types/project";
|
import { ProjectAccessControlTabs } from "@app/types/project";
|
||||||
@@ -18,6 +18,7 @@ import {
|
|||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const selectedTab = useSearch({
|
const selectedTab = useSearch({
|
||||||
strict: false,
|
strict: false,
|
||||||
@@ -29,6 +30,7 @@ const Page = () => {
|
|||||||
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
||||||
search: (prev) => ({ ...prev, selectedTab: tab }),
|
search: (prev) => ({ ...prev, selectedTab: tab }),
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -140,7 +140,7 @@ const Content = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
<div className="text-sm">
|
<div className="text-sm">
|
||||||
All groups in your organization have already been added to this project.
|
All groups in your organization have already been added to this project.
|
||||||
</div>
|
</div>
|
||||||
<Link to={"/organization/access-management" as const}>
|
<Link to={"/organizations/$orgId/access-management" as const} params={{ orgId }}>
|
||||||
<Button variant="outline_bg">Create a new group</Button>
|
<Button variant="outline_bg">Create a new group</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+9
-1
@@ -32,7 +32,12 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
Tr
|
Tr
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
|
import {
|
||||||
|
ProjectPermissionActions,
|
||||||
|
ProjectPermissionSub,
|
||||||
|
useOrganization,
|
||||||
|
useProject
|
||||||
|
} from "@app/context";
|
||||||
import { getProjectBaseURL } from "@app/helpers/project";
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import {
|
import {
|
||||||
getUserTablePreference,
|
getUserTablePreference,
|
||||||
@@ -61,6 +66,7 @@ enum GroupsOrderBy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const GroupTable = ({ handlePopUpOpen }: Props) => {
|
export const GroupTable = ({ handlePopUpOpen }: Props) => {
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
@@ -161,6 +167,7 @@ export const GroupTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/groups/$groupId` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/groups/$groupId` as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id,
|
projectId: currentProject.id,
|
||||||
groupId: id
|
groupId: id
|
||||||
}
|
}
|
||||||
@@ -171,6 +178,7 @@ export const GroupTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/groups/$groupId` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/groups/$groupId` as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id,
|
projectId: currentProject.id,
|
||||||
groupId: id
|
groupId: id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,6 +277,7 @@ export const IdentityTab = withProjectPermission(
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id,
|
projectId: currentProject.id,
|
||||||
identityId: id
|
identityId: id
|
||||||
}
|
}
|
||||||
@@ -287,6 +288,7 @@ export const IdentityTab = withProjectPermission(
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id,
|
projectId: currentProject.id,
|
||||||
identityId: id
|
identityId: id
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -1,7 +1,7 @@
|
|||||||
import { Link } from "@tanstack/react-router";
|
import { Link } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { Alert, AlertDescription } from "@app/components/v2";
|
import { Alert, AlertDescription } from "@app/components/v2";
|
||||||
import { useProject } from "@app/context";
|
import { useOrganization, useProject } from "@app/context";
|
||||||
import { getProjectBaseURL } from "@app/helpers/project";
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import { TWorkspaceUser } from "@app/hooks/api/types";
|
import { TWorkspaceUser } from "@app/hooks/api/types";
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@ type Props = {
|
|||||||
onOpenUpgradeModal: (title: string) => void;
|
onOpenUpgradeModal: (title: string) => void;
|
||||||
};
|
};
|
||||||
export const MemberRoleForm = ({ projectMember, onOpenUpgradeModal }: Props) => {
|
export const MemberRoleForm = ({ projectMember, onOpenUpgradeModal }: Props) => {
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -24,6 +25,7 @@ export const MemberRoleForm = ({ projectMember, onOpenUpgradeModal }: Props) =>
|
|||||||
<Link
|
<Link
|
||||||
to={`${getProjectBaseURL(currentProject.type)}/members/$membershipId` as const}
|
to={`${getProjectBaseURL(currentProject.type)}/members/$membershipId` as const}
|
||||||
params={{
|
params={{
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id,
|
projectId: currentProject.id,
|
||||||
membershipId: projectMember.id
|
membershipId: projectMember.id
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -7,7 +7,12 @@ import { formatRelative } from "date-fns";
|
|||||||
|
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { EmptyState, PageHeader, Spinner } from "@app/components/v2";
|
import { EmptyState, PageHeader, Spinner } from "@app/components/v2";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
|
import {
|
||||||
|
ProjectPermissionActions,
|
||||||
|
ProjectPermissionSub,
|
||||||
|
useOrganization,
|
||||||
|
useProject
|
||||||
|
} from "@app/context";
|
||||||
import { getProjectBaseURL } from "@app/helpers/project";
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import { useGetWorkspaceGroupMembershipDetails } from "@app/hooks/api/projects/queries";
|
import { useGetWorkspaceGroupMembershipDetails } from "@app/hooks/api/projects/queries";
|
||||||
import { ProjectAccessControlTabs } from "@app/types/project";
|
import { ProjectAccessControlTabs } from "@app/types/project";
|
||||||
@@ -21,6 +26,7 @@ const Page = () => {
|
|||||||
select: (el) => el.groupId as string
|
select: (el) => el.groupId as string
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
const { data: groupMembership, isPending } = useGetWorkspaceGroupMembershipDetails(
|
const { data: groupMembership, isPending } = useGetWorkspaceGroupMembershipDetails(
|
||||||
@@ -42,7 +48,8 @@ const Page = () => {
|
|||||||
<Link
|
<Link
|
||||||
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
}}
|
}}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: ProjectAccessControlTabs.Groups
|
selectedTab: ProjectAccessControlTabs.Groups
|
||||||
|
|||||||
@@ -114,7 +114,8 @@ const Page = () => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId,
|
||||||
|
orgId: currentOrg.id
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
selectedTab: "identities"
|
selectedTab: "identities"
|
||||||
@@ -137,7 +138,8 @@ const Page = () => {
|
|||||||
<Link
|
<Link
|
||||||
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
params={{
|
params={{
|
||||||
projectId
|
projectId,
|
||||||
|
orgId: currentOrg.id
|
||||||
}}
|
}}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: ProjectAccessControlTabs.Identities
|
selectedTab: ProjectAccessControlTabs.Identities
|
||||||
@@ -223,9 +225,10 @@ const Page = () => {
|
|||||||
{(isAllowed) =>
|
{(isAllowed) =>
|
||||||
isAllowed ? (
|
isAllowed ? (
|
||||||
<Link
|
<Link
|
||||||
to="/organization/identities/$identityId"
|
to="/organizations/$orgId/identities/$identityId"
|
||||||
params={{
|
params={{
|
||||||
identityId
|
identityId,
|
||||||
|
orgId: currentOrg.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="cursor-pointer text-info underline underline-offset-2">
|
<span className="cursor-pointer text-info underline underline-offset-2">
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ export const Page = () => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
handlePopUpClose("removeMember");
|
handlePopUpClose("removeMember");
|
||||||
@@ -116,7 +117,8 @@ export const Page = () => {
|
|||||||
<Link
|
<Link
|
||||||
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
}}
|
}}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: ProjectAccessControlTabs.Member
|
selectedTab: ProjectAccessControlTabs.Member
|
||||||
|
|||||||
@@ -22,7 +22,12 @@ import {
|
|||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
PageHeader
|
PageHeader
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
|
import {
|
||||||
|
ProjectPermissionActions,
|
||||||
|
ProjectPermissionSub,
|
||||||
|
useOrganization,
|
||||||
|
useProject
|
||||||
|
} from "@app/context";
|
||||||
import { getProjectBaseURL } from "@app/helpers/project";
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import { useDeleteProjectRole, useGetProjectRoleBySlug } from "@app/hooks/api";
|
import { useDeleteProjectRole, useGetProjectRoleBySlug } from "@app/hooks/api";
|
||||||
import { ProjectMembershipRole } from "@app/hooks/api/roles/types";
|
import { ProjectMembershipRole } from "@app/hooks/api/roles/types";
|
||||||
@@ -40,7 +45,9 @@ const Page = () => {
|
|||||||
select: (el) => el.roleSlug as string
|
select: (el) => el.roleSlug as string
|
||||||
});
|
});
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const projectId = currentProject?.id || "";
|
const projectId = currentProject?.id || "";
|
||||||
|
const orgId = currentOrg?.id || "";
|
||||||
|
|
||||||
const { data } = useGetProjectRoleBySlug(projectId, roleSlug as string);
|
const { data } = useGetProjectRoleBySlug(projectId, roleSlug as string);
|
||||||
|
|
||||||
@@ -68,7 +75,8 @@ const Page = () => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/access-management` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId,
|
||||||
|
orgId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
selectedTab: ProjectAccessControlTabs.Roles
|
selectedTab: ProjectAccessControlTabs.Roles
|
||||||
@@ -87,7 +95,8 @@ const Page = () => {
|
|||||||
<Link
|
<Link
|
||||||
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
params={{
|
params={{
|
||||||
projectId
|
projectId,
|
||||||
|
orgId
|
||||||
}}
|
}}
|
||||||
search={{
|
search={{
|
||||||
selectedTab: ProjectAccessControlTabs.Roles
|
selectedTab: ProjectAccessControlTabs.Roles
|
||||||
|
|||||||
+3
-1
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { Button, FormControl, Input, Modal, ModalContent, Spinner } from "@app/components/v2";
|
import { Button, FormControl, Input, Modal, ModalContent, Spinner } from "@app/components/v2";
|
||||||
import { ProjectPermissionSub, useProject } from "@app/context";
|
import { ProjectPermissionSub, useOrganization, useProject } from "@app/context";
|
||||||
import { ProjectPermissionSecretActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionSecretActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { getProjectBaseURL } from "@app/helpers/project";
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import { useCreateProjectRole, useGetProjectRoleBySlug } from "@app/hooks/api";
|
import { useCreateProjectRole, useGetProjectRoleBySlug } from "@app/hooks/api";
|
||||||
@@ -45,6 +45,7 @@ const Content = ({ role, onClose }: ContentProps) => {
|
|||||||
resolver: zodResolver(schema)
|
resolver: zodResolver(schema)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
const createRole = useCreateProjectRole();
|
const createRole = useCreateProjectRole();
|
||||||
@@ -83,6 +84,7 @@ const Content = ({ role, onClose }: ContentProps) => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/roles/$roleSlug` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/roles/$roleSlug` as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
roleSlug: newRole.slug,
|
roleSlug: newRole.slug,
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { Button, FormControl, Input, Modal, ModalContent } from "@app/components/v2";
|
import { Button, FormControl, Input, Modal, ModalContent } from "@app/components/v2";
|
||||||
import { useProject } from "@app/context";
|
import { useOrganization, useProject } from "@app/context";
|
||||||
import { getProjectBaseURL } from "@app/helpers/project";
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import {
|
import {
|
||||||
useCreateProjectRole,
|
useCreateProjectRole,
|
||||||
@@ -38,6 +38,9 @@ export const RoleModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
roleSlug: string;
|
roleSlug: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
|
const orgId = currentOrg?.id || "";
|
||||||
|
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const projectId = currentProject?.id || "";
|
const projectId = currentProject?.id || "";
|
||||||
|
|
||||||
@@ -93,6 +96,7 @@ export const RoleModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/roles/$roleSlug` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/roles/$roleSlug` as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId,
|
||||||
roleSlug: slug,
|
roleSlug: slug,
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -111,6 +115,7 @@ export const RoleModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: `${getProjectBaseURL(currentProject.type)}/roles/$roleSlug` as const,
|
to: `${getProjectBaseURL(currentProject.type)}/roles/$roleSlug` as const,
|
||||||
params: {
|
params: {
|
||||||
|
orgId,
|
||||||
roleSlug: newRole.slug,
|
roleSlug: newRole.slug,
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export const CommitDetailsPage = () => {
|
|||||||
folderId,
|
folderId,
|
||||||
environment: envSlug
|
environment: envSlug
|
||||||
},
|
},
|
||||||
search: (query: Record<string, string>) => ({
|
search: (query) => ({
|
||||||
...query,
|
...query,
|
||||||
secretPath
|
secretPath
|
||||||
})
|
})
|
||||||
@@ -62,7 +62,7 @@ export const CommitDetailsPage = () => {
|
|||||||
environment: envSlug,
|
environment: envSlug,
|
||||||
commitId: selectedCommitId
|
commitId: selectedCommitId
|
||||||
},
|
},
|
||||||
search: (query: Record<string, string>) => ({
|
search: (query) => ({
|
||||||
...query,
|
...query,
|
||||||
secretPath
|
secretPath
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export const CommitsPage = () => {
|
|||||||
environment: envSlug,
|
environment: envSlug,
|
||||||
commitId
|
commitId
|
||||||
},
|
},
|
||||||
search: (query: Record<string, string>) => ({
|
search: (query) => ({
|
||||||
...query,
|
...query,
|
||||||
secretPath
|
secretPath
|
||||||
})
|
})
|
||||||
|
|||||||
+8
-2
@@ -1,7 +1,7 @@
|
|||||||
import { Link } from "@tanstack/react-router";
|
import { Link } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { EmptyState } from "@app/components/v2";
|
import { EmptyState } from "@app/components/v2";
|
||||||
import { useProject, useSubscription } from "@app/context";
|
import { useOrganization, useProject, useSubscription } from "@app/context";
|
||||||
import { EventType } from "@app/hooks/api/auditLogs/enums";
|
import { EventType } from "@app/hooks/api/auditLogs/enums";
|
||||||
import { TIntegrationWithEnv } from "@app/hooks/api/integrations/types";
|
import { TIntegrationWithEnv } from "@app/hooks/api/integrations/types";
|
||||||
import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";
|
import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";
|
||||||
@@ -15,6 +15,7 @@ type Props = {
|
|||||||
|
|
||||||
export const IntegrationAuditLogsSection = ({ integration }: Props) => {
|
export const IntegrationAuditLogsSection = ({ integration }: Props) => {
|
||||||
const { subscription } = useSubscription();
|
const { subscription } = useSubscription();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;
|
const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;
|
||||||
@@ -53,7 +54,12 @@ export const IntegrationAuditLogsSection = ({ integration }: Props) => {
|
|||||||
<p>
|
<p>
|
||||||
Please{" "}
|
Please{" "}
|
||||||
{subscription && subscription.slug !== null ? (
|
{subscription && subscription.slug !== null ? (
|
||||||
<Link to="/organization/billing" target="_blank" rel="noopener noreferrer">
|
<Link
|
||||||
|
to="/organizations/$orgId/billing"
|
||||||
|
params={{ orgId: currentOrg.id }}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
className="cursor-pointer font-medium text-primary-500 transition-all hover:text-primary-600"
|
className="cursor-pointer font-medium text-primary-500 transition-all hover:text-primary-600"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -5,7 +5,12 @@ import { useNavigate, useSearch } from "@tanstack/react-router";
|
|||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
|
import {
|
||||||
|
ProjectPermissionActions,
|
||||||
|
ProjectPermissionSub,
|
||||||
|
useOrganization,
|
||||||
|
useProject
|
||||||
|
} from "@app/context";
|
||||||
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { ProjectType } from "@app/hooks/api/projects/types";
|
import { ProjectType } from "@app/hooks/api/projects/types";
|
||||||
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
@@ -19,6 +24,7 @@ import {
|
|||||||
|
|
||||||
export const IntegrationsListPage = () => {
|
export const IntegrationsListPage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
@@ -33,7 +39,8 @@ export const IntegrationsListPage = () => {
|
|||||||
selectedTab: tab as IntegrationsListPageTabs
|
selectedTab: tab as IntegrationsListPageTabs
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
+3
@@ -24,6 +24,7 @@ import { ROUTE_PATHS } from "@app/const/routes";
|
|||||||
import {
|
import {
|
||||||
ProjectPermissionActions,
|
ProjectPermissionActions,
|
||||||
ProjectPermissionSub,
|
ProjectPermissionSub,
|
||||||
|
useOrganization,
|
||||||
useProject,
|
useProject,
|
||||||
useProjectPermission
|
useProjectPermission
|
||||||
} from "@app/context";
|
} from "@app/context";
|
||||||
@@ -60,6 +61,7 @@ export const CloudIntegrationSection = ({
|
|||||||
"deleteConfirmation"
|
"deleteConfirmation"
|
||||||
] as const);
|
] as const);
|
||||||
const { permission } = useProjectPermission();
|
const { permission } = useProjectPermission();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
@@ -138,6 +140,7 @@ export const CloudIntegrationSection = ({
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
|
|||||||
+4
-2
@@ -40,7 +40,7 @@ import {
|
|||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { Badge } from "@app/components/v3";
|
import { Badge } from "@app/components/v3";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionSub, useOrganization } from "@app/context";
|
||||||
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
|
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
|
||||||
import { useToggle } from "@app/hooks";
|
import { useToggle } from "@app/hooks";
|
||||||
@@ -81,6 +81,7 @@ export const SecretSyncRow = ({
|
|||||||
projectId
|
projectId
|
||||||
} = secretSync;
|
} = secretSync;
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { syncOption } = useSecretSyncOption(destination);
|
const { syncOption } = useSecretSyncOption(destination);
|
||||||
|
|
||||||
const destinationName = SECRET_SYNC_MAP[destination].name;
|
const destinationName = SECRET_SYNC_MAP[destination].name;
|
||||||
@@ -134,7 +135,8 @@ export const SecretSyncRow = ({
|
|||||||
params: {
|
params: {
|
||||||
syncId: id,
|
syncId: id,
|
||||||
destination,
|
destination,
|
||||||
projectId
|
projectId,
|
||||||
|
orgId: currentOrg.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -9,7 +9,7 @@ import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";
|
|||||||
import { Button, Spinner } from "@app/components/v2";
|
import { Button, Spinner } from "@app/components/v2";
|
||||||
import { DocumentationLinkBadge } from "@app/components/v3";
|
import { DocumentationLinkBadge } from "@app/components/v3";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub, useProject } from "@app/context";
|
import { ProjectPermissionSub, useOrganization, useProject } from "@app/context";
|
||||||
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
import { useListSecretSyncs } from "@app/hooks/api/secretSyncs";
|
import { useListSecretSyncs } from "@app/hooks/api/secretSyncs";
|
||||||
@@ -26,6 +26,7 @@ export const SecretSyncsTab = () => {
|
|||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -35,7 +36,8 @@ export const SecretSyncsTab = () => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
},
|
},
|
||||||
search
|
search
|
||||||
});
|
});
|
||||||
@@ -66,6 +68,7 @@ export const SecretSyncsTab = () => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
},
|
},
|
||||||
search
|
search
|
||||||
|
|||||||
+4
-1
@@ -24,6 +24,7 @@ import { ROUTE_PATHS } from "@app/const/routes";
|
|||||||
import {
|
import {
|
||||||
ProjectPermissionActions,
|
ProjectPermissionActions,
|
||||||
ProjectPermissionSub,
|
ProjectPermissionSub,
|
||||||
|
useOrganization,
|
||||||
useProject,
|
useProject,
|
||||||
useSubscription
|
useSubscription
|
||||||
} from "@app/context";
|
} from "@app/context";
|
||||||
@@ -45,6 +46,7 @@ type Props = {
|
|||||||
const TABS_TO_SHOW = 5;
|
const TABS_TO_SHOW = 5;
|
||||||
|
|
||||||
export const EnvironmentTabs = ({ secretPath }: Props) => {
|
export const EnvironmentTabs = ({ secretPath }: Props) => {
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const currentEnv = useParams({
|
const currentEnv = useParams({
|
||||||
from: ROUTE_PATHS.SecretManager.SecretDashboardPage.id,
|
from: ROUTE_PATHS.SecretManager.SecretDashboardPage.id,
|
||||||
@@ -96,7 +98,8 @@ export const EnvironmentTabs = ({ secretPath }: Props) => {
|
|||||||
to: ROUTE_PATHS.SecretManager.SecretDashboardPage.path,
|
to: ROUTE_PATHS.SecretManager.SecretDashboardPage.path,
|
||||||
params: {
|
params: {
|
||||||
envSlug,
|
envSlug,
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id,
|
||||||
|
orgId: currentOrg.id
|
||||||
},
|
},
|
||||||
search: (prev) => prev
|
search: (prev) => prev
|
||||||
});
|
});
|
||||||
|
|||||||
+5
-1
@@ -46,6 +46,7 @@ import { InfisicalSecretInput } from "@app/components/v2/InfisicalSecretInput";
|
|||||||
import {
|
import {
|
||||||
ProjectPermissionActions,
|
ProjectPermissionActions,
|
||||||
ProjectPermissionSub,
|
ProjectPermissionSub,
|
||||||
|
useOrganization,
|
||||||
useProject,
|
useProject,
|
||||||
useProjectPermission,
|
useProjectPermission,
|
||||||
useSubscription
|
useSubscription
|
||||||
@@ -98,6 +99,7 @@ export const SecretDetailSidebar = ({
|
|||||||
secretPath,
|
secretPath,
|
||||||
handleSecretShare
|
handleSecretShare
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const [isFieldFocused, setIsFieldFocused] = useToggle();
|
const [isFieldFocused, setIsFieldFocused] = useToggle();
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
@@ -776,6 +778,7 @@ export const SecretDetailSidebar = ({
|
|||||||
`${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const
|
`${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const
|
||||||
}
|
}
|
||||||
params={{
|
params={{
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: currentProject.id,
|
projectId: currentProject.id,
|
||||||
identityId: identity.id
|
identityId: identity.id
|
||||||
}}
|
}}
|
||||||
@@ -806,8 +809,9 @@ export const SecretDetailSidebar = ({
|
|||||||
className="z-100"
|
className="z-100"
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
to={"/organization/groups/$groupId" as const}
|
to={"/organizations/$orgId/groups/$groupId" as const}
|
||||||
params={{
|
params={{
|
||||||
|
orgId: currentOrg.id,
|
||||||
groupId: group.id
|
groupId: group.id
|
||||||
}}
|
}}
|
||||||
className="text-secondary/80 rounded-md border border-mineshaft-600 bg-mineshaft-700 px-1 py-0.5 text-sm hover:text-mineshaft-100"
|
className="text-secondary/80 rounded-md border border-mineshaft-600 bg-mineshaft-700 px-1 py-0.5 text-sm hover:text-mineshaft-100"
|
||||||
|
|||||||
+2
-1
@@ -26,7 +26,7 @@ import {
|
|||||||
|
|
||||||
const PageContent = () => {
|
const PageContent = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { destination, syncId, projectId } = useParams({
|
const { destination, syncId, projectId, orgId } = useParams({
|
||||||
from: ROUTE_PATHS.SecretManager.SecretSyncDetailsByIDPage.id,
|
from: ROUTE_PATHS.SecretManager.SecretSyncDetailsByIDPage.id,
|
||||||
select: (params) => ({
|
select: (params) => ({
|
||||||
...params,
|
...params,
|
||||||
@@ -82,6 +82,7 @@ const PageContent = () => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
|
orgId,
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
|
|||||||
+3
-1
@@ -36,7 +36,7 @@ import {
|
|||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { Badge } from "@app/components/v3";
|
import { Badge } from "@app/components/v3";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionSub, useOrganization } from "@app/context";
|
||||||
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
|
import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";
|
||||||
import { usePopUp, useToggle } from "@app/hooks";
|
import { usePopUp, useToggle } from "@app/hooks";
|
||||||
@@ -65,6 +65,7 @@ export const SecretSyncActionTriggers = ({ secretSync }: Props) => {
|
|||||||
const updateSync = useUpdateSecretSync();
|
const updateSync = useUpdateSecretSync();
|
||||||
|
|
||||||
const { destination, environment, folder } = secretSync;
|
const { destination, environment, folder } = secretSync;
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
|
|
||||||
const destinationName = SECRET_SYNC_MAP[destination].name;
|
const destinationName = SECRET_SYNC_MAP[destination].name;
|
||||||
const { syncOption } = useSecretSyncOption(destination);
|
const { syncOption } = useSecretSyncOption(destination);
|
||||||
@@ -291,6 +292,7 @@ export const SecretSyncActionTriggers = ({ secretSync }: Props) => {
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
projectId: secretSync.projectId
|
projectId: secretSync.projectId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
|
|||||||
+8
-2
@@ -2,7 +2,7 @@ import { faFingerprint } from "@fortawesome/free-solid-svg-icons";
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link } from "@tanstack/react-router";
|
import { Link } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { useProject, useSubscription } from "@app/context";
|
import { useOrganization, useProject, useSubscription } from "@app/context";
|
||||||
import { EventType } from "@app/hooks/api/auditLogs/enums";
|
import { EventType } from "@app/hooks/api/auditLogs/enums";
|
||||||
import { TSecretSync } from "@app/hooks/api/secretSyncs";
|
import { TSecretSync } from "@app/hooks/api/secretSyncs";
|
||||||
import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";
|
import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";
|
||||||
@@ -19,6 +19,7 @@ type Props = {
|
|||||||
|
|
||||||
export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {
|
export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {
|
||||||
const { subscription } = useSubscription();
|
const { subscription } = useSubscription();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;
|
const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;
|
||||||
@@ -53,7 +54,12 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {
|
|||||||
<p>
|
<p>
|
||||||
Please{" "}
|
Please{" "}
|
||||||
{subscription && subscription.slug !== null ? (
|
{subscription && subscription.slug !== null ? (
|
||||||
<Link to="/organization/billing" target="_blank" rel="noopener noreferrer">
|
<Link
|
||||||
|
to="/organizations/$orgId/billing"
|
||||||
|
params={{ orgId: currentOrg.id }}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
className="cursor-pointer underline transition-all hover:text-white"
|
className="cursor-pointer underline transition-all hover:text-white"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
+19
-6
@@ -2,7 +2,7 @@ import { useEffect } from "react";
|
|||||||
import { useNavigate, useSearch } from "@tanstack/react-router";
|
import { useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { useProject } from "@app/context";
|
import { useOrganization, useProject } from "@app/context";
|
||||||
import { useCreateAppConnection, useUpdateAppConnection } from "@app/hooks/api/appConnections";
|
import { useCreateAppConnection, useUpdateAppConnection } from "@app/hooks/api/appConnections";
|
||||||
import { GitLabConnectionMethod } from "@app/hooks/api/appConnections/types/gitlab-connection";
|
import { GitLabConnectionMethod } from "@app/hooks/api/appConnections/types/gitlab-connection";
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@ export const GitLabOAuthCallbackPage = () => {
|
|||||||
const { code, state } = useSearch({
|
const { code, state } = useSearch({
|
||||||
from: ROUTE_PATHS.SecretManager.Integratons.GitlabOauthCallbackPage.id
|
from: ROUTE_PATHS.SecretManager.Integratons.GitlabOauthCallbackPage.id
|
||||||
});
|
});
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -25,7 +26,8 @@ export const GitLabOAuthCallbackPage = () => {
|
|||||||
if (csrfToken !== storedState) {
|
if (csrfToken !== storedState) {
|
||||||
console.error("CSRF token mismatch");
|
console.error("CSRF token mismatch");
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: { error: "invalid_state" }
|
search: { error: "invalid_state" }
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -37,7 +39,8 @@ export const GitLabOAuthCallbackPage = () => {
|
|||||||
if (!storedFormData) {
|
if (!storedFormData) {
|
||||||
console.error("No stored form data found");
|
console.error("No stored form data found");
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: { error: "missing_form_data" }
|
search: { error: "missing_form_data" }
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -73,7 +76,8 @@ export const GitLabOAuthCallbackPage = () => {
|
|||||||
// Navigate to success page or app connections list
|
// Navigate to success page or app connections list
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: {
|
search: {
|
||||||
success: formData.isUpdate ? "connection_updated" : "connection_created",
|
success: formData.isUpdate ? "connection_updated" : "connection_created",
|
||||||
connectionId: appConnection.id
|
connectionId: appConnection.id
|
||||||
@@ -82,12 +86,21 @@ export const GitLabOAuthCallbackPage = () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error handling GitLab OAuth callback:", err);
|
console.error("Error handling GitLab OAuth callback:", err);
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: { error: "connection_failed" }
|
search: { error: "connection_failed" }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
}, [code, state, navigate, createAppConnection, updateAppConnection, currentProject.id]);
|
}, [
|
||||||
|
code,
|
||||||
|
state,
|
||||||
|
navigate,
|
||||||
|
createAppConnection,
|
||||||
|
updateAppConnection,
|
||||||
|
currentProject.id,
|
||||||
|
currentOrg.id
|
||||||
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen items-center justify-center">
|
<div className="flex h-screen items-center justify-center">
|
||||||
|
|||||||
+10
-6
@@ -2,7 +2,7 @@ import { useEffect } from "react";
|
|||||||
import { useNavigate, useSearch } from "@tanstack/react-router";
|
import { useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { useProject } from "@app/context";
|
import { useOrganization, useProject } from "@app/context";
|
||||||
import { useCreateAppConnection, useUpdateAppConnection } from "@app/hooks/api/appConnections";
|
import { useCreateAppConnection, useUpdateAppConnection } from "@app/hooks/api/appConnections";
|
||||||
import { HerokuConnectionMethod } from "@app/hooks/api/appConnections/types/heroku-connection";
|
import { HerokuConnectionMethod } from "@app/hooks/api/appConnections/types/heroku-connection";
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ export const HerokuOAuthCallbackPage = () => {
|
|||||||
const { code, state } = useSearch({
|
const { code, state } = useSearch({
|
||||||
from: ROUTE_PATHS.SecretManager.Integratons.HerokuOauthCallbackPage.id
|
from: ROUTE_PATHS.SecretManager.Integratons.HerokuOauthCallbackPage.id
|
||||||
});
|
});
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -25,7 +25,8 @@ export const HerokuOAuthCallbackPage = () => {
|
|||||||
if (state !== storedState) {
|
if (state !== storedState) {
|
||||||
console.error("CSRF token mismatch");
|
console.error("CSRF token mismatch");
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: { error: "invalid_state" }
|
search: { error: "invalid_state" }
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -39,7 +40,8 @@ export const HerokuOAuthCallbackPage = () => {
|
|||||||
if (!storedFormData) {
|
if (!storedFormData) {
|
||||||
console.error("No stored form data found");
|
console.error("No stored form data found");
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: { error: "missing_form_data" }
|
search: { error: "missing_form_data" }
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -74,7 +76,8 @@ export const HerokuOAuthCallbackPage = () => {
|
|||||||
|
|
||||||
// Navigate to success page or app connections list
|
// Navigate to success page or app connections list
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: {
|
search: {
|
||||||
success: formData.isUpdate ? "connection_updated" : "connection_created",
|
success: formData.isUpdate ? "connection_updated" : "connection_created",
|
||||||
connectionId: appConnection.id
|
connectionId: appConnection.id
|
||||||
@@ -83,7 +86,8 @@ export const HerokuOAuthCallbackPage = () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error handling Heroku OAuth callback:", err);
|
console.error("Error handling Heroku OAuth callback:", err);
|
||||||
navigate({
|
navigate({
|
||||||
to: "/organization/app-connections",
|
to: "/organizations/$orgId/app-connections",
|
||||||
|
params: { orgId: currentOrg.id },
|
||||||
search: { error: "connection_failed" }
|
search: { error: "connection_failed" }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -102,6 +102,7 @@ export const SecretScanningDataSourceRow = ({
|
|||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.SecretScanning.DataSourceByIdPage.path,
|
to: ROUTE_PATHS.SecretScanning.DataSourceByIdPage.path,
|
||||||
params: {
|
params: {
|
||||||
|
orgId: currentOrg.id,
|
||||||
dataSourceId: id,
|
dataSourceId: id,
|
||||||
type,
|
type,
|
||||||
projectId
|
projectId
|
||||||
|
|||||||
Reference in New Issue
Block a user