Ejemplo n.º 1
0
        public WebApiController(
			WebApiSettings settings,
			IWebApiPluginService webApiPluginService,
			AdminAreaSettings adminAreaSettings,
			ICommonServices services)
        {
            _webApiSettings = settings;
            _webApiPluginService = webApiPluginService;
            _adminAreaSettings = adminAreaSettings;
            _services = services;
        }
		public void Copy(WebApiSettings settings, bool fromSettings)
		{
			if (fromSettings)
			{
				ValidMinutePeriod = settings.ValidMinutePeriod;
				LogUnauthorized = settings.LogUnauthorized;
			}
			else
			{
				settings.ValidMinutePeriod = ValidMinutePeriod;
				settings.LogUnauthorized = LogUnauthorized;
			}
		}
Ejemplo n.º 3
0
 public void Copy(WebApiSettings settings, bool fromSettings)
 {
     if (fromSettings)
     {
         ValidMinutePeriod = settings.ValidMinutePeriod;
         NoRequestTimestampValidation = settings.NoRequestTimestampValidation;
         LogUnauthorized = settings.LogUnauthorized;
     }
     else
     {
         settings.ValidMinutePeriod = ValidMinutePeriod;
         settings.NoRequestTimestampValidation = NoRequestTimestampValidation;
         settings.LogUnauthorized = LogUnauthorized;
     }
 }
		public WebApiController(
			IPermissionService permissionService,
			WebApiSettings settings,
			ISettingService settingService,
			IWebApiPluginService webApiPluginService,
			AdminAreaSettings adminAreaSettings,
			ILocalizationService localizationService)
		{
			_permissionService = permissionService;
			_webApiSettings = settings;
			_settingService = settingService;
			_webApiPluginService = webApiPluginService;
			_adminAreaSettings = adminAreaSettings;
			_localizationService = localizationService;
		}
Ejemplo n.º 5
0
		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();

			WebApiCaching.Remove(WebApiControllingCacheData.Key);
			WebApiCaching.Remove(WebApiUserCacheData.Key);
		}