From 8fac11e19624c3b02d3a6486c053c84305b237fa Mon Sep 17 00:00:00 2001 From: Matthew Hailwood Date: Thu, 6 Apr 2017 17:18:57 +1200 Subject: [PATCH] Allow other checks on canView for blog --- code/model/BlogPost.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/model/BlogPost.php b/code/model/BlogPost.php index 7e6ac15..c29051f 100644 --- a/code/model/BlogPost.php +++ b/code/model/BlogPost.php @@ -473,6 +473,12 @@ class BlogPost extends Page return false; } + $extended = $this->extendedCan('canView', $member); + + if ($extended !== null) { + return $extended; + } + return !$publishDate->InFuture(); }