Browse Source

fix: audit message

pull/5444/head
Wing-Kam Wong 2 years ago
parent
commit
2ca20e1030
  1. 6
      packages/nocodb-nest/src/modules/columns/columns.service.ts
  2. 6
      packages/nocodb-nest/src/modules/project-users/project-users.service.ts

6
packages/nocodb-nest/src/modules/columns/columns.service.ts

@ -831,7 +831,7 @@ export class ColumnsService {
op_type: AuditOperationTypes.TABLE_COLUMN, op_type: AuditOperationTypes.TABLE_COLUMN,
op_sub_type: AuditOperationSubTypes.UPDATE, op_sub_type: AuditOperationSubTypes.UPDATE,
user: param.req?.user?.email, user: param.req?.user?.email,
description: `updated column ${column.column_name} with alias ${column.title} from table ${table.table_name}`, description: `The column ${column.column_name} with alias ${column.title} from table ${table.table_name} has been updated`,
ip: param.req?.clientIp, ip: param.req?.clientIp,
}); });
@ -1133,7 +1133,7 @@ export class ColumnsService {
op_type: AuditOperationTypes.TABLE_COLUMN, op_type: AuditOperationTypes.TABLE_COLUMN,
op_sub_type: AuditOperationSubTypes.CREATE, op_sub_type: AuditOperationSubTypes.CREATE,
user: param?.req.user?.email, user: param?.req.user?.email,
description: `created column ${colBody.column_name} with alias ${colBody.title} from table ${table.table_name}`, description: `The column ${colBody.column_name} with alias ${colBody.title} from table ${table.table_name} has been created`,
ip: param?.req.clientIp, ip: param?.req.clientIp,
}); });
@ -1344,7 +1344,7 @@ export class ColumnsService {
op_type: AuditOperationTypes.TABLE_COLUMN, op_type: AuditOperationTypes.TABLE_COLUMN,
op_sub_type: AuditOperationSubTypes.DELETE, op_sub_type: AuditOperationSubTypes.DELETE,
user: param?.req?.user?.email, user: param?.req?.user?.email,
description: `deleted column ${column.column_name} with alias ${column.title} from table ${table.table_name}`, description: `The column ${column.column_name} with alias ${column.title} from table ${table.table_name} has been deleted`,
ip: param?.req.clientIp, ip: param?.req.clientIp,
}); });

6
packages/nocodb-nest/src/modules/project-users/project-users.service.ts

@ -100,7 +100,7 @@ export class ProjectUsersService {
op_type: AuditOperationTypes.AUTHENTICATION, op_type: AuditOperationTypes.AUTHENTICATION,
op_sub_type: AuditOperationSubTypes.INVITE, op_sub_type: AuditOperationSubTypes.INVITE,
user: param.req.user.email, user: param.req.user.email,
description: `invited ${email} to ${param.projectId} project `, description: `${email} has been invited to ${param.projectId} project`,
ip: param.req.clientIp, ip: param.req.clientIp,
}); });
} else { } else {
@ -211,7 +211,7 @@ export class ProjectUsersService {
op_type: AuditOperationTypes.AUTHENTICATION, op_type: AuditOperationTypes.AUTHENTICATION,
op_sub_type: AuditOperationSubTypes.ROLES_MANAGEMENT, op_sub_type: AuditOperationSubTypes.ROLES_MANAGEMENT,
user: param.req.user.email, user: param.req.user.email,
description: `updated roles for ${user.email} with ${param.projectUser.roles} `, description: `Roles for ${user.email} with has been updated to ${param.projectUser.roles}`,
ip: param.req.clientIp, ip: param.req.clientIp,
}); });
@ -290,7 +290,7 @@ export class ProjectUsersService {
op_type: AuditOperationTypes.AUTHENTICATION, op_type: AuditOperationTypes.AUTHENTICATION,
op_sub_type: AuditOperationSubTypes.RESEND_INVITE, op_sub_type: AuditOperationSubTypes.RESEND_INVITE,
user: user.email, user: user.email,
description: `resent a invite to ${user.email} `, description: `${user.email} has been re-invited`,
ip: param.req.clientIp, ip: param.req.clientIp,
project_id: param.projectId, project_id: param.projectId,
}); });

Loading…
Cancel
Save