feat: add disabledReason field to projects for better tracking of disable reasons

This commit is contained in:
Dries Augustyns
2026-05-22 13:03:32 +02:00
parent 9797aed47f
commit 94ceadbbe4
4 changed files with 27 additions and 4 deletions
+2 -2
View File
@@ -713,7 +713,7 @@ export class SecurityService {
// Disable the project
await prisma.project.update({
where: {id: projectId},
data: {disabled: true},
data: {disabled: true, disabledReason: 'EMAIL_REPUTATION'},
});
// Log critical security event
@@ -971,7 +971,7 @@ ${strippedBody.substring(0, 2000)}`,
// Disable the project
await prisma.project.update({
where: {id: projectId},
data: {disabled: true},
data: {disabled: true, disabledReason: 'PHISHING_DETECTED'},
});
const violation = `A policy violation was detected. Please contact support for more details.`;