Feat: Request access

This commit is contained in:
Daniel Hougaard
2024-04-01 09:49:22 -07:00
parent cb505d1525
commit db0b4a5ad1
4 changed files with 5 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import knex from "knex";
import { writeFileSync } from "fs";
dotenv.config({
path: path.join(__dirname, "../../.env.migration")
path: path.join(__dirname, "../../.env")
});
const db = knex({

View File

@@ -155,7 +155,6 @@ export const accessApprovalPolicyServiceFactory = ({
actorAuthMethod,
actorOrgId
);
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Edit, ProjectPermissionSub.SecretApproval);
const updatedPolicy = await accessApprovalPolicyDAL.transaction(async (tx) => {
@@ -179,7 +178,6 @@ export const accessApprovalPolicyServiceFactory = ({
);
await verifyApprovers({
projectId: accessApprovalPolicy.projectId,
orgId: actorOrgId,
envSlug: accessApprovalPolicy.environment.slug,
secretPath: doc.secretPath!,

View File

@@ -65,6 +65,10 @@ export const SecretApprovalPage = () => {
<TabPanel value={TabSection.ResourcePolicies}>
<AccessApprovalPolicyList workspaceId={projectId} />
</TabPanel>
<TabPanel value={TabSection.ResourcePolicies}>
<AccessApprovalPolicyList workspaceId={workspaceId} />
</TabPanel>
</Tabs>
</div>
);

View File

@@ -177,7 +177,6 @@ export const AccessPolicyForm = ({
/>
<Controller
control={control}
name="secretPath"
render={({ field, fieldState: { error } }) => (
<FormControl label="Secret Path" isError={Boolean(error)} errorText={error?.message}>
@@ -187,8 +186,6 @@ export const AccessPolicyForm = ({
/>
<Controller
control={control}
name="approvers"
render={({ field: { value, onChange }, fieldState: { error } }) => (
<FormControl
label="Approvers Required"