public IActionResult AuthorizationEnabled(UpdateAuthorizationStateModel model) { var authorizationViews = _queryViewFinder.Query(x => x.Where(w => w.AuthorizationEnabled == true)); if (authorizationViews.NotEmpty()) { _queryViewUpdater.UpdateAuthorization(false, authorizationViews.Select(x => x.QueryViewId).ToArray()); } if (Arguments.HasValue(model.ObjectId)) { _queryViewUpdater.UpdateAuthorization(true, model.ObjectId); } return(SaveSuccess()); }
public IActionResult SetViewAuthorizationState([FromBody] SetViewAuthorizationStateModel model) { return(_queryViewUpdater.UpdateAuthorization(model.IsAuthorization, model.RecordId).UpdateResult(T)); }