public ActionResult SaveGeneralSettings(WebApiConfigModel model)
		{
			if (!HasPermission(false) || !ModelState.IsValid)
				return Configure();

			model.Copy(_webApiSettings, false);
			_settingService.SaveSetting(_webApiSettings);

			WebApiCaching.Remove(WebApiControllingCacheData.Key);

			return Configure();
		}
		public ActionResult Configure()
		{
			if (!HasPermission(false))
				return AccessDeniedPartialView();

			var model = new WebApiConfigModel();
			model.Copy(_webApiSettings, true);
			
			var odataUri = new Uri(Request.Url,
				WebApiGlobal.MostRecentOdataPath.StartsWith("/") ? WebApiGlobal.MostRecentOdataPath : "/" + WebApiGlobal.MostRecentOdataPath
			);

			model.ApiOdataUrl = odataUri.AbsoluteUri.EnsureEndsWith("/");
			model.ApiOdataMetadataUrl = model.ApiOdataUrl + "$metadata";

			model.GridPageSize = _adminAreaSettings.GridPageSize;

			AddButtonText();

			return View("SmartStore.Plugin.Api.WebApi.Views.WebApi.Configure", model);
		}