mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 21:27:10 +00:00
Fix: Change org ID to org slug
This commit is contained in:
@@ -226,7 +226,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
project: { id: newProjectId }
|
project: { id: newProjectId }
|
||||||
}
|
}
|
||||||
} = await createWs.mutateAsync({
|
} = await createWs.mutateAsync({
|
||||||
organizationId: currentOrg.id,
|
organizationSlug: currentOrg.slug,
|
||||||
projectName: name
|
projectName: name
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
OrgPermissionActions,
|
OrgPermissionActions,
|
||||||
OrgPermissionSubjects,
|
OrgPermissionSubjects,
|
||||||
|
useOrganization,
|
||||||
useSubscription,
|
useSubscription,
|
||||||
useUser,
|
useUser,
|
||||||
useWorkspace
|
useWorkspace
|
||||||
@@ -468,8 +469,9 @@ const OrganizationPage = withPermission(
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { workspaces, isLoading: isWorkspaceLoading } = useWorkspace();
|
const { workspaces, isLoading: isWorkspaceLoading } = useWorkspace();
|
||||||
const currentOrg = String(router.query.id);
|
const { currentOrg } = useOrganization();
|
||||||
const orgWorkspaces = workspaces?.filter((workspace) => workspace.orgId === currentOrg) || [];
|
const routerOrgId = String(router.query.id);
|
||||||
|
const orgWorkspaces = workspaces?.filter((workspace) => workspace.orgId === routerOrgId) || [];
|
||||||
const { createNotification } = useNotificationContext();
|
const { createNotification } = useNotificationContext();
|
||||||
const addUsersToProject = useAddUserToWsNonE2EE();
|
const addUsersToProject = useAddUserToWsNonE2EE();
|
||||||
|
|
||||||
@@ -505,12 +507,12 @@ const OrganizationPage = withPermission(
|
|||||||
project: { id: newProjectId }
|
project: { id: newProjectId }
|
||||||
}
|
}
|
||||||
} = await createWs.mutateAsync({
|
} = await createWs.mutateAsync({
|
||||||
organizationId: currentOrg,
|
organizationSlug: currentOrg.slug,
|
||||||
projectName: name
|
projectName: name
|
||||||
});
|
});
|
||||||
|
|
||||||
if (addMembers) {
|
if (addMembers) {
|
||||||
const orgUsers = await fetchOrgUsers(currentOrg);
|
const orgUsers = await fetchOrgUsers(currentOrg.id);
|
||||||
|
|
||||||
await addUsersToProject.mutateAsync({
|
await addUsersToProject.mutateAsync({
|
||||||
usernames: orgUsers
|
usernames: orgUsers
|
||||||
@@ -540,7 +542,7 @@ const OrganizationPage = withPermission(
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onboardingCheck({
|
onboardingCheck({
|
||||||
orgId: currentOrg,
|
orgId: routerOrgId,
|
||||||
setHasUserClickedIntro,
|
setHasUserClickedIntro,
|
||||||
setHasUserClickedSlack,
|
setHasUserClickedSlack,
|
||||||
setHasUserPushedSecrets,
|
setHasUserPushedSecrets,
|
||||||
|
|||||||
Reference in New Issue
Block a user