canDo('maintenance.proposal.approve')) { return true; } return false; } /** * Determine if the given user can approve the given proposal. * * @param UserPolicyInterface $authUser * * @return bool */ public function submit(UserPolicyInterface $authUser, Proposal $proposal) { if ($authUser->canDo('maintenance.proposal.submit')) { return true; } return false; } /** * Determine if the given user can approve the given proposal. * * @param UserPolicyInterface $authUser * * @return bool */ public function publish(UserPolicyInterface $authUser, Proposal $proposal) { if ($authUser->canDo('maintenance.proposal.publish')) { return true; } return false; } /** * Determine if the given user can approve the given proposal. * * @param UserPolicyInterface $authUser * * @return bool */ public function unpublish(UserPolicyInterface $authUser, Proposal $proposal) { if ($authUser->canDo('maintenance.proposal.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given proposal. * * @param UserPolicyInterface $authUser * * @return bool */ public function archive(UserPolicyInterface $authUser, Proposal $proposal) { if ($authUser->canDo('maintenance.proposal.archive')) { return true; } return false; } /** * Determine if the given user can approve the given proposal. * * @param UserPolicyInterface $authUser * * @return bool */ public function unarchive(UserPolicyInterface $authUser, Proposal $proposal) { if ($authUser->canDo('maintenance.proposal.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given proposal. * * @param UserPolicyInterface $authUser * * @return bool */ public function reject(UserPolicyInterface $authUser, Proposal $proposal) { if ($authUser->canDo('maintenance.proposal.reject')) { return true; } return false; } }