From 8c9c6f5ac41672a6c81e45242bbcef7cc3dcd713 Mon Sep 17 00:00:00 2001 From: Sam Walsh Date: Tue, 31 May 2016 15:00:51 +1200 Subject: [PATCH] Add canEdit extension --- code/model/BlogPost.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/model/BlogPost.php b/code/model/BlogPost.php index 567fa37..6307381 100644 --- a/code/model/BlogPost.php +++ b/code/model/BlogPost.php @@ -518,6 +518,12 @@ class BlogPost extends Page { $member = $this->getMember($member); + $extended = $this->extendedCan('canEdit', $member); + + if ($extended !== null) { + return $extended; + } + if (parent::canEdit($member)) { return true; }