Browse Source

feat: update comments

pull/6554/head
DarkPhoenix2704 1 year ago
parent
commit
154c154d0d
  1. 2
      packages/nc-gui/components/smartsheet/expanded-form/Comments.vue
  2. 1
      packages/nocodb/src/controllers/audits.controller.ts
  3. 3
      packages/nocodb/src/services/audits.service.ts

2
packages/nc-gui/components/smartsheet/expanded-form/Comments.vue

@ -18,8 +18,6 @@ const tab = ref<'comments' | 'audits'>('comments')
const { isUIAllowed } = useRoles()
const { appInfo } = useGlobal()
const hasEditPermission = computed(() => isUIAllowed('commentEdit'))
const editLog = ref<AuditType>()

1
packages/nocodb/src/controllers/audits.controller.ts

@ -61,7 +61,6 @@ export class AuditsController {
@Request() req,
@Body() body: any,
) {
console.log('heeeeeeeee')
return await this.auditsService.commentUpdate({
auditId,
userEmail: req.user?.email,

3
packages/nocodb/src/services/audits.service.ts

@ -93,6 +93,9 @@ export class AuditsService {
);
const log = await Audit.get(param.auditId);
if (log.op_type !== AuditOperationTypes.COMMENT) {
NcError.forbidden('Only comments can be updated');
}
if (log.user !== param.userEmail) {
NcError.unauthorized('Unauthorized access');

Loading…
Cancel
Save