提交 0e5fcef5 编写于 作者: S Sebastien Ros
上级 ab1d9761
......@@ -291,6 +291,7 @@ namespace Orchard.Users.Controllers {
return RedirectToAction("Index");
}
[HttpPost]
public ActionResult SendChallengeEmail(int id) {
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage users")))
return new HttpUnauthorizedResult();
......@@ -311,7 +312,9 @@ namespace Orchard.Users.Controllers {
return RedirectToAction("Index");
}
public ActionResult Approve(int id) {
[HttpPost]
public ActionResult Approve(int id)
{
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage users")))
return new HttpUnauthorizedResult();
......@@ -328,7 +331,9 @@ namespace Orchard.Users.Controllers {
return RedirectToAction("Index");
}
public ActionResult Moderate(int id) {
[HttpPost]
public ActionResult Moderate(int id)
{
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage users")))
return new HttpUnauthorizedResult();
......
......@@ -71,12 +71,12 @@
@Html.ActionLink(T("Edit").ToString(), "Edit", new { entry.User.Id }) |
@Html.ActionLink(T("Delete").ToString(), "Delete", new { entry.User.Id}, new { itemprop = "RemoveUrl UnsafeUrl" }) |
@if (entry.User.RegistrationStatus == UserStatus.Pending) {
@Html.ActionLink(T("Approve").ToString(), "Approve", new { entry.User.Id })
@Html.ActionLink(T("Approve").ToString(), "Approve", new { entry.User.Id }, new { itemprop = "UnsafeUrl" })
} else {
@Html.ActionLink(T("Disable").ToString(), "Moderate", new { entry.User.Id })
@Html.ActionLink(T("Disable").ToString(), "Moderate", new { entry.User.Id }, new { itemprop = "UnsafeUrl" })
}
@if (entry.User.EmailStatus == UserStatus.Pending) { <text>|</text>
@Html.ActionLink(T("Send challenge E-mail").ToString(), "SendChallengeEmail", new { entry.User.Id })
@Html.ActionLink(T("Send challenge E-mail").ToString(), "SendChallengeEmail", new { entry.User.Id }, new { itemprop = "UnsafeUrl" })
}
</td>
</tr>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册