Skip to content

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

Fix: Rebase errors

Daniel Hougaardce1ad6f32e1c
diff --git a/backend/src/ee/routes/v1/access-approval-request-router.ts b/backend/src/ee/routes/v1/access-approval-request-router.ts
index 104f32665b..4b173cfa76 100644
--- a/backend/src/ee/routes/v1/access-approval-request-router.ts
+++ b/backend/src/ee/routes/v1/access-approval-request-router.ts
@@ -2,6 +2,10 @@ import { z } from "zod";
import { AccessApprovalRequestsReviewersSchema, AccessApprovalRequestsSchema } from "@app/db/schemas";
import { ApprovalStatus } from "@app/ee/services/access-approval-request/access-approval-request-types";
+import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
+import { AuthMode } from "@app/services/auth/auth-type";
+
+export const registerAccessApprovalRequestRouter = async (server: FastifyZodProvider) => {
server.route({
url: "/",
method: "POST",
diff --git a/backend/src/ee/services/access-approval-policy/access-approval-policy-service.ts b/backend/src/ee/services/access-approval-policy/access-approval-policy-service.ts
index ed812fba6f..f143808692 100644
--- a/backend/src/ee/services/access-approval-policy/access-approval-policy-service.ts
+++ b/backend/src/ee/services/access-approval-policy/access-approval-policy-service.ts
@@ -179,6 +179,7 @@ export const accessApprovalPolicyServiceFactory = ({
);
await verifyApprovers({
+ projectId: accessApprovalPolicy.projectId,
orgId: actorOrgId,
envSlug: accessApprovalPolicy.environment.slug,
secretPath: doc.secretPath!,
diff --git a/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberRoleForm/SpecificPrivilegeSection.tsx b/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberRoleForm/SpecificPrivilegeSection.tsx
index 9252f09e60..6fb97063b6 100644
--- a/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberRoleForm/SpecificPrivilegeSection.tsx
+++ b/frontend/src/views/Project/MembersPage/components/MemberListTab/MemberRoleForm/SpecificPrivilegeSection.tsx
@@ -237,83 +237,6 @@ export const SpecificPrivilegeSecretForm = ({
}
};
- // This is used for requesting access additional privileges, not directly creating a privilege!
- const handleRequestAccess = async (data: TSecretPermissionForm) => {
- if (!policies) return;
- if (!currentWorkspace) {
- createNotification({
- type: "error",
- text: "No workspace found.",
- title: "Error"
- });
- return;
- }
-
- if (!data.secretPath) {
- createNotification({
- type: "error",
- text: "Please select a secret path",
- title: "Error"
- });
- return;
- }
-
- const actions = [
- { action: ProjectPermissionActions.Read, allowed: data.read },
- { action: ProjectPermissionActions.Create, allowed: data.create },
- { action: ProjectPermissionActions.Delete, allowed: data.delete },
- { action: ProjectPermissionActions.Edit, allowed: data.edit }
- ];
- const conditions: Record<string, any> = { environment: data.environmentSlug };
- if (data.secretPath) {
- conditions.secretPath = { $glob: data.secretPath };
- }
- await requestAccess.mutateAsync({
- ...(data.temporaryAccess.isTemporary && {
- temporaryRange: data.temporaryAccess.temporaryRange
- }),
- projectSlug: currentWorkspace.slug,
- isTemporary: data.temporaryAccess.isTemporary,
- permissions: actions
- .filter(({ allowed }) => allowed)
- .map(({ action }) => ({
- action,
- subject: [ProjectPermissionSub.Secrets],
- conditions
- }))
- });
-
- createNotification({
- type: "success",
- text: "Successfully requested access"
- });
- privilegeForm.reset();
- if (onClose) onClose();
- };
-
- const handleSubmit = async (data: TSecretPermissionForm) => {
- if (privilege) {
- handleUpdatePrivilege(data);
- } else {
- handleRequestAccess(data);
- }
- };
-
- const getAccessLabel = (exactTime = false) => {
- if (isExpired) return "Access expired";
- if (!temporaryAccessField?.isTemporary) return "Permanent";
-
- if (exactTime && !policies) {
- return `Until ${format(
- new Date(temporaryAccessField.temporaryAccessEndTime || ""),
- "yyyy-MM-dd HH:mm:ss"
- )}`;
- }
- return formatDistance(new Date(temporaryAccessField.temporaryAccessEndTime || ""), new Date());
- };
-
- };
-
// This is used for requesting access additional privileges, not directly creating a privilege!
const handleRequestAccess = async (data: TSecretPermissionForm) => {
if (!policies) return;
diff --git a/frontend/src/views/SecretApprovalPage/components/AccessApprovalPolicyList/components/AccessPolicyForm.tsx b/frontend/src/views/SecretApprovalPage/components/AccessApprovalPolicyList/components/AccessPolicyForm.tsx
index 081556041d..a07acb5849 100644
--- a/frontend/src/views/SecretApprovalPage/components/AccessApprovalPolicyList/components/AccessPolicyForm.tsx
+++ b/frontend/src/views/SecretApprovalPage/components/AccessApprovalPolicyList/components/AccessPolicyForm.tsx
@@ -186,6 +186,8 @@ export const AccessPolicyForm = ({
/>
<Controller
+ name="approvers"
+ control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<FormControl
label="Approvers Required"