Skip to content

Commit

Permalink
Fixes #1425. Tweaking the Report Abuse page in hopes of further reduc…
Browse files Browse the repository at this point in the history
…ing a) the volume of support requests about failed package installs b) the number of malicious code reports with no actual proof (malicious abuse reports, perhaps!). Also moving 'Contact Owners' above 'Report Abuse' on the display package page to make it easier to find than report abuse.
  • Loading branch information
Tim Lovell-Smith committed Oct 28, 2013
1 parent 3b3fbbc commit 12f14ea
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/NuGetGallery/Controllers/PackagesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ public virtual ActionResult ListPackages(string q, string sortOrder = null, int
ReportPackageReason.ViolatesALicenseIOwn,
ReportPackageReason.ContainsMaliciousCode,
ReportPackageReason.HasABug,
ReportPackageReason.FailedToInstall,
ReportPackageReason.Other
};

Expand Down
1 change: 1 addition & 0 deletions src/NuGetGallery/Infrastructure/NotEqualAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace NuGetGallery.Infrastructure
{
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public sealed class NotEqualAttribute : ValidationAttribute, IClientValidatable
{
public object DisallowedValue { get; private set; }
Expand Down
4 changes: 4 additions & 0 deletions src/NuGetGallery/ViewModels/ReportAbuseViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public enum ReportPackageReason

[Description("The package was not intended to be published publically on nuget.org")]
ReleasedInPublicByAccident,

[Description("The package failed to install")]
FailedToInstall,
}

public class ReportAbuseViewModel
Expand All @@ -45,6 +48,7 @@ public class ReportAbuseViewModel
public bool AlreadyContactedOwner { get; set; }

[NotEqual(ReportPackageReason.HasABug, ErrorMessage = "Unfortunately we cannot provide support for bugs in NuGet Packages. You should contact the owner(s) for assistance.")]
[NotEqual(ReportPackageReason.FailedToInstall, ErrorMessage = "Unfortunately we cannot provide support for bugs in NuGet Packages. You should contact the owner(s) for assistance.")]
[Required(ErrorMessage = "You must select a reason for reporting the package")]
[Display(Name = "Reason")]
public ReportPackageReason? Reason { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@
{
<li><a href="@Model.LicenseUrl" title="Make sure you agree with the license">License</a></li>
}
<li><a href="@Url.Action(MVC.Packages.ContactOwners(Model.Id))" title="Ask the package owners a question">Contact Owners</a></li>
@if (Model.IsOwner(User))
{
<li><a href="@Url.Action(MVC.Packages.ReportMyPackage(Model.Id, Model.Version))" title="Contact support for help with your package">
<li><a href="@Url.Action(MVC.Packages.ReportMyPackage(Model.Id, Model.Version))" title="Contact the NuGet team for help with your package">
Contact Support</a></li>
}
else
{
<li><a href="@Url.Action(MVC.Packages.ReportAbuse(Model.Id, Model.Version))" title="Report the package as abusive">
Report Abuse</a></li>
}
<li><a href="@Url.Action(MVC.Packages.ContactOwners(Model.Id))">Contact Owners</a></li>
@if (User.Identity.IsAuthenticated)
{
<li><a href="@Url.PackageDownload(2, Model.Id, Model.Version)" title="Download the raw nupkg file.">Download</a></li>
Expand Down
12 changes: 7 additions & 5 deletions src/NuGetGallery/Views/Packages/ReportAbuse.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
<h1 class="page-heading">Report Abuse</h1>

<p class="message">
Important: This form is for reporting <em>abusive</em> packages such as
<strong>Important: Please to not use this form to report a bug in a package you are using!</strong><br />
This form is for reporting <em>abusive</em> packages such as
packages containing <em>malicious code</em> or spam. If "@Model.PackageId" simply doesn't
appear to work or work correctly, please
<a href="@Url.Action(MVC.Packages.ContactOwners(Model.PackageId))" title="contact the owners">contact the owners of "@Model.PackageId".</a>
work, or if you need help getting the package installed, please
<a href="@Url.Action(MVC.Packages.ContactOwners(Model.PackageId))" title="contact the owners">click here to contact the owners of "@Model.PackageId".</a>
</p>

<p>Please provide a detailed abuse report. Include exactly what the package did.</p>
<p>Please provide a detailed abuse report. Include exactly what the package did, for example if you are reporting a package with a virus or malicious code,
<em>please explain how you detected this!</em> We cannot delete packages without convincing proof.</p>

@if (!Model.ConfirmedUser)
{
Expand Down Expand Up @@ -56,7 +58,7 @@
</div>
<div class="form-field">
@Html.LabelFor(m => m.Message, "Abuse Report")
<p>In addition to selecting the reason for reporting the package, you <em>must</em> provide details of the problem.</p>
<p>In addition to selecting the reason for reporting the package, you must provide details of the problem here.</p>
@Html.TextAreaFor(m => m.Message, 10, 50, null)
@Html.ValidationMessageFor(m => m.Message, null, new { id = "report-abuse-message" })
</div>
Expand Down

0 comments on commit 12f14ea

Please sign in to comment.