mirror of
https://github.com/outline/outline.git
synced 2026-12-02 17:52:07 +03:00
Remove comment for guests with read-only permissions
This commit is contained in:
1 parent
1af25db60e
commit
e9df3db1ef
1 file changed
+5
-2
@@ -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