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