mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-13 06:29:25 +00:00
feat: rebase conflict issue
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { useCallback } from "react";
|
||||
import { createMongoAbility, MongoAbility, RawRuleOf } from "@casl/ability";
|
||||
import { unpackRules } from "@casl/ability/extra";
|
||||
import { useSuspenseQuery } from "@tanstack/react-query";
|
||||
@@ -10,7 +11,6 @@ import {
|
||||
} from "@app/hooks/api/roles/queries";
|
||||
|
||||
import { OrgPermissionSet } from "./types";
|
||||
import { useCallback } from "react";
|
||||
|
||||
export const useOrgPermission = () => {
|
||||
const organizationId = useRouteContext({
|
||||
|
||||
@@ -99,7 +99,7 @@ export const useGetOrgRole = (orgId: string, roleId: string) =>
|
||||
}>(`/api/v1/organization/${orgId}/roles/${roleId}`);
|
||||
return {
|
||||
...data.role,
|
||||
permissions: data.role.permissions as PackRule<TPermission>[]
|
||||
permissions: data.role.permissions as TPermission[]
|
||||
};
|
||||
},
|
||||
enabled: Boolean(orgId && roleId)
|
||||
|
||||
@@ -8,7 +8,6 @@ import { queryClient as qc } from "@app/hooks/api/reactQuery";
|
||||
import { APIKeyDataV2 } from "../apiKeys/types";
|
||||
import { MfaMethod } from "../auth/types";
|
||||
import { TGroupWithProjectMemberships } from "../groups/types";
|
||||
import { projectKeys } from "../projects";
|
||||
import { setAuthToken } from "../reactQuery";
|
||||
import { subscriptionQueryKeys } from "../subscriptions/queries";
|
||||
import { userKeys } from "./query-keys";
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ import { z } from "zod";
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { Button, Checkbox, Modal, ModalContent, Tooltip } from "@app/components/v2";
|
||||
import { useOrgPermission } from "@app/context";
|
||||
import { useUpgradePrivilegeSystem } from "@app/hooks/api";
|
||||
import { OrgMembershipRole } from "@app/helpers/roles";
|
||||
import { useUpgradePrivilegeSystem } from "@app/hooks/api";
|
||||
|
||||
const formSchema = z.object({
|
||||
isProjectPrivilegesUpdated: z.literal(true),
|
||||
@@ -275,7 +275,7 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
|
||||
<Tooltip
|
||||
content={
|
||||
!isAdmin
|
||||
? `You cannot perform this upgrade because you are not an organization admin.`
|
||||
? "You cannot perform this upgrade because you are not an organization admin."
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
|
||||
+1
-1
@@ -3,10 +3,10 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
|
||||
import { Button } from "@app/components/v2";
|
||||
import { useOrgPermission } from "@app/context";
|
||||
import { OrgMembershipRole } from "@app/helpers/roles";
|
||||
import { usePopUp } from "@app/hooks";
|
||||
|
||||
import { SelectImportFromPlatformModal } from "./components/SelectImportFromPlatformModal";
|
||||
import { OrgMembershipRole } from "@app/helpers/roles";
|
||||
|
||||
export const ExternalMigrationsTab = () => {
|
||||
const { hasOrgRole } = useOrgPermission();
|
||||
|
||||
+1
-1
@@ -3,10 +3,10 @@ import { useNavigate } from "@tanstack/react-router";
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { Button, DeleteActionModal } from "@app/components/v2";
|
||||
import { useOrganization, useOrgPermission } from "@app/context";
|
||||
import { OrgMembershipRole } from "@app/helpers/roles";
|
||||
import { useDeleteOrgById } from "@app/hooks/api";
|
||||
import { clearSession } from "@app/hooks/api/users/queries";
|
||||
import { usePopUp } from "@app/hooks/usePopUp";
|
||||
import { OrgMembershipRole } from "@app/helpers/roles";
|
||||
|
||||
export const OrgDeleteSection = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
+1
-1
@@ -1,9 +1,9 @@
|
||||
import { useOrgPermission } from "@app/context";
|
||||
import { OrgMembershipRole } from "@app/helpers/roles";
|
||||
|
||||
import { OrgDeleteSection } from "../OrgDeleteSection";
|
||||
import { OrgIncidentContactsSection } from "../OrgIncidentContactsSection";
|
||||
import { OrgNameChangeSection } from "../OrgNameChangeSection";
|
||||
import { OrgMembershipRole } from "@app/helpers/roles";
|
||||
|
||||
export const OrgGeneralTab = () => {
|
||||
const { hasOrgRole } = useOrgPermission();
|
||||
|
||||
Reference in New Issue
Block a user