Exemplo n.º 1
0
        public async Task <IActionResult> CreateRole([FromBody] RoleNewModel objInput)
        {
            //var IsValidClaim = HttpContext.ValidatePermission("2");
            //if (!IsValidClaim)
            //    return Unauthorized("you don't have permission");


            var blUser = await _userManager.CreateRole(objInput.Name);

            if (blUser.Status == HttpStatusCode.OK)
            {
                return(Ok(blUser));
            }

            else
            {
                return(BadRequest(blUser));
            }
        }