示例#1
0
        public ActionResult RemoveThemePOST(string themeId, string returnUrl, string retryUrl)
        {
            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));
        }
示例#2
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));
        }