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