Permalink
Browse files

Merge pull request #960 from NuGet/tilovell-PreviewReportMyPackageFixes

Tilovell preview report my package fixes
  • Loading branch information...
TimLovellSmith committed Mar 27, 2013
2 parents 5ea1bb2 + fca89f3 commit 158519817029aff984ced578a6f4c0e08601ce6b
Showing with 4 additions and 4 deletions.
  1. +3 −3 Website/Controllers/PackagesController.cs
  2. +1 −1 Website/Views/Packages/ReportMyPackage.cshtml
@@ -268,8 +268,8 @@ public virtual ActionResult ReportMyPackage(string id, string version)
return HttpNotFound();
}
- // If user hit this url by e.g. constructing it manually but is not the owner, redirect them to ReportAbuse
- if (!package.IsOwner(user))
+ // If user hit this url by constructing it manually but is not the owner, redirect them to ReportAbuse
+ if (!(HttpContext.User.IsInRole(Constants.AdminRoleName) || package.IsOwner(user)))
{
return RedirectToAction(ActionNames.ReportAbuse, new { id, version });
}
@@ -740,4 +740,4 @@ private static string GetSortExpression(string sortOrder)
}
}
}
-}
+}
@@ -11,7 +11,7 @@
@using (Html.BeginForm())
{
<fieldset class="form">
- <legend>Report Abuse</legend>
+ <legend>Contact Support</legend>
@Html.AntiForgeryToken()
<div class="form-field">
@if (!Model.ConfirmedUser)

0 comments on commit 1585198

Please sign in to comment.