Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Merge branch 'main' into daniel/remove-custom-roles-alert-banner
varonix89af95eae09f
diff --cc frontend/src/pages/organization/RoleByIDPage/components/DuplicateOrgRoleModal.tsxindex 31c9fcdb81,f26d653f28..4fbd7e6dec--- a/frontend/src/pages/organization/RoleByIDPage/components/DuplicateOrgRoleModal.tsx+++ b/frontend/src/pages/organization/RoleByIDPage/components/DuplicateOrgRoleModal.tsx@@@ -156,9 -163,11 +163,10 @@@ const Content = ({ role, onClose }: Con</DialogFooter></form><UpgradePlanModal+ paywallKey="organization.duplicate-org-role"isOpen={upgradePlanPopUp.upgradePlan.isOpen}onOpenChange={(isOpen) => handleUpgradePlanPopUpToggle("upgradePlan", isOpen)}- text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Enterprise plan."- isEnterpriseFeature+ text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Advanced plan."/></>);diff --cc frontend/src/pages/organization/RoleByIDPage/components/RoleModal.tsxindex 8a0f24d205,f91a517061..c0513bfc9e--- a/frontend/src/pages/organization/RoleByIDPage/components/RoleModal.tsx+++ b/frontend/src/pages/organization/RoleByIDPage/components/RoleModal.tsx@@@ -219,9 -221,11 +221,10 @@@ export const RoleModal = ({ popUp, hand</DialogContent></Dialog><UpgradePlanModal+ paywallKey="organization.role"isOpen={upgradePlanPopUp.upgradePlan.isOpen}onOpenChange={(isOpen) => handleUpgradePlanPopUpToggle("upgradePlan", isOpen)}- text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Enterprise plan."- isEnterpriseFeature+ text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Advanced plan."/></>);diff --cc frontend/src/pages/project/AccessControlPage/components/ProjectRoleListTab/components/ProjectRoleList/ProjectRoleList.tsxindex 9e9de4e6d6,24c28b2d68..5752ef8f8c--- a/frontend/src/pages/project/AccessControlPage/components/ProjectRoleListTab/components/ProjectRoleList/ProjectRoleList.tsx+++ b/frontend/src/pages/project/AccessControlPage/components/ProjectRoleListTab/components/ProjectRoleList/ProjectRoleList.tsx@@@ -16,8 -17,10 +16,7 @@@ import { twMerge } from "tailwind-mergeimport { createNotification } from "@app/components/notifications";import { ProjectPermissionCan } from "@app/components/permissions";- import { DeleteActionModal } from "@app/components/v2";import {- Alert,- AlertDescription,- AlertTitle,Badge,Button,Card,@@@ -46,9 -49,15 +45,10 @@@TableCell,TableHead,TableHeader,- TableRow+ TableRow,+ type TableSortDirection} from "@app/components/v3";-import {- ProjectPermissionActions,- ProjectPermissionSub,- useProject,- useSubscription-} from "@app/context";+import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";import { getProjectBaseURL } from "@app/helpers/project";import { isCustomProjectRole } from "@app/helpers/roles";import {@@@ -61,6 -70,8 +61,7 @@@ import { useDeleteProjectRole, useGetPrimport { OrderByDirection } from "@app/hooks/api/generic/types";import { ProjectType } from "@app/hooks/api/projects/types";import { ProjectMembershipRole, TProjectRole } from "@app/hooks/api/roles/types";-import { SubscriptionPlanTypes } from "@app/hooks/api/subscriptions/types";+ import { DeleteProjectRoleDialog } from "@app/pages/project/RoleDetailsBySlugPage/components/DeleteProjectRoleDialog";import { DuplicateProjectRoleModal } from "@app/pages/project/RoleDetailsBySlugPage/components/DuplicateProjectRoleModal";import { RoleModal } from "@app/pages/project/RoleDetailsBySlugPage/components/RoleModal";@@@ -86,10 -102,11 +92,10 @@@ export const ProjectRoleList = () =>currentProject?.type);- const { mutateAsync: deleteRole } = useDeleteProjectRole();+ const { mutateAsync: deleteRole, isPending: isDeletingRole } = useDeleteProjectRole();- const { subscription } = useSubscription();const handleRoleDelete = async () => {- const { id } = popUp?.deleteRole?.data as TProjectRole;+ const { id, name } = popUp?.deleteRole?.data as TProjectRole;await deleteRole({projectId,projectType: currentProject?.type,@@@ -159,20 -180,55 +169,8 @@@setPage});- const handleSort = (column: RolesOrderBy) => {- if (column === orderBy) {- toggleOrderDirection();- return;- }-- setOrderBy(column);- setOrderDirection(OrderByDirection.ASC);- };- const isProPlan =- Boolean(subscription) &&- subscription.rbac &&- [SubscriptionPlanTypes.Pro, SubscriptionPlanTypes.ProAnnual].includes(subscription.slug);--- const filteredRolesPage = filteredRoles.slice(offset, perPage * page);- const hasCustomRoles = roles?.some((role) => isCustomProjectRole(role.slug));--return (<>- {/* TODO(custom-roles): Remove this banner after 2026-06-01 when custom roles are removed from Pro plan */}- {isProPlan && hasCustomRoles && (- <Alert variant="warning" className="mb-4">- <TriangleAlertIcon />- <AlertTitle>Custom roles are moving to Enterprise plans</AlertTitle>- <AlertDescription>- <div>- Custom roles are part of the Infisical Enterprise plan, but were temporarily available- to Pro users. Creation of new roles will be enforced starting June 1, 2026.- <br />- {currentProject.isLegacyAdditionalPrivilegesEnabled ? (- <>- You can use{" "}- <a- href="https://infisical.com/docs/documentation/platform/access-controls/additional-privileges"- target="_blank"- rel="noopener noreferrer"- className="underline underline-offset-2"- >- additional privileges- </a>{" "}- as an alternative, or{" "}- </>- ) : (- <>You can </>- )}- <a- href="https://infisical.com/scheduledemo"- target="_blank"- rel="noopener noreferrer"- className="underline underline-offset-2"- >- contact sales- </a>{" "}- to upgrade and retain access to custom roles.- </div>- </AlertDescription>- </Alert>- )}-<Card><CardHeader><CardTitle>diff --cc frontend/src/pages/project/RoleDetailsBySlugPage/components/DuplicateProjectRoleModal.tsxindex b9cbb94287,13c80b9933..7287a64e29--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/DuplicateProjectRoleModal.tsx+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/DuplicateProjectRoleModal.tsx@@@ -108,66 -112,99 +112,98 @@@ const Content = ({ role, onClose }: Conreturn (<>- <form onSubmit={handleSubmit(handleDuplicateRole)}>- <Controller- control={control}- defaultValue=""- name="name"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Name"- isError={Boolean(error)}- errorText={error?.message}- isRequired- >- <Input {...field} placeholder="Billing Team" />- </FormControl>- )}- />- <Controller- control={control}- defaultValue=""- name="slug"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Slug"- isError={Boolean(error)}- errorText={error?.message}- isRequired- >- <Input {...field} placeholder="billing" />- </FormControl>- )}- />- <Controller- control={control}- defaultValue=""- name="description"- render={({ field, fieldState: { error } }) => (- <FormControl label="Description" isError={Boolean(error)} errorText={error?.message}>- <Input {...field} placeholder="To manage billing" />- </FormControl>- )}- />- <div className="flex items-center">- <Button- className="mr-4"- size="sm"- type="submit"- isLoading={isSubmitting}- isDisabled={isSubmitting}- >+ <form+ onSubmit={handleSubmit(handleDuplicateRole)}+ autoComplete="off"+ className="flex min-h-0 flex-1 flex-col"+ >+ <SheetHeader>+ <SheetTitle>Duplicate Role</SheetTitle>+ <SheetDescription>+ Create a new role with the same permissions as {role.name}.+ </SheetDescription>+ </SheetHeader>+ <div className="flex min-h-0 thin-scrollbar flex-1 flex-col overflow-y-auto p-4">+ <FieldGroup>+ <Controller+ control={control}+ name="name"+ render={({ field: { onChange, ...field }, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="duplicate-project-role-name">Name</FieldLabel>+ <Input+ {...field}+ id="duplicate-project-role-name"+ placeholder="Billing Team"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ onChange={(e) => {+ onChange(e);+ setValue("slug", slugify(e.target.value, { lowercase: true }), {+ shouldValidate: true+ });+ }}+ name="duplicate-project-role-name"+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ <Controller+ control={control}+ name="slug"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="duplicate-project-role-slug">Slug</FieldLabel>+ <Input+ {...field}+ id="duplicate-project-role-slug"+ placeholder="billing"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ <Controller+ control={control}+ name="description"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="duplicate-project-role-description">Description</FieldLabel>+ <Input+ {...field}+ id="duplicate-project-role-description"+ placeholder="Manage billing settings"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ </FieldGroup>+ </div>+ <SheetFooter className="border-t">+ <SheetClose asChild>+ <Button variant="ghost" isDisabled={isSubmitting}>+ Cancel+ </Button>+ </SheetClose>+ <Button type="submit" variant="project" isPending={isSubmitting}>Duplicate Role</Button>- <Button colorSchema="secondary" variant="plain" onClick={onClose}>- Cancel- </Button>- </div>+ </SheetFooter></form><UpgradePlanModal+ paywallKey="project.duplicate-project-role"isOpen={upgradePlanPopUp.upgradePlan.isOpen}- onOpenChange={(isOpen) => handleUpgradePlanPopUpToggle("upgradePlan", isOpen)}+ onOpenChange={(open) => handleUpgradePlanPopUpToggle("upgradePlan", open)}- text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Enterprise plan."- isEnterpriseFeature+ text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Advanced plan."/></>);diff --cc frontend/src/pages/project/RoleDetailsBySlugPage/components/EditProjectRoleDialog.tsxindex 0000000000,226b5021b4..3545968a58mode 000000,100644..100644--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/EditProjectRoleDialog.tsx+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/EditProjectRoleDialog.tsx@@@ -1,0 -1,220 +1,219 @@@+ import { useEffect } from "react";+ import { Controller, useForm } from "react-hook-form";+ import { zodResolver } from "@hookform/resolvers/zod";+ import { useNavigate } from "@tanstack/react-router";+ import { z } from "zod";++ import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";+ import { createNotification } from "@app/components/notifications";+ import {+ Button,+ Field,+ FieldError,+ FieldGroup,+ FieldLabel,+ Input,+ Sheet,+ SheetClose,+ SheetContent,+ SheetDescription,+ SheetFooter,+ SheetHeader,+ SheetTitle+ } from "@app/components/v3";+ import { useOrganization, useProject, useSubscription } from "@app/context";+ import { getProjectBaseURL } from "@app/helpers/project";+ import { usePopUp } from "@app/hooks";+ import { useUpdateProjectRole } from "@app/hooks/api";+ import { TProjectRole } from "@app/hooks/api/roles/types";+ import { slugSchema } from "@app/lib/schemas";++ const schema = z+ .object({+ name: z.string().min(1, "Name required"),+ description: z.string(),+ slug: slugSchema({ min: 1 })+ })+ .required();++ type FormData = z.infer<typeof schema>;++ type Props = {+ isOpen: boolean;+ role?: TProjectRole;+ onOpenChange: (isOpen: boolean) => void;+ };++ export const EditProjectRoleDialog = ({ isOpen, role, onOpenChange }: Props) => {+ const navigate = useNavigate();+ const { currentOrg } = useOrganization();+ const { currentProject } = useProject();+ const { subscription } = useSubscription();+ const { mutateAsync: updateProjectRole } = useUpdateProjectRole();+ const {+ popUp: upgradePlanPopUp,+ handlePopUpOpen: handleUpgradePlanPopUpOpen,+ handlePopUpToggle: handleUpgradePlanPopUpToggle+ } = usePopUp(["upgradePlan"] as const);++ const {+ control,+ handleSubmit,+ reset,+ formState: { isSubmitting }+ } = useForm<FormData>({+ resolver: zodResolver(schema),+ defaultValues: {+ name: "",+ description: "",+ slug: ""+ }+ });++ useEffect(() => {+ if (!role) return;+ reset({+ name: role.name,+ description: role.description || "",+ slug: role.slug+ });+ }, [role, reset]);++ const onSubmit = async ({ name, description, slug }: FormData) => {+ if (!currentProject?.id || !role) return;++ if (subscription && !subscription.rbac) {+ handleUpgradePlanPopUpOpen("upgradePlan");+ return;+ }++ await updateProjectRole({+ id: role.id,+ projectId: currentProject.id,+ // Legacy Certificate Manager custom roles use the generic project-role endpoint.+ name,+ description,+ slug+ });++ onOpenChange(false);+ navigate({+ to: `${getProjectBaseURL(currentProject.type)}/roles/$roleSlug` as const,+ params: {+ orgId: currentOrg?.id || "",+ roleSlug: slug,+ projectId: currentProject.id+ }+ });+ createNotification({+ text: `Project role "${name}" updated`,+ type: "success"+ });+ };++ return (+ <>+ <Sheet+ open={isOpen}+ onOpenChange={(open) => {+ onOpenChange(open);+ if (!open && role) {+ reset({+ name: role.name,+ description: role.description || "",+ slug: role.slug+ });+ }+ }}+ >+ <SheetContent>+ <form+ onSubmit={handleSubmit(onSubmit)}+ autoComplete="off"+ className="flex min-h-0 flex-1 flex-col"+ >+ <SheetHeader>+ <SheetTitle>Edit Role</SheetTitle>+ <SheetDescription>Update the role name, slug, and description.</SheetDescription>+ </SheetHeader>+ <div className="flex min-h-0 thin-scrollbar flex-1 flex-col overflow-y-auto p-4">+ <FieldGroup>+ <Controller+ control={control}+ name="name"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="edit-project-role-name">Name</FieldLabel>+ <Input+ {...field}+ id="edit-project-role-name"+ placeholder="Billing Team"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ name="edit-project-role-name"+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ <Controller+ control={control}+ name="slug"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="edit-project-role-slug">Slug</FieldLabel>+ <Input+ {...field}+ id="edit-project-role-slug"+ placeholder="billing"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ <Controller+ control={control}+ name="description"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="edit-project-role-description">Description</FieldLabel>+ <Input+ {...field}+ id="edit-project-role-description"+ placeholder="Manage billing settings"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ </FieldGroup>+ </div>+ <SheetFooter className="border-t">+ <SheetClose asChild>+ <Button variant="ghost" isDisabled={isSubmitting}>+ Cancel+ </Button>+ </SheetClose>+ <Button type="submit" variant="project" isPending={isSubmitting}>+ Save Changes+ </Button>+ </SheetFooter>+ </form>+ </SheetContent>+ </Sheet>+ <UpgradePlanModal+ paywallKey="project.edit-project-role-dialog"+ isOpen={upgradePlanPopUp.upgradePlan.isOpen}+ onOpenChange={(open) => handleUpgradePlanPopUpToggle("upgradePlan", open)}- text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Enterprise plan."- isEnterpriseFeature++ text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Advanced plan."+ />+ </>+ );+ };diff --cc frontend/src/pages/project/RoleDetailsBySlugPage/components/RoleModal.tsxindex e3a998fb0d,f486b5f528..8ce0385c98--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/RoleModal.tsx+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/RoleModal.tsx@@@ -145,84 -103,109 +103,108 @@@ export const RoleModal = ({ popUp, handreturn (<>- <Modal- isOpen={popUp?.role?.isOpen}- onOpenChange={(isOpen) => {- handlePopUpToggle("role", isOpen);- reset();+ <Sheet+ open={popUp.role.isOpen}+ onOpenChange={(open) => {+ handlePopUpToggle("role", open);+ if (!open) reset();}}>- <ModalContent title={`${popUp?.role?.data ? "Update" : "Create"} Role`}>- <form onSubmit={handleSubmit(onFormSubmit)}>- <Controller- control={control}- defaultValue=""- name="name"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Name"- isError={Boolean(error)}- errorText={error?.message}- isRequired- >- <Input {...field} placeholder="Billing Team" />- </FormControl>- )}- />- <Controller- control={control}- defaultValue=""- name="slug"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Slug"- isError={Boolean(error)}- errorText={error?.message}- isRequired- >- <Input {...field} placeholder="billing" />- </FormControl>- )}- />- <Controller- control={control}- defaultValue=""- name="description"- render={({ field, fieldState: { error } }) => (- <FormControl- label="Description"- isError={Boolean(error)}- errorText={error?.message}- >- <Input {...field} placeholder="To manage billing" />- </FormControl>- )}- />- <div className="flex items-center">- <Button- className="mr-4"- size="sm"- type="submit"- isLoading={isSubmitting}- isDisabled={isSubmitting}- >- {popUp?.role?.data ? "Update" : "Create"}- </Button>- <Button- colorSchema="secondary"- variant="plain"- onClick={() => handlePopUpToggle("role", false)}- >- Cancel- </Button>+ <SheetContent>+ <form+ onSubmit={handleSubmit(onFormSubmit)}+ autoComplete="off"+ className="flex min-h-0 flex-1 flex-col"+ >+ <SheetHeader>+ <SheetTitle>Create Role</SheetTitle>+ <SheetDescription>+ Create a custom project role. You can configure its permissions after creation.+ </SheetDescription>+ </SheetHeader>+ <div className="flex min-h-0 thin-scrollbar flex-1 flex-col overflow-y-auto p-4">+ <FieldGroup>+ <Controller+ control={control}+ name="name"+ render={({ field: { onChange, ...field }, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="create-project-role-name">Name</FieldLabel>+ <Input+ {...field}+ id="create-project-role-name"+ placeholder="Billing Team"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ onChange={(e) => {+ onChange(e);+ setValue("slug", slugify(e.target.value, { lowercase: true }), {+ shouldValidate: true+ });+ }}+ name="create-project-role-name"+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ <Controller+ control={control}+ name="slug"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="create-project-role-slug">Slug</FieldLabel>+ <Input+ {...field}+ id="create-project-role-slug"+ placeholder="billing"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ <Controller+ control={control}+ name="description"+ render={({ field, fieldState: { error } }) => (+ <Field data-invalid={Boolean(error)}>+ <FieldLabel htmlFor="create-project-role-description">Description</FieldLabel>+ <Input+ {...field}+ id="create-project-role-description"+ placeholder="Manage billing settings"+ autoComplete="off"+ data-1p-ignore+ isError={Boolean(error)}+ />+ <FieldError>{error?.message}</FieldError>+ </Field>+ )}+ />+ </FieldGroup></div>+ <SheetFooter className="border-t">+ <SheetClose asChild>+ <Button variant="ghost" isDisabled={isSubmitting}>+ Cancel+ </Button>+ </SheetClose>+ <Button type="submit" variant="project" isPending={isSubmitting}>+ Create Role+ </Button>+ </SheetFooter></form>- </ModalContent>- </Modal>+ </SheetContent>+ </Sheet><UpgradePlanModal+ paywallKey="project.role"isOpen={upgradePlanPopUp.upgradePlan.isOpen}- onOpenChange={(isOpen) => handleUpgradePlanPopUpToggle("upgradePlan", isOpen)}+ onOpenChange={(open) => handleUpgradePlanPopUpToggle("upgradePlan", open)}- text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Enterprise plan."- isEnterpriseFeature+ text="Your current plan does not include custom roles. To unlock this feature, please upgrade to Infisical Advanced plan."/></>);