mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 00:26:40 +00:00
Feat: Request access
This commit is contained in:
@@ -5,7 +5,7 @@ import knex from "knex";
|
|||||||
import { writeFileSync } from "fs";
|
import { writeFileSync } from "fs";
|
||||||
|
|
||||||
dotenv.config({
|
dotenv.config({
|
||||||
path: path.join(__dirname, "../../.env.migration")
|
path: path.join(__dirname, "../../.env")
|
||||||
});
|
});
|
||||||
|
|
||||||
const db = knex({
|
const db = knex({
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ export const accessApprovalPolicyServiceFactory = ({
|
|||||||
actorAuthMethod,
|
actorAuthMethod,
|
||||||
actorOrgId
|
actorOrgId
|
||||||
);
|
);
|
||||||
|
|
||||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Edit, ProjectPermissionSub.SecretApproval);
|
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Edit, ProjectPermissionSub.SecretApproval);
|
||||||
|
|
||||||
const updatedPolicy = await accessApprovalPolicyDAL.transaction(async (tx) => {
|
const updatedPolicy = await accessApprovalPolicyDAL.transaction(async (tx) => {
|
||||||
@@ -179,7 +178,6 @@ export const accessApprovalPolicyServiceFactory = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
await verifyApprovers({
|
await verifyApprovers({
|
||||||
projectId: accessApprovalPolicy.projectId,
|
|
||||||
orgId: actorOrgId,
|
orgId: actorOrgId,
|
||||||
envSlug: accessApprovalPolicy.environment.slug,
|
envSlug: accessApprovalPolicy.environment.slug,
|
||||||
secretPath: doc.secretPath!,
|
secretPath: doc.secretPath!,
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ export const SecretApprovalPage = () => {
|
|||||||
<TabPanel value={TabSection.ResourcePolicies}>
|
<TabPanel value={TabSection.ResourcePolicies}>
|
||||||
<AccessApprovalPolicyList workspaceId={projectId} />
|
<AccessApprovalPolicyList workspaceId={projectId} />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
||||||
|
<TabPanel value={TabSection.ResourcePolicies}>
|
||||||
|
<AccessApprovalPolicyList workspaceId={workspaceId} />
|
||||||
|
</TabPanel>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
-3
@@ -177,7 +177,6 @@ export const AccessPolicyForm = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
|
||||||
name="secretPath"
|
name="secretPath"
|
||||||
render={({ field, fieldState: { error } }) => (
|
render={({ field, fieldState: { error } }) => (
|
||||||
<FormControl label="Secret Path" isError={Boolean(error)} errorText={error?.message}>
|
<FormControl label="Secret Path" isError={Boolean(error)} errorText={error?.message}>
|
||||||
@@ -187,8 +186,6 @@ export const AccessPolicyForm = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
|
||||||
name="approvers"
|
|
||||||
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
||||||
<FormControl
|
<FormControl
|
||||||
label="Approvers Required"
|
label="Approvers Required"
|
||||||
|
|||||||
Reference in New Issue
Block a user