mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 13:28:34 +00:00
misc: updated session log update validation
This commit is contained in:
@@ -95,8 +95,8 @@ export const pamSessionServiceFactory = ({
|
|||||||
const session = await pamSessionDAL.findById(sessionId);
|
const session = await pamSessionDAL.findById(sessionId);
|
||||||
if (!session) throw new NotFoundError({ message: `Session with ID '${sessionId}' not found` });
|
if (!session) throw new NotFoundError({ message: `Session with ID '${sessionId}' not found` });
|
||||||
|
|
||||||
if (session.status !== PamSessionStatus.Active) {
|
if (session.encryptedLogsBlob) {
|
||||||
throw new BadRequestError({ message: "Cannot update logs for sessions that are not active" });
|
throw new BadRequestError({ message: "Cannot update logs for sessions with existing logs" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const project = await projectDAL.findById(session.projectId);
|
const project = await projectDAL.findById(session.projectId);
|
||||||
|
|||||||
Reference in New Issue
Block a user