Implement permissions check on blog and blog posts.

This commit is contained in:
2026-04-20 12:31:20 +10:00
parent ac10e95b51
commit b0d1cabf56
3 changed files with 6 additions and 0 deletions

View File

@@ -20,6 +20,10 @@ return function ($page) {
$posts = $page->children();
}
if (kirby()->plugin("hobbyhome/permissions")) {
$posts = $posts->filterBy("hasPerm", true);
}
$posts = $posts->sortBy("pinned", SORT_DESC, "updated", SORT_DESC);
$posts = $posts->paginate($page->postsPerPage()->toInt());