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