Esempio n. 1
0
        public ActionResult UninstallThemePost(string themeId, string returnUrl, string retryUrl)
        {
            if (String.IsNullOrEmpty(themeId))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            if (_shellSettings.Name != ShellSettings.DefaultName || !Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to remove themes")))
            {
                return(new HttpUnauthorizedResult());
            }

            return(UninstallPackage(PackageBuilder.BuildPackageId(themeId, DefaultExtensionTypes.Theme), returnUrl, retryUrl));
        }