Commit Graph

337 Commits

Author SHA1 Message Date
Shannon
f93fee28dd U4-8165 Ensure browsers are not caching service requests 2016-03-16 14:51:04 +01:00
Shannon
e60e4e52fc U4-7708 Using a RTE Macro Partial Form (SurfaceController) & Doctype Hijack Controller causes problem with submissions 2016-03-10 18:00:14 +01:00
Shannon
b9765c3bec fixes RenderModelBinder to use base implementation,adds unit tests 2016-03-07 17:52:28 +01:00
Shannon
5f365241a8 updates RenderModelBinder to simply check for IPublishedContent or IRenderModel 2016-03-07 16:29:40 +01:00
Shannon
9c121f0044 Fixes RenderModelBinder to inherit from DefaultModelBinder and use the default logic if the model in the route values is not IRenderModel 2016-03-07 16:26:30 +01:00
Stephan
04b3532e9d U4-8030 - Fix RenderModelBinder issue with surface 2016-02-22 18:38:06 +01:00
Stephan
ffada74aa4 Improve RenderModelBinder error msg when same type, different assemblies 2016-02-18 16:04:45 +01:00
Shannon
640b2c0ee0 Moves strings to constants, adds ControllerContextExtensions to get the UmbracoContext from the hierarchy of ControllerContext's, changes RenderModelBinder to use this method to get the UmbracoContext, changes UmbracoViewPageOfTModel to use this method to get the UmbracoContext, adds RouteDataExtensions to get the UmbracoContext from routedata, adds extension methods on the HttpContext to get the UmbracoContext from it. 2016-02-16 11:17:47 +01:00
Sebastiaan Janssen
0a26e482aa Fixes another reported bug for U4-7950 2016-02-16 09:01:28 +01:00
Sebastiaan Janssen
f31b6d9c2c Use CultureInfo.CurrentCulture if UmbracoContext.PublishedContentRequest is not available 2016-02-15 08:27:07 +01:00
Stephan
81754b37a4 Add support for models in controllers 2016-01-27 12:05:22 +01:00
Stephan
9f360c2b9b Fix test broken by PR #1027 2016-01-19 12:52:43 +01:00
Stephan
a1b98b6e31 U4-7754 - fix UmbracoViewPage with models 2016-01-18 17:35:26 +01:00
Shannon
18c3345e47 Fixes U4-7459 XSRF protection bypass - ensures tokens are checked for the non-editor api controllers 2015-11-25 19:39:24 +01:00
Claus
2c63866cb3 Merge pull request #909 from umbraco/U4-7270-1
Creates an IAsyncRenderMvcController which can be used instead of IRe…
2015-11-24 10:09:45 +01:00
kiasyn
f83c966e55 Remove unnecessary ToLowerInvariant call from PreviewMode
Text was being set lowercase and then injected with the preview badge markup. This meant that things such as script tags were being lowercased, breaking the javascript.
2015-11-24 10:02:14 +13:00
Shannon
916bad82df Ensures that the RenderActionInvoker isn't doing anything special so that MVC takes care of everything regarding async vs non-async and any controller descriptor/action descriptor lookups and cache. Creates a RenderIndexActionSelectorAttribute - this is used to decorate the underlying RenderMvcController.Index action. MVC will call into this method to check if the MethodInfo is valid, we then do a quick comparison of types, if the current type is the same as the reflected type, this means that the Index action has been overridden or there is no custom controller... lets use it. If the types don't match we'll do a simple reflected lookup to check if the reflected controller type (current controller) has more than one index action, if so, it means that a custom controller is in play and it has a custom index action... so we won't use the base class action and then it's up to MVC to find any other matching Index action based on the current request parameters. Added some tests for this too. 2015-11-18 14:59:29 +01:00
Shannon
9fd80d791a Creates an IAsyncRenderMvcController which can be used instead of IRenderMvcController if developers want access to an async Index action. 2015-11-17 17:05:00 +01:00
Shannon
ecbced5c62 Massively simplifies the RenderActionInvoker which will support the native MVC caching and both async and non async support. U4-7270 Async Index actions for controllers implementing IRenderMvcController do not render view correctly 2015-10-28 14:31:40 +01:00
Shannon Deminick
7b8b7ed170 Merge pull request #837 from digbyswift/dev-v7
U4-7270 - Addition of allowance for async/await Index actions
2015-10-28 12:33:32 +01:00
Kieron McIntyre
db6755a5bb Addition of allowance for async/await Index actions 2015-10-23 10:04:14 +01:00
Damiaan
6d5a8c0db7 U4-7087 make pageId getter public to be able to unittest 2015-09-10 18:11:18 +02:00
Shannon
cd3c17d73f Obsoletes AllowAll on MemberAuthorizeAttribute 2015-08-21 12:15:45 +02:00
Sebastiaan Janssen
3133014650 Removes more references to FixedDisplayModes 2015-07-30 17:39:07 +02:00
Sebastiaan Janssen
d87b268a40 Update to MVC5 2015-07-30 17:08:39 +02:00
Shannon
96cd4daca5 Fixes how modelstate and viewdata get populated into the PartialViewMacroController and in turn get populated into the viewresult, privatize's EnsureViewObjectDataOnResult so that it's not used by accident elsewhere 2015-07-22 18:25:08 +02:00
Sebastiaan Janssen
0bbe1c6cdc U4-6721 Error when submitting Macros, Collection was modified; enumeration operation may not execute. (after project has been updated to MVC5)
#U4-6721 In Progress
2015-07-21 19:35:00 +02:00
Sebastiaan Janssen
34f44b02a2 U4-6721 Error when submitting Macros, Collection was modified; enumeration operation may not execute. (after project has been updated to MVC5)
#U4-6721 In Progress
2015-07-21 15:55:39 +02:00
Stephan
ee0297bb69 U4-6631 - throw on missing physical template file 2015-06-15 17:36:53 +02:00
Stephan
dffe09af58 Merge remote-tracking branch 'origin/dev-v7' into 7.3.0
Conflicts:
	src/Umbraco.Web/UmbracoModule.cs
