diff options
| author | winter | 2025-05-03 15:54:49 +0100 |
|---|---|---|
| committer | winter | 2025-05-03 15:54:49 +0100 |
| commit | 0310ab4e341365071d62e5449b31614022034b60 (patch) | |
| tree | 00996abf3533664de8f93773b81bf89df00aa74a /routes | |
| parent | 8548bb523e79ee59f2b762c5063c0f00bca603a0 (diff) | |
run policies on editing notes
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/note_fragment.php | 3 |
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(); |
