mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
misc: fixed log clipping and added idempotency to session end
This commit is contained in:
@@ -152,6 +152,13 @@ export const pamSessionServiceFactory = ({
|
||||
OrgPermissionSubjects.Gateway
|
||||
);
|
||||
|
||||
if (session.status === PamSessionStatus.Ended) {
|
||||
return {
|
||||
session,
|
||||
projectId: project.id
|
||||
};
|
||||
}
|
||||
|
||||
if (session.status !== PamSessionStatus.Active) {
|
||||
throw new BadRequestError({ message: "Cannot end sessions that are not active" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user