From 261ab1364aa40384b0315be60e78cd89ea7fe661 Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 23 Feb 2025 18:32:09 +0000 Subject: implement policies --- routes/actor_profile_fragment.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'routes/actor_profile_fragment.php') diff --git a/routes/actor_profile_fragment.php b/routes/actor_profile_fragment.php index f2d0004..e5fe33f 100644 --- a/routes/actor_profile_fragment.php +++ b/routes/actor_profile_fragment.php @@ -1,8 +1,10 @@ mount('/fragment/profile', function (array $args) { $actor->avatar = $obj->getUrl(); } + if (!PolicyManager::getInstance()->check($actor)) { + throw new PolicyRejected(); + } $actor->save(); $actor->publish(); -- cgit v1.3