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 AuthorizationEnabled(UpdateAuthorizationStateModel model) { var authorizations = _ribbonButtonFinder.Query(x => x.Where(w => w.AuthorizationEnabled == true)); if (authorizations.NotEmpty()) { _ribbonButtonUpdater.UpdateAuthorization(false, authorizations.Select(x => x.RibbonButtonId).ToArray()); } if (Arguments.HasValue(model.ObjectId)) { _ribbonButtonUpdater.UpdateAuthorization(true, model.ObjectId); } return(SaveSuccess()); }
public IActionResult AuthorizationEnabled(UpdateAuthorizationStateModel model) { var authorizations = _privilegeService.Query(x => x.Where(w => w.AuthorizationEnabled == true)); if (authorizations.NotEmpty()) { _privilegeService.UpdateAuthorization(false, authorizations.Select(x => x.PrivilegeId).ToArray()); } if (Arguments.HasValue(model.ObjectId)) { _privilegeService.UpdateAuthorization(true, model.ObjectId); } return(SaveSuccess()); }