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