ensure notes by portal users are always public (#2681)

This commit is contained in:
Arkadiy Asuratov
2023-03-29 10:24:22 +02:00
committed by GitHub
parent 9345ada934
commit b70327874e
+4
View File
@@ -119,6 +119,10 @@ class Note extends Record
throw new ForbiddenSilent("Only 'Post' type allowed.");
}
if ($this->user->isPortal()) {
$entity->set('isInternal', false);
}
if ($entity->isPost()) {
$this->handlePostText($entity);
}