/** * Check if a user is allowed to perform a certain action, depending on the * status (deleted?) of the board. * * @param Workflow $workflow * @param string $action * @return bool */ public function isBoardAllowed(Workflow $workflow, $action) { $permissions = $this->actions->getValue($action, 'core-delete-permissions'); // If user is allowed to see deleted page content, there's no need to // even check if it's been deleted (additional storage lookup) $allowed = call_user_func_array(array($this->user, 'isAllowedAny'), (array) $permissions); if ($allowed) { return true; } return !$workflow->isDeleted(); }