Ejemplo n.º 1
0
        public async Task <IActionResult> Update(int Id)
        {
            var CurrentUser = await _userManager.GetUserAsync(User);

            if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString()))
            {
                var ContentType = await _contentTypeProvider.UpdateGet(CurrentUser.Id, Id);

                ContentType = await UpdateAddDropDownBoxes(ContentType, CurrentUser.Id);

                return(Ok(ContentType));
            }
            return(BadRequest(new
            {
                IsSuccess = false,
                Message = "No rights",
            }));
        }