Exemple #1
0
        public ActionResult DeleteConfirmed(Guid systemid)
        {
            Models.SymbolPackage symbolPackage = _symbolService.GetPackage(systemid);

            ViewBag.IsAdmin = false;
            if (Request.IsAuthenticated)
            {
                ViewBag.IsAdmin = _authorizationService.IsAdmin();
            }

            if (!ViewBag.IsAdmin)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.Unauthorized));
            }

            _symbolService.RemovePackage(systemid);

            return(RedirectToAction("Index"));
        }