public IActionResult AuthorizationEnabled(UpdateAuthorizationStateModel model) { var authorizations = _systemFormFinder.Query(x => x.Where(w => w.AuthorizationEnabled == true && w.FormType == (int)FormType.Main)); if (authorizations.NotEmpty()) { _systemFormUpdater.UpdateAuthorization(false, authorizations.Select(x => x.SystemFormId).ToArray()); } if (Arguments.HasValue(model.ObjectId)) { _systemFormUpdater.UpdateAuthorization(true, model.ObjectId); } return(SaveSuccess()); }
public IActionResult SetFormAuthorizationState([FromBody] SetFormAuthorizationStateModel model) { return(_systemFormUpdater.UpdateAuthorization(model.IsAuthorization, model.RecordId).UpdateResult(T)); }