Implement permissions check on blog and blog posts.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user