Example #1
0
        public async Task <ActionResult> UpdateSection([FromBody] SectionDto toUpdate)
        {
            if (!this.HttpContext.Session.HasSystemActionRights() || !this.HttpContext.Session.HasSystemActionRight(ActionRights.SystemManagement))
            {
                return(RedirectToAction("Index", "Home"));
            }

            var result = await SectionManager.ModifySectionAsync(toUpdate);

            if (result)
            {
                _cache.Remove(CacheKeys.AllSections);
            }

            // jsGrid requires the updated object as return value.
            return(Json(toUpdate));
        }