2015-06-04 18:32:54 +02:00
Shannon
8e114f1e8f Scheduled publishing is executing request async with cancellation token 2015-06-04 11:49:58 +02:00
Shannon
73c34fda9c Merge branch 'dev-v7' of https://github.com/michaeljfarr/Umbraco-CMS into michaeljfarr-dev-v7
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Core/packages.config
	src/Umbraco.Web/Umbraco.Web.csproj
2015-05-14 08:38:51 +10:00
Shannon
f87764f9d5 a bit better support for unit testing controllers with ctor overloads 2015-04-13 20:13:57 +10:00
Shannon
a1c7352da1 Merge branch 'dev-v7' into 7.3.0
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Tests/Integration/GetCultureTests.cs
	src/Umbraco.Tests/Models/ContentTests.cs
	src/Umbraco.Tests/Models/ContentTypeTests.cs
	src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs
	src/Umbraco.Tests/Routing/DomainsAndCulturesTests.cs
	src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs
	src/Umbraco.Tests/Services/ContentTypeServiceTests.cs
	src/Umbraco.Web/Models/ContentExtensions.cs
	src/Umbraco.Web/Mvc/SurfaceController.cs
2015-04-09 16:50:07 +10:00
michael
ae3c17073b Move MVC dependencies from Umbraco.Core to Umbraco.Web
note:MvcHandler.DisableMvcResponseHeader = true was removed from UmbracoApplicationBase.StartApplication.
This was the only breaking change, it can be put back in at a higher level if necessary.
2015-04-06 16:48:55 +12:00
AndyButland
437e7f0ffc Removed unused usings from previous commit 2015-04-01 23:29:43 +02:00
AndyButland
afa6c35bb5 Added overloads to RedirectToUmbracoPage methods to allow passing of a querystring 2015-04-01 23:27:20 +02:00
Shannon
349cb91e3a updates expires logic 2015-04-01 13:42:24 +11:00
Shannon
52c4d80cfc more identity awesome 2015-04-01 13:41:33 +11:00
Shannon
d3eff734aa Merge branch 'dev-v7' into 7.3.0
Conflicts:
	build/UmbracoVersion.txt
	src/Umbraco.Core/Configuration/UmbracoVersion.cs
	src/Umbraco.Core/CoreBootManager.cs
	src/Umbraco.Core/Models/Template.cs
	src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs
	src/Umbraco.Core/PropertyEditors/ParameterEditorResolver.cs
	src/Umbraco.Core/PropertyEditors/PropertyEditorResolver.cs
	src/Umbraco.Core/Services/LocalizedTextService.cs
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Tests/Plugins/TypeFinderTests.cs
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web/Editors/BackOfficeController.cs
	src/Umbraco.Web/Models/ContentExtensions.cs
	src/Umbraco.Web/PublishedContentExtensions.cs
	src/Umbraco.Web/Routing/PublishedContentRequestEngine.cs
	src/Umbraco.Web/Scheduling/Scheduler.cs
	src/Umbraco.Web/Umbraco.Web.csproj
