Feat: Request access

This commit is contained in:
Daniel Hougaard
2024-05-07 17:30:35 +02:00
parent 810f670e64
commit 3331699f56
5 changed files with 253 additions and 10 deletions
+1 -1
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({
@@ -9,8 +9,9 @@ export async function up(knex: Knex): Promise<void> {
t.uuid("id", { primaryKey: true }).defaultTo(knex.fn.uuid());
t.string("name").notNullable();
t.integer("approvals").defaultTo(1).notNullable();
t.uuid("envId").notNullable();
t.string("secretPath");
t.uuid("envId").notNullable();
t.foreign("envId").references("id").inTable(TableName.Environment).onDelete("CASCADE");
t.timestamps(true, true, true);
});
@@ -154,7 +154,6 @@ export const accessApprovalPolicyServiceFactory = ({
actorAuthMethod,
actorOrgId
);
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Edit, ProjectPermissionSub.SecretApproval);
const updatedPolicy = await accessApprovalPolicyDAL.transaction(async (tx) => {