Commit Graph

171 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
296217c917 Remove old BackOfficeServerVariables and LightInjectContainer 2020-10-14 13:40:10 +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
1594a84d80 migated remaining backoffice controllers
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-22 10:08:08 +02:00
Bjarke Berg
27fee12230 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-remaining-trees 2020-06-11 12:40:17 +02:00
Bjarke Berg
f86d8185bf Clean up and based on review comments 2020-06-11 11:21:07 +02:00
Bjarke Berg
aa7637129c Fix tests by reintroducing some files in Umbraco.Web
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-10 19:23:56 +02:00
Bjarke Berg
835b04273f Migrated remaining *TreeController's
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-06-10 19:22:25 +02:00
Bjarke Berg
1d543d1dfd Migrated MacroRenderingController + Related UmbracoComponentRenderer => TemplateRenderer + ParitalViewMacroEngine 2020-06-05 06:31:42 +02:00
Shannon
9818b4a14b Moves what is possible for identity back office to Core, configures backoffice identity with IOptions and our password settings 2020-05-20 15:25:42 +10:00
Scott Brady
c92c633edb Reduced duplicated code 2020-05-18 08:21:34 +01:00
Bjarke Berg
f79526e46a Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/AB6233-install-steps-in-dotnet-core
# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/CoreInitialComposer.cs
#	src/Umbraco.Web.Common/Runtime/AspNetCoreComposer.cs
2020-04-24 08:23:55 +02:00
Bjarke Berg
79e9235338 AB#6233 - Install in .NET Core 2020-04-22 08:17:45 +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
Bjarke Berg
7c87ec3141 Merge remote-tracking branch 'origin/netcore/feature/AB5822-smidge-implementation' into netcore/feature/ab5819-initialize-composers 2020-04-03 10:12:10 +02: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
97cf099f9f AB#5819 - Moved composing of core/infrastructure items into CoreInitialComposer 2020-04-01 20:00:27 +02: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
5293a3c1b5 Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/AB5490-abstract-clientdependency 2020-03-23 12:50:16 +01:00
Bjarke Berg
f3e3ac8969 Removed Machine key stuff 2020-03-19 19:11:57 +01: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
Shannon Deminick
7f8c7e472f Merge pull request #7778 from umbraco/netcore/feature/typefinder-netstandard
Creates a netstandard compliant TypeFinder
2020-03-13 11:11:50 +11: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
Shannon
5ee2286436 Removes build manager type finder and friends 2020-03-11 12:43:46 +11:00
Shannon
d92fc8736a More cleanup, cleans up tests, cleans up the BuildManagerAssemblyProvider (even though it's not used) 2020-03-09 13:31:56 +11:00
Shannon
41c2d01078 initial POC code 2020-03-09 11:03:42 +11: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
Bjarke Berg
53953338d8 Merged Umbraco.Abstractions into Umbraco.Core 2020-03-03 13:42:07 +01:00
cyberdot
efd8e37f34 Merge branch 'netcore/dev' into temp-7667 2020-03-03 12:05:31 +00:00
cyberdot
01362d0dd0 NetCore: Abstract ConfigurationManager references 2020-03-03 11:18:54 +00: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