public static string GetActionsViewItem(RestCommand command, int actionID) { ActionsViewItem actionsViewItem = ActionsView.GetActionsViewItem(command.LoginUser, actionID); if (actionsViewItem.OrganizationID != command.Organization.OrganizationID) { throw new RestException(HttpStatusCode.Unauthorized); } return(actionsViewItem.GetXml("ActionsViewItem", true)); }
public static string GetCustomerAction(RestCommand command, int actionID) { ActionsViewItem action = ActionsView.GetActionsViewItem(command.LoginUser, actionID); TicketsViewItem ticket = action.GetTicket(); if (ticket.OrganizationID != command.Organization.ParentID || !ticket.GetIsCustomer(command.Organization.OrganizationID)) { throw new RestException(HttpStatusCode.Unauthorized); } return(action.GetXml("Action", true)); }
public static string GetAction(RestCommand command, int actionID) { ActionsViewItem action = ActionsView.GetActionsViewItem(command.LoginUser, actionID); if (action.OrganizationID != command.Organization.OrganizationID) { throw new RestException(HttpStatusCode.Unauthorized); } action.Description = RemoveInvalidXmlChars(action.Description); return(action.GetXml("Action", true)); }