mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +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',
|
error: '/signin',
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
createUser: async ({ user }) => {
|
|
||||||
await prisma.userSecurityAuditLog.create({
|
|
||||||
data: {
|
|
||||||
userId: user.id,
|
|
||||||
ipAddress,
|
|
||||||
userAgent,
|
|
||||||
type: UserSecurityAuditLogType.ACCOUNT_CREATE,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
signIn: async ({ user }) => {
|
signIn: async ({ user }) => {
|
||||||
await prisma.userSecurityAuditLog.create({
|
await prisma.userSecurityAuditLog.create({
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@ -12,7 +12,6 @@ export const IS_GOOGLE_SSO_ENABLED = Boolean(
|
|||||||
);
|
);
|
||||||
|
|
||||||
export const USER_SECURITY_AUDIT_LOG_MAP: { [key in UserSecurityAuditLogType]: string } = {
|
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_SSO_LINK]: 'Linked account to SSO',
|
||||||
[UserSecurityAuditLogType.ACCOUNT_PROFILE_UPDATE]: 'Profile updated',
|
[UserSecurityAuditLogType.ACCOUNT_PROFILE_UPDATE]: 'Profile updated',
|
||||||
[UserSecurityAuditLogType.AUTH_2FA_DISABLE]: '2FA Disabled',
|
[UserSecurityAuditLogType.AUTH_2FA_DISABLE]: '2FA Disabled',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
-- CreateEnum
|
-- 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
|
-- CreateTable
|
||||||
CREATE TABLE "UserSecurityAuditLog" (
|
CREATE TABLE "UserSecurityAuditLog" (
|
||||||
@ -49,7 +49,6 @@ model User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum UserSecurityAuditLogType {
|
enum UserSecurityAuditLogType {
|
||||||
ACCOUNT_CREATE
|
|
||||||
ACCOUNT_PROFILE_UPDATE
|
ACCOUNT_PROFILE_UPDATE
|
||||||
ACCOUNT_SSO_LINK
|
ACCOUNT_SSO_LINK
|
||||||
AUTH_2FA_DISABLE
|
AUTH_2FA_DISABLE
|
||||||
|
|||||||
Reference in New Issue
Block a user