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