aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/note_fragment.php
diff options
context:
space:
mode:
Diffstat (limited to 'routes/note_fragment.php')
-rw-r--r--routes/note_fragment.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/routes/note_fragment.php b/routes/note_fragment.php
index ff9559c..76ef4b7 100644
--- a/routes/note_fragment.php
+++ b/routes/note_fragment.php
@@ -146,6 +146,9 @@ Router::getInstance()->mount('/fragment/note/:id/edit', function (array $args) {
'text/html' => CommonMark::getInstance()->renderToHtml($content)
];
$note->modified = new DateTimeImmutable();
+ if (!PolicyManager::getInstance()->check($note)) {
+ throw new PolicyRejected();
+ }
$note->save();
$note->publish();