feat: Comment resolving (#7115)
This commit is contained in:
@@ -8,6 +8,22 @@ allow(User, "read", Comment, (actor, comment) =>
|
||||
isTeamModel(actor, comment?.createdBy)
|
||||
);
|
||||
|
||||
allow(User, "resolve", Comment, (actor, comment) =>
|
||||
and(
|
||||
isTeamModel(actor, comment?.createdBy),
|
||||
comment?.parentCommentId === null,
|
||||
comment?.resolvedById === null
|
||||
)
|
||||
);
|
||||
|
||||
allow(User, "unresolve", Comment, (actor, comment) =>
|
||||
and(
|
||||
isTeamModel(actor, comment?.createdBy),
|
||||
comment?.parentCommentId === null,
|
||||
comment?.resolvedById !== null
|
||||
)
|
||||
);
|
||||
|
||||
allow(User, ["update", "delete"], Comment, (actor, comment) =>
|
||||
and(
|
||||
isTeamModel(actor, comment?.createdBy),
|
||||
|
||||
Reference in New Issue
Block a user