public ActionResult QueryProvider(string workflowName, int id, string actionName, string fieldName, string query) { var action = CoreExtensions.GetAction(DbContext, Auth, workflowName, id, actionName, (Framework.Core.Entities.User)User); SetGetParams(action); SetPostValues(action, action.Fields); var fieldProvider = action.Fields.First(f => f.UniqueName == fieldName).FieldAttribute.GetProvider(); return(View("Fields/_ListFieldQueryResults", fieldProvider.Options(action, (Framework.Core.Entities.User)User, query))); }
public ActionResult LoadWorkflowAction(string workflowName, int id, string actionName, string page = null, string submittedpagenames = null, bool back = false, bool cancel = false) { var action = CoreExtensions.GetAction(DbContext, Auth, workflowName, id, actionName, (Framework.Core.Entities.User)User); // Redirect right away if cancelled if (cancel) { return(HandleRedirect(action)); } return(RunAction(action, User, page, submittedpagenames, back)); }
public ActionResult LoadWorkflowActionAsUser(string workflowName, int id, string actionName, int asUserId, string page = null, string submittedpagenames = null, bool back = false, bool cancel = false) { if (!(User.MeetsAuthLevel(BaseRoleType.Admin))) { throw new AccessViolationException("Only Property Managers can run actions as another user"); } var user = DbContext.Set <User>().Single(u => u.Id == asUserId); var action = CoreExtensions.GetAction(DbContext, Auth, workflowName, id, actionName, user); // Redirect right away if cancelled if (cancel) { return(HandleRedirect(action)); } return(RunAction(action, user, page, submittedpagenames, back)); }