Пример #1
0
        public IActionResult RegionSet(string regionSetId)
        {
            var userId = User.GetUserId();

            if (_worldService.CanViewRegionSet(userId, regionSetId))
            {
                RegionSet model = _worldService.GetRegionSet(regionSetId);
                ViewBag.CanEdit = _worldService.CanEditRegionSet(userId, regionSetId);
                ViewBag.Owner   = _userRepository.GetUser(model.OwnerId);
                return(View(model));
            }
            return(RedirectToAction("Index"));
        }