Commit Graph

98 Commits

Author SHA1 Message Date
Bjarke Berg
84237d4a57 Remove Security from UmbracoContext (#9392)
* Remove Security from UmbracoContext

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Removing files reference from csproj

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-11-24 12:52:48 +01:00
Bjarke Berg
bb1b04be15 Netcore: Cleanup and migrate few classes from Umbraco.Web (#9375)
* Migrated a few classes, and cleaned up by removing some old classs too in the Umbraco.Web Project

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Migrated a few classes, and cleaned up by removing some old classs too in the Umbraco.Web Project

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Moved SurfaceControllerTypeCollection + Builder

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Moved Extension methods

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Removed Wrap methods.. People should use their own TagBuilder

Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-11-12 11:01:19 +01:00
Paul Johnson
3f5f85880e NetCore: MSDI refactor split CoreRuntime & Remove Current (#9356)
* Split Bootstrap code from CoreRuntime

* Make ContentService method signatures match interface
prevents need to hide the concrete class in tests

* Remove Current

Only bit that bugs me is TreeNode for IconFilePath
I get the feeling it's dead code, but can just use a setter in cs or work out path in js if required.

* Fix tests, remember to terminate IRuntime
2020-11-10 09:50:47 +01:00
Paul Johnson
4ae329589a NetCore: MSDI refactor remove IFactory & IRegister (#9308)
* Replace IFactory with IServiceProvider

* Replace IRegister with IServiceCollection

* Fix Rte.cshtml so the view can service locate.

* Replace Composing Lifetime with MSDI ServiceLifetime

* Remove ServiceProvider AddMultipleUnique extension

* Remove Umbraco.Web.Composing.Current.Reset and any calls

* Remove LightInject from net framework projects

* Brought back a helper for setting MediaFileSystem underlying IFileSystem
2020-10-30 12:16:17 +01:00
Paul Johnson
ec66990e72 NetCore: MSDI refactor phase 2 (#9280)
* Moved adapters from Infra -> Core

* Allow Composition to accept a service collection instead of an IRegister

* Composition no longer takes IRegister as constructor arg

all tests passing

* Composition no longer implements IRegister

* Lose _uniques in Composition

* lose Composition OnCreatingFactory actions

* Clean up UmbracoCoreServiceCollectionExtensions & Composition

Less IFactory

* LightInject gone where TFW == netstandard2.0 || TFW == netcoreapp3.1

* Resolve dead code issues

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later.

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later (continued)

Thought the counts were low, it's mostly extension method usage
2020-10-27 11:53:01 +01:00
Bjarke Berg
6905e5e734 Cleanup of different stuff that can be deleted from Umbraco.Web
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-22 12:25:52 +02:00
Emma L Garland
7a570110d0 Netcore/feature/healthcheck replaceconfiglogic (#8934)
* Started moving to JSON instead of config.
Mild refactoring but overall keeping it the same, except for injecting IConfiguration and JSON parsing instead of XML
Tests currently unaffected, need to increase coverage

* Moved to constants for appsettings keys
Moved from IConfiguration to global settings - later to be replaced with IOptions
Updated translation messages
Installed IOptions ready for new PR
Updated to new interface, IConfigurationService

* Post-merge fix

* Namespace move from Umbraco.Web to Umbraco.Core where appropriate

* Renamed abstractsettings (from abstractconfig)
Moving out of configservice into the POCO config check

* Made the IIsCustomErrors healthcheck as obsolete, as no web.config setting). Investigate reintroducing this check in the .NET Core way (UseDevelopment).
Reducing use of abstractsettings as not needed - we don't need a config service to read the config settings anymore as they're all explicit POCOs.
Consolidated health-checks in project.

* Removed test views that weren't meant to be added

* Returned to use of abstractsettings with different use

* Moved more health checks into correct folder/namespace, and enum into their own file

* Correct namespace

* Git history/compare lost due to file move, temporarily moving back to original folder. Will do another PR to move after this

* Use existing GetStatus in abstract check for Debug mode

* Updating to return to previous logic and putting files back into line

* Macro errors returned to previous logic

* Reuse abstractsettings class

* Swapped order to assist with reviewing PR

* Updated to include itempath

* Not implemented comment to avoid confusion
Implemented NotificationEmailCheck

* Changed to IOptionsMonitor as per PR comments. Removed configurationservice as we need to rethink the fixing strategy. Updated logger.
Needs to show fix message instead of fixing. Temporary fix for IIS version

* Switched to IOptionsMonitor for all

* No longer attempts to actually fix header in config. Still need to show suggestions.

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-10-21 11:29:25 +02:00
Mole
d750d2c2c1 Use generic logger more places and clean up 2020-09-28 14:59:17 +02:00
Mole
1fdebb6bd9 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
# Conflicts:
#	src/Umbraco.Web.BackOffice/Runtime/BackOfficeComposer.cs
#	src/Umbraco.Web/Editors/BackOfficeController.cs
2020-09-22 13:49:25 +02:00
Bjarke Berg
a28168667b Merge remote-tracking branch 'origin/netcore/dev' into netcore/netcore
Signed-off-by: Bjarke Berg <mail@bergmania.dk>

# Conflicts:
#	src/Umbraco.Core/Editors/BackOfficePreviewModel.cs
#	src/Umbraco.Core/Models/IconModel.cs
#	src/Umbraco.Web.BackOffice/Controllers/IconController.cs
#	src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs
#	src/Umbraco.Web.UI.NetCore/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Web.UI/config/umbracoSettings.config
#	src/Umbraco.Web/Editors/BackOfficeController.cs
#	src/Umbraco.Web/Editors/BackOfficeModel.cs
#	src/Umbraco.Web/Runtime/WebInitialComposer.cs
2020-09-22 13:28:03 +02:00
Bjarke Berg
bd534d340e Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
Signed-off-by: Bjarke Berg <mail@bergmania.dk>

# Conflicts:
#	src/Umbraco.Infrastructure/Services/Implement/IIconService.cs
#	src/Umbraco.Infrastructure/Services/Implement/IconService.cs
#	src/Umbraco.Web.UI/Umbraco/Views/Default.cshtml
#	src/Umbraco.Web/Editors/BackOfficeController.cs
#	src/Umbraco.Web/Editors/BackOfficeModel.cs
#	src/Umbraco.Web/Editors/BackOfficePreviewModel.cs
#	src/Umbraco.Web/Editors/IconController.cs
#	src/Umbraco.Web/Editors/PreviewController.cs
#	src/Umbraco.Web/Runtime/WebInitialComposer.cs
2020-09-22 12:38:36 +02:00
Bjarke Berg
ccc0e82579 #8919 - Avoid having fat controller and do not new up a controller in a model 2020-09-22 08:58:16 +02:00
Mole
3be396f384 Use Factory.GetInstance in Current 2020-09-21 15:12:14 +02:00
Mole
d3ae921293 Remove most of the last references and rename LoggerFactory_ to LoggerFactory in UmbracoTestBase 2020-09-21 13:04:57 +02:00
Mole
d61b9f54fa Merge options 2020-09-18 12:53:06 +02:00
Nikolaj
120e163682 Begin trying to replace logger in Current 2020-09-16 13:46:45 +02:00
Nikolaj
80ee2356d5 Fix a bunch of tests and try to add ILoggerFactory to Current 2020-09-16 08:57:06 +02:00
Bjarke Berg
a4e5029912 Refactored to remove Configs 2020-09-10 13:51:59 +02:00
Bjarke Berg
f86d8185bf Clean up and based on review comments 2020-06-11 11:21:07 +02:00
Bjarke Berg
1d543d1dfd Migrated MacroRenderingController + Related UmbracoComponentRenderer => TemplateRenderer + ParitalViewMacroEngine 2020-06-05 06:31:42 +02:00
Shannon
18b285f088 Splits profiler so it doesn't have to take a dependency since we don't want to pre-resolve. Adds enrichers to the container. 2020-04-22 15:23:51 +10:00
Shannon
32deaa12d2 Removes unneeded methods/properties in abstraction, removes unneeded usages of it, changes everything to pre-defined bundles, fixes cdf implementation and reduces reflection, renames namespace 2020-04-02 17:41:00 +11:00
Bjarke Berg
629be33357 Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/AB5822-smidge-implementation
# Conflicts:
#	src/Umbraco.Web.BackOffice/AspNetCore/UmbracoCoreServiceCollectionExtensions.cs
#	src/Umbraco.Web.UI.NetCore/Startup.cs
#	src/Umbraco.Web/Editors/PackageInstallController.cs
#	src/Umbraco.Web/UrlHelperExtensions.cs
2020-03-26 06:53:05 +01:00
Shannon
a0acc8126d oops change namespace back to Umbraco.net 2020-03-25 16:52:42 +11:00
Shannon
900505704c Committing a namespaces change 2020-03-25 14:54:45 +11:00
Elitsa Marinovska
7d2f5aee49 Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/AB5490-abstract-clientdependency
# Resolved Conflicts:
#	src/Umbraco.Web.UI/Umbraco/Views/AuthorizeUpgrade.cshtml
#	src/Umbraco.Web.UI/Umbraco/Views/Default.cshtml
#	src/Umbraco.Web/Composing/Current.cs
#	src/Umbraco.Web/Editors/BackOfficeController.cs
#	src/Umbraco.Web/Editors/BackOfficeServerVariables.cs
#	src/Umbraco.Web/Editors/PreviewController.cs
#	src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs
2020-03-17 11:01:32 +01:00
Elitsa Marinovska
4b7d823aca Injecting the abstraction whenever necessary 2020-03-17 10:28:03 +01:00
Bjarke Berg
da7552204d Merge remote-tracking branch 'origin/v8/dev' into netcore/dev
# Conflicts:
#	src/Umbraco.Web/Models/RegisterModel.cs
#	src/Umbraco.Web/UmbracoHelper.cs
2020-03-11 07:44:17 +01:00
Bjarke Berg
6241bee1b2 Introduce methods on current, that can be necessary if not using the obsolete properties. 2020-03-04 13:49:13 +01:00
Elitsa Marinovska
84f19e093a NetCore: Refactor internal usages of UmbracoHelper (#7744)
* Removing properties related to IPublishedContentQuery, ITagQuery, ICultureDictionaryFactory, IUmbracoComponentRenderer from UmbracoHelper and using the corresponding private fields instead. Removing Media related methods

* Removed UmbracoHelper from UmbracoApiControllerBase

* Removed UmbracoHelper references

* Inject the needed Interfaces to classes that previously used UmbracoHelper to get the same functionality

* Fixed tests referencing UmbracoHelper

* Adding Media methods back

* Cleanup and moved UmbracoHelper from more base classes, when not used + simplified tests

* Reintroduced some methods..

* Reintroduced some methods..

* Reintroducing last missing bits

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2020-03-03 11:59:17 +01:00
Bjarke Berg
f0dee45069 Refactored UmbracoApplication.Restart 2020-02-27 10:55:07 +01:00
Bjarke Berg
43b33f9e6b Move features
- Introduced IUmbracoFeature
Move Install
Move Tree Items
 - Introduced IMenuItemCollectionFactory - to insure injection of ActionCollection
2020-02-17 14:58:34 +01:00
Bjarke Berg
c6e1e7b3e5 Untangled UrlProvider from UmbracoContext 2020-02-14 13:06:10 +01:00
Bjarke Berg
c335a8dbb5 Introduced interface on UmbracoContext 2020-02-09 19:05:39 +01:00
Shannon
11f5d2f800 Fixes startup - no need for using "Current" which wasn't set at that point but shouldn't have been used anyways. 2020-01-15 13:53:21 +11:00
Bjarke Berg
d2443ea4c0 AB3677 - Removed the Core.Composing.Current.. Moved stuff to Web.Composing.Current and injected more stuff. 2020-01-07 13:08:21 +01:00
Bjarke Berg
d5527f0485 AB3677 - Removed lot of stuff from Current (Core) and uses Current (Web) instead 2019-12-19 10:43:34 +01:00
Bjarke Berg
aa15f89275 Merge remote-tracking branch 'origin/v8/feature/media-tracking' into netcore/dev
# Conflicts:
#	src/Umbraco.Abstractions/Models/IDataValueEditor.cs
#	src/Umbraco.Abstractions/Models/RelationType.cs
#	src/Umbraco.Core/Contants-UdiEntityType.cs
#	src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Core/Udi.cs
#	src/Umbraco.Tests/Models/RelationTests.cs
#	src/Umbraco.Tests/Models/RelationTypeTests.cs
#	src/Umbraco.Tests/Persistence/Repositories/MediaRepositoryTest.cs
#	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
#	src/Umbraco.Tests/Published/NestedContentTests.cs
#	src/Umbraco.Tests/PublishedContent/PublishedContentTestBase.cs
#	src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs
#	src/Umbraco.Tests/Services/ContentServicePerformanceTest.cs
#	src/Umbraco.Tests/Testing/UmbracoTestBase.cs
#	src/Umbraco.Tests/Web/TemplateUtilitiesTests.cs
#	src/Umbraco.Web/Editors/MediaController.cs
#	src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs
#	src/Umbraco.Web/Runtime/WebInitialComposer.cs
#	src/Umbraco.Web/Templates/TemplateUtilities.cs
#	src/Umbraco.Web/UmbracoComponentRenderer.cs
2019-12-10 14:44:42 +01:00
Warren Buckley
9e1a56eba5 Rename from DataValueReferenceFor to DataValyeReferenceFactory & Factories for the plural collection 2019-12-04 16:14:33 +00:00
Bjarke Berg
886a298b3d AB3981 - Review fixes - Moved abstractions into namespace folders, removed code that was commented out, removed unused code, added xml doc 2019-12-04 10:39:49 +01:00
Warren Buckley
1471bffeff Adds DataValueReferenceFor & its collection 2019-12-02 15:00:56 +00:00
Warren Buckley
7573d52807 Initial plumbing, extension methods etc for collection to store IDataValueReferences 2019-11-26 11:09:33 +00:00
Bjarke Berg
969832310e Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/core-cannot-use-system-web 2019-11-26 08:47:33 +01:00
Bjarke Berg
54bd658d41 Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/core-cannot-use-system-web 2019-11-21 09:34:14 +01:00
Bjarke Berg
fc22282a59 Injecting IHostingEnvironment 2019-11-20 15:21:09 +01:00
Bjarke Berg
caa8ccd306 AB3869 - Removed UmbracoVersion from Core Current 2019-11-20 11:36:17 +01:00
Carole Rennie Logan
100d4431dc removing unused using statements 2019-11-19 23:24:08 +00:00
Bjarke Berg
126380dcee AB3594 - Removed references from core to configuration 2019-11-14 12:49:56 +01:00
Bjarke Berg
683c0da468 Moved stuff from SystemDirectories into constants and IOHelper to avoid a circular dependency 2019-11-13 11:56:32 +01:00
Bjarke Berg
0fcf8325e3 Changed SystemDirectories from static to instance, Added interface in abstractions and create a static property on current. 2019-11-12 15:25:21 +01:00