fix: 'pinToHome' policy should not be available for drafts, templates, deleted

This commit is contained in:
Tom Moor committed 2024-04-29 09:34:17 -04:00
1 parent 416cb0ceb9
commit 3953bbaa99
1 file changed
+4 -1
+4 -1
View File
@@ -144,7 +144,10 @@ allow(User, "pinToHome", Document, (actor, document) =>
and(
//
isTeamAdmin(actor, document),
isTeamMutable(actor)
isTeamMutable(actor),
!document?.isDraft,
!document?.template,
!document?.isDeleted
)
);