mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-20 19:03:25 +08:00
Update AdminController.cs
This commit is contained in:
@@ -159,6 +159,12 @@ namespace Orchard.Workflows.Controllers {
|
|||||||
return RedirectToAction("Edit", new { workflowDefinitionRecord.Id });
|
return RedirectToAction("Edit", new { workflowDefinitionRecord.Id });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JsonResult State(int? id) {
|
||||||
|
var workflowDefinitionRecord = id.HasValue ? _workflowDefinitionRecords.Get(id.Value) : null;
|
||||||
|
var isRunning = workflowDefinitionRecord != null ? workflowDefinitionRecord.WorkflowRecords.Any() : false;
|
||||||
|
return Json(new { isRunning = isRunning }, JsonRequestBehavior.AllowGet);
|
||||||
|
}
|
||||||
|
|
||||||
public ActionResult Edit(int id, string localId, int? workflowId) {
|
public ActionResult Edit(int id, string localId, int? workflowId) {
|
||||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to edit workflows")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
Reference in New Issue
Block a user