Example #1
0
        public override void Uninstall()
        {
            WebApiCachingControllingData.Remove();
            WebApiCachingUserData.Remove();

            _settingService.DeleteSetting <WebApiSettings>();

            base.Uninstall();
        }
Example #2
0
        public override void Install()
        {
            _settingService.SaveSetting(new WebApiSettings());
            _localizationService.ImportPluginResourcesFromXml(PluginDescriptor);

            base.Install();

            WebApiCachingControllingData.Remove();
            WebApiCachingUserData.Remove();
        }
        public override void Uninstall()
        {
            WebApiCachingControllingData.Remove();
            WebApiCachingUserData.Remove();

            _settingService.DeleteSetting <WebApiSettings>();

            _permissionService.UninstallPermissions(new WebApiPermissionProvider());

            base.Uninstall();
        }
        public ActionResult SaveGeneralSettings(WebApiConfigModel model)
        {
            if (!ModelState.IsValid)
            {
                return(Configure());
            }

            model.Copy(_webApiSettings, false);
            Services.Settings.SaveSetting(_webApiSettings);

            WebApiCachingControllingData.Remove();

            return(Configure());
        }
Example #5
0
        public override void Uninstall()
        {
            WebApiCachingControllingData.Remove();
            WebApiCachingUserData.Remove();

            _settingService.DeleteSetting <WebApiSettings>();

            _permissionService.UninstallPermissions(new WebApiPermissionProvider());

            _localizationService.DeleteLocaleStringResources(this.PluginDescriptor.ResourceRootKey);
            _localizationService.DeleteLocaleStringResources("Plugins.FriendlyName.Api.WebApi", false);

            base.Uninstall();
        }
        public override void Install()
        {
            _permissionService.InstallPermissions(new WebApiPermissionProvider());

            var apiSettings = new WebApiSettings
            {
                LogUnauthorized   = true,
                ValidMinutePeriod = WebApiGlobal.DefaultTimePeriodMinutes
            };

            _settingService.SaveSetting <WebApiSettings>(apiSettings);

            _localizationService.ImportPluginResourcesFromXml(this.PluginDescriptor);

            base.Install();

            WebApiCachingControllingData.Remove();
            WebApiCachingUserData.Remove();
        }
Example #7
0
        public ActionResult SaveGeneralSettings(WebApiConfigModel model)
        {
            if (!ModelState.IsValid)
            {
                return(Configure());
            }

            if (!HasPermission(false))
            {
                return(AccessDeniedPartialView());
            }

            model.Copy(_webApiSettings, false);
            _commonServices.Settings.SaveSetting(_webApiSettings);

            WebApiCachingControllingData.Remove();

            return(Configure());
        }