protected function processDeletePost(array $post, array $authorsAllowed = [], array $oldPost = []) : bool { // Extra caution: check permissions again. if (!$this->isSuperUser()) { if (!$this->can('delete')) { // Does this author belong to you? if (!\in_array((int) $oldPost['author'], $authorsAllowed)) { return false; } } } return $this->blog->deletePost($post, $oldPost); }