mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
fix: remove account create log
This commit is contained in:
@ -18,16 +18,6 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
||||
error: '/signin',
|
||||
},
|
||||
events: {
|
||||
createUser: async ({ user }) => {
|
||||
await prisma.userSecurityAuditLog.create({
|
||||
data: {
|
||||
userId: user.id,
|
||||
ipAddress,
|
||||
userAgent,
|
||||
type: UserSecurityAuditLogType.ACCOUNT_CREATE,
|
||||
},
|
||||
});
|
||||
},
|
||||
signIn: async ({ user }) => {
|
||||
await prisma.userSecurityAuditLog.create({
|
||||
data: {
|
||||
|
||||
@ -12,7 +12,6 @@ export const IS_GOOGLE_SSO_ENABLED = Boolean(
|
||||
);
|
||||
|
||||
export const USER_SECURITY_AUDIT_LOG_MAP: { [key in UserSecurityAuditLogType]: string } = {
|
||||
[UserSecurityAuditLogType.ACCOUNT_CREATE]: 'Account created',
|
||||
[UserSecurityAuditLogType.ACCOUNT_SSO_LINK]: 'Linked account to SSO',
|
||||
[UserSecurityAuditLogType.ACCOUNT_PROFILE_UPDATE]: 'Profile updated',
|
||||
[UserSecurityAuditLogType.AUTH_2FA_DISABLE]: '2FA Disabled',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "UserSecurityAuditLogType" AS ENUM ('ACCOUNT_CREATE', 'ACCOUNT_PROFILE_UPDATE', 'ACCOUNT_SSO_LINK', 'AUTH_2FA_DISABLE', 'AUTH_2FA_ENABLE', 'PASSWORD_RESET', 'PASSWORD_UPDATE', 'SIGN_OUT', 'SIGN_IN');
|
||||
CREATE TYPE "UserSecurityAuditLogType" AS ENUM ('ACCOUNT_PROFILE_UPDATE', 'ACCOUNT_SSO_LINK', 'AUTH_2FA_DISABLE', 'AUTH_2FA_ENABLE', 'PASSWORD_RESET', 'PASSWORD_UPDATE', 'SIGN_OUT', 'SIGN_IN');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "UserSecurityAuditLog" (
|
||||
@ -49,7 +49,6 @@ model User {
|
||||
}
|
||||
|
||||
enum UserSecurityAuditLogType {
|
||||
ACCOUNT_CREATE
|
||||
ACCOUNT_PROFILE_UPDATE
|
||||
ACCOUNT_SSO_LINK
|
||||
AUTH_2FA_DISABLE
|
||||
|
||||
Reference in New Issue
Block a user