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