feat: rename comment thread into activity (#939)
* feat: rename commentThread into activity server * feat: rename commentThread into activity front * feat: migration only create tables feat: migration only create tables * Update activities * fix: rebase partial fix * fix: all rebase problems and drop activity target alter * fix: lint * Update migration * Update migration * Fix conflicts * Fix conflicts --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -3,7 +3,8 @@ import { Injectable } from '@nestjs/common';
|
||||
import { PureAbility, AbilityBuilder } from '@casl/ability';
|
||||
import { createPrismaAbility, PrismaQuery, Subjects } from '@casl/prisma';
|
||||
import {
|
||||
CommentThread,
|
||||
Attachment,
|
||||
Activity,
|
||||
Company,
|
||||
Comment,
|
||||
Person,
|
||||
@ -11,11 +12,10 @@ import {
|
||||
User,
|
||||
Workspace,
|
||||
WorkspaceMember,
|
||||
CommentThreadTarget,
|
||||
ActivityTarget,
|
||||
Pipeline,
|
||||
PipelineStage,
|
||||
PipelineProgress,
|
||||
Attachment,
|
||||
UserSettings,
|
||||
ViewField,
|
||||
} from '@prisma/client';
|
||||
@ -29,9 +29,9 @@ type SubjectsAbility = Subjects<{
|
||||
Company: Company;
|
||||
Person: Person;
|
||||
RefreshToken: RefreshToken;
|
||||
CommentThread: CommentThread;
|
||||
Activity: Activity;
|
||||
Comment: Comment;
|
||||
CommentThreadTarget: CommentThreadTarget;
|
||||
ActivityTarget: ActivityTarget;
|
||||
Pipeline: Pipeline;
|
||||
PipelineStage: PipelineStage;
|
||||
PipelineProgress: PipelineProgress;
|
||||
@ -86,11 +86,11 @@ export class AbilityFactory {
|
||||
// RefreshToken
|
||||
cannot(AbilityAction.Manage, 'RefreshToken');
|
||||
|
||||
// CommentThread
|
||||
can(AbilityAction.Read, 'CommentThread', { workspaceId: workspace.id });
|
||||
can(AbilityAction.Create, 'CommentThread');
|
||||
can(AbilityAction.Update, 'CommentThread', { workspaceId: workspace.id });
|
||||
can(AbilityAction.Delete, 'CommentThread', { workspaceId: workspace.id });
|
||||
// Activity
|
||||
can(AbilityAction.Read, 'Activity', { workspaceId: workspace.id });
|
||||
can(AbilityAction.Create, 'Activity');
|
||||
can(AbilityAction.Update, 'Activity', { workspaceId: workspace.id });
|
||||
can(AbilityAction.Delete, 'Activity', { workspaceId: workspace.id });
|
||||
|
||||
// Comment
|
||||
can(AbilityAction.Read, 'Comment', { workspaceId: workspace.id });
|
||||
@ -104,9 +104,9 @@ export class AbilityFactory {
|
||||
authorId: user.id,
|
||||
});
|
||||
|
||||
// CommentThreadTarget
|
||||
can(AbilityAction.Read, 'CommentThreadTarget');
|
||||
can(AbilityAction.Create, 'CommentThreadTarget');
|
||||
// ActivityTarget
|
||||
can(AbilityAction.Read, 'ActivityTarget');
|
||||
can(AbilityAction.Create, 'ActivityTarget');
|
||||
|
||||
// Attachment
|
||||
can(AbilityAction.Read, 'Attachment', { workspaceId: workspace.id });
|
||||
|
||||
Reference in New Issue
Block a user