2015-03-19 17:37:00 +11:00
Shannon
9469b0b844 Fixes: U4-6402 Grid config file should be merged with package.manifests & U4-6427 Grid config file has caching problems because it's downloaded as a static file
This also fixes up the OutputCaching params on the BackOfficeController since OutputCache is bypassed when an action requires authentication, so now we manually do some caching when not in debug mode for authorized actions (of course auth happens before any cached response can occur). This also fixes up the static caching that was happening with the ManifestBuilder so now when that is not in use it gives back it's memory. This also fixes up any client side caching that was happening on BackOfficeController - before we were allowing client cache to happen for a few actions on that controller which is incorrect, we need to disable all client cache for all actions on that controller.
2015-03-19 13:53:15 +11:00
Shannon
6670f7036b publicizes RouteDefinition 2015-02-18 17:30:44 +01:00
Shannon
ca20fb799d publicizes RouteDefinition 2015-02-18 17:28:21 +01:00
Shannon
c760a7c50d Merge branch 'dev-v7-7.3.0-UmbHelperInterfaces' of https://github.com/Shazwazza/Umbraco-CMS into Shazwazza-dev-v7-7.3.0-UmbHelperInterfaces
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
2015-02-18 17:14:55 +01:00
Shannon
428df7ae4a Merge branch 'dev-v7' into 7.3.0
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Web.UI/packages.config
	src/Umbraco.Web/Umbraco.Web.csproj
2015-02-17 15:11:10 +01:00
Shannon
1cb0cd296c Decoupling more things, mostly to do with the PluginManager and logging which now requires an IServiceProvider so have created a simple instance of that. 2015-01-16 15:47:44 +11:00
Shannon
97c18980d8 fixes some tests 2015-01-09 11:07:38 +11:00
Shannon
defc9d3bc2 Updated all repo's to have their correct ctor's with their correct dependencies. Updated them all to accept ILogger updated all other dependencies with the same without breaking anything since all is internal, or obsoleted other public methods. Updates lots of the tests with mock instances instead, now more tests have less singleton dependencies, easier to test, much clearer and more IoC driven. Updated unit tests to supply the ILogger for required objects, tests should run faster now since most things are just mocked. 2015-01-09 10:51:15 +11:00
Shannon
77e672aec1 Exposes an ILogger property called Logger on all relevant base classes 2015-01-07 17:38:25 +11:00
Shannon
4a72e8c3df Creates ReflectedFixedRazorViewEngine and version checkers to dynamically update code depending on the major versions of MVC and WebApi 2015-01-06 17:40:28 +11:00