Remove comment for guests with read-only permissions
This commit is contained in:
@@ -53,8 +53,11 @@ allow(User, "download", Document, (actor, document) =>
|
||||
|
||||
allow(User, "comment", Document, (actor, document) =>
|
||||
and(
|
||||
//
|
||||
can(actor, "read", document),
|
||||
// TODO: We'll introduce a separate permission for commenting
|
||||
or(
|
||||
and(can(actor, "read", document), !actor.isGuest),
|
||||
and(can(actor, "update", document), actor.isGuest)
|
||||
),
|
||||
isTeamMutable(actor),
|
||||
!!document?.isActive,
|
||||
!document?.template
|
||||
|
||||
Reference in New Issue
Block a user