Exemplo n.º 1
0
        public async Task <IActionResult> EditTravel(EditTravelViewModel model)
        {
            if (!User.IsInRole(_configurationManagerHelper.Role_Admin) && model.PartitionKey != User.Identity.Name)
            {
                return(Unauthorized());
            }
            await _travelService.EditAsync(model);

            return(RedirectToAction("Details", "Travel", new { rowKey = model.RowKey, partitionKey = model.PartitionKey }));
        }