Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
 public IActionResult SetFormAuthorizationState([FromBody] SetFormAuthorizationStateModel model)
 {
     return(_systemFormUpdater.UpdateAuthorization(model.IsAuthorization, model.RecordId).UpdateResult(T));
 }