public virtual async Task <IActionResult> GetById(int id)
        {
            int?categoryId = await materialsManager.GetMaterialCategoryIdAsync(id);

            if (categoryId == null)
            {
                return(BadRequest());
            }

            var category = categoriesCache.GetCategory(categoryId.Value);

            if (!materialsAuthorization.CanGet(User.Roles, category))
            {
                return(Unauthorized());
            }


            var materialViewModel = await materialsPresenter.GetViewModelAsync(id);

            return(Json(materialViewModel));
        }