示例#1
0
        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());
        }
示例#2
0
 public IActionResult SetViewAuthorizationState([FromBody] SetViewAuthorizationStateModel model)
 {
     return(_queryViewUpdater.UpdateAuthorization(model.IsAuthorization, model.RecordId).UpdateResult(T));
 }