예제 #1
0
        public ActionResult Delete(string id, ServiceHostSettings model)
        {
            var host   = reader.GetServiceHost(id);
            var name   = host.ConfigSet.Name;
            var system = host.ConfigSet.System;

            if (!host.UserHasAccessTo())
            {
                throw new UnauthorizedAccessException("Access denied to configset");
            }
            ViewBag.Id = host.Id;
            reader.DeleteServiceHost(host);
            return(RedirectToAction("Details", "ConfigSet", new { name = name, system = system }));
        }