Commit Graph

40895 Commits

Author SHA1 Message Date
Paul Johnson
eb841a7b98 Remove database properties from IScope 2022-01-13 17:44:40 +00:00
Paul Johnson
022042a0ce EntityService should delegate more to repository. 2022-01-13 17:44:39 +00:00
Paul Johnson
4a477c7378 Expose IQuery<T> from ScopeProvider.
So that it can be used without requiring visibility of ISqlContext.
2022-01-13 15:51:30 +00:00
Paul Johnson
3b51850e56 IUmbracoDatabase shouldn't be registered singleton. 2022-01-13 15:28:12 +00:00
Paul Johnson
8719010e8a Remove unused property from Scope 2022-01-13 10:07:08 +00:00
Paul Johnson
d543dccb27 Attempt to make Scope.RobustExit clearer. 2022-01-13 09:56:08 +00:00
Paul Johnson
3258a676c0 ScopeProvider can create its own logger if required. 2022-01-13 09:31:08 +00:00
Paul Johnson
71ce038330 Scope no longer uses MediaFileManager.
Deleting media via services results in a published MediaDeletedNotification
via scope.Notifications, these are fired on Scope.Complete() and picked up
by the registered handlers.
2022-01-13 09:24:30 +00:00
Paul Johnson
ae2ff856fb Remove IEventDispatcher, it's no longer used. 2022-01-11 17:02:20 +00:00
Paul Johnson
8d1fa717ba cherry-pick Misc/obsolete redundant extension (#11838)
* Mark AddUnique<TImplementing> obsolete.

* Remove all internal usages of AddUnique<TImplementing>.
2022-01-11 08:46:56 +00:00
Bjarke Berg
11eaf176a9 Fixed a few warnings 2021-12-15 16:22:27 +01:00
Bjarke Berg
6c8ea465e2 Merge remote-tracking branch 'origin/v9/9.2' into v10/dev 2021-12-15 14:49:46 +01:00
nikolajlauridsen
e5deb7fe8c Fix LogViewerController ambiguous constructor 2021-12-15 14:42:18 +01:00
Bjarke Berg
47c1058195 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
2021-12-15 14:41:49 +01:00
Bjarke Berg
694a636746 Fix breaking change 2021-12-15 11:53:16 +01:00
Bjarke Berg
d41fca73a1 Unbreak breaking changes 2021-12-15 11:47:45 +01:00
nikolajlauridsen
908c89f4b3 Fix breaking change in ReportSiteTask 2021-12-15 11:38:17 +01:00
Bjarke Berg
99597734ca Merge remote-tracking branch 'origin/v9/dev' into v9/dev 2021-12-15 08:31:28 +01:00
Bjarke Berg
e991bb79d7 Merge pull request #11762 from umbraco/v9/feature/merge_v8_14-12-2021
Merge v8/dev into v9/dev 14/12/2021
2021-12-14 22:17:25 +01:00
Bjarke Berg
341aac44b5 Fixed tests after merge 2021-12-14 21:24:19 +01:00
Bjarke Berg
69b8b64b54 Merge remote-tracking branch 'origin/v8/dev' into v9/feature/merge_v8_14-12-2021
# Conflicts:
#	src/Umbraco.Core/Constants-Conventions.cs
#	src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
#	src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Core/Models/IContentType.cs
#	src/Umbraco.Core/Packaging/PackageDataInstallation.cs
#	src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs
#	src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs
#	src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs
#	src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs
#	src/Umbraco.Core/Services/Implement/MemberService.cs
#	src/Umbraco.Tests/Packaging/PackageDataInstallationTests.cs
#	src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs
#	src/Umbraco.Tests/Services/Importing/ImportResources.Designer.cs
#	src/Umbraco.Tests/Services/Importing/ImportResources.resx
#	src/Umbraco.Tests/Umbraco.Tests.csproj
#	src/Umbraco.Web.UI.Client/src/common/directives/components/localization/localize.directive.js
#	src/Umbraco.Web.UI.Client/src/common/services/umbdataformatter.service.js
#	src/Umbraco.Web.UI.Client/src/views/content/content.rights.controller.js
#	src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html
#	src/Umbraco.Web.UI.Client/src/views/member/apps/content/content.html
#	src/Umbraco.Web.UI/Umbraco/Views/Default.cshtml
#	src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/zh.xml
#	src/Umbraco.Web.UI/config/BackOfficeTours/getting-started.json
#	src/Umbraco.Web/HealthCheck/Checks/Security/ExcessiveHeadersCheck.cs
#	src/Umbraco.Web/Models/ContentEditing/MemberDisplay.cs
#	src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs
#	src/Umbraco.Web/Models/Mapping/MemberMapDefinition.cs
#	src/Umbraco.Web/Models/Mapping/MemberTabsAndPropertiesMapper.cs
#	src/Umbraco.Web/Models/Mapping/TabsAndPropertiesMapper.cs
#	src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs
#	src/Umbraco.Web/Runtime/WebInitialComposer.cs
#	src/Umbraco.Web/Trees/ContentTreeController.cs
#	src/Umbraco.Web/Umbraco.Web.csproj
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/Services/Importing/SingleDocType-WithCleanupPolicy.xml
2021-12-14 20:13:42 +01:00
Mole
2268b1e187 Package telemetry (#11738)
* Add TelemetryService

Currently it only allows you to get a list of the name of all the installed packages

* Create model class for package telemetry

And move the telemetry report data out of ReportSiteTask

* Add version as an option in package manifest

* Use TelemetryService to generate telemetry data

Instead of doing it directly in the ReportSiteTask

* Seal TelemetryService

This should not be overwritten

* Add option for package creators to opt out

* Add global setting to restrict package telemetry

* Add TelemetryService unit tests

* Add ManifestParser tests for new properties

* Clean

* Update src/Umbraco.Core/Telemetry/TelemetryService.cs

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Create interface for telemetry service

* Use IOptionsMonitor instead of IOptions

However I chose to use CurrentValue since according to microsoft: "Some file systems, such as Docker containers and network shares, may not reliably send change notifications.", additionally TelemetryService only runs once pr. day, so it shouldn't be too much of an issue that it doesn't cache the result.

* Use is false instead of negation

It's a bit more readable

* Track restrict package telemetry value

* Save RestrictPackageTelemetry in report data

Not packages, since it'll be the same for all packages

* Fix TelemetryService unit tests

* Clean

* Update src/Umbraco.Core/Telemetry/ITelemetryService.cs

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Remove RestrictPackageTelemetry

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-12-14 16:09:31 +01:00
Mole
cd022af2d7 Merge pull request #11759 from PerplexDaniel/bugfix/11758_umbraco-cshtml-compilation
Ensure Umbraco Razor files are compiled into <project>.Views.dll
2021-12-14 15:47:37 +01:00
Sebastiaan Janssen
a3b721bb4c Merge branch 'v8/contrib' into v8/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
2021-12-14 14:19:59 +01:00
Michael Latouche
e65baae814 Remove the need of Smtp.Host config when using PickupDirectoryLocation (#11548) 2021-12-14 13:56:10 +01:00
Sebastiaan Janssen
bc80892f51 Merge branch 'v9/contrib' into v9/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/directives/components/localization/localize.directive.js
#	src/Umbraco.Web.UI/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
#	tests/Umbraco.Tests.AcceptanceTest/cypress/integration/Languages/languages.ts
2021-12-14 13:32:46 +01:00
Daniël Knippers
95efeeabcf Ensure Umbraco Razor files are compiled into <project>.Views.dll
It worked properly if the Umbraco files are on disk before a build
but when the files are not there yet or a dotnet clean is done first the
files are not compiled. This is often the case on build servers that start
with a clean working directory for each build.

Using this target we simply ensure the files are included as "Content"
which Razor will scan for .cshtml files in their "ResolveRazorGenerateInputs"
target.
2021-12-14 12:25:25 +01:00
Bjarke Berg
0b39741309 Bump version 2021-12-07 08:22:29 +01:00
Elitsa Marinovska
a6903d8abe V9: Display configured log levels (#11715)
* Adding ILogLevelLoader to get Serilog level values (global one and umbraco) and the corresponding dependencies

* Obsoleting old methods

* Fix tests

* Front-end changes

* Changes requested in a review
2021-12-06 11:06:55 +01:00
Paul Johnson
1c36af8c7e Map both settings and content data via property editors. (#11722)
For persistence and rendering property editor frontend components.
2021-12-06 10:35:44 +01:00
Jan Skovgaard
b4059ecfec Listview Datatype: Change from using delete icon to "Remove" text in layouts (#11624)
* Add overlay and texts for overlay

* Change remove icon to remove text
2021-12-06 09:05:08 +10:00
Michael Latouche
6824519cdb Fixes fallback value ignored in Localize directive (#11674)
* addig some French labels

* add intial inner html as fallback value
2021-12-06 08:51:36 +10:00
Nikolaj Brask-Nielsen
4c6d4b9326 Added notifications toggle to user groups (#10450)
* Added notifications toggle

* Review: Update DatabaseDataCreator.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Added migration

* Fix new file was excluded

* adapt DB  migration

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Michael <michael@crossingpaths.be>
2021-12-05 13:27:15 +01:00
Bjarke Berg
568dc19929 Merge remote-tracking branch 'origin/v9/9.1' into v9/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
2021-12-03 07:20:19 +01:00
Bjarke Berg
915f1cb34c V9: Fix for migration of non-default configurated users/members (#11684)
* https://github.com/umbraco/Umbraco-CMS/issues/11366
Fallback to try login using super legacy HMACSHA1 even when the algorithm is stated as being HMACSHA256. The issue is that v8 saves HMACSHA256 on the user, but when configured to use legacy encoding it actually uses HMACSHA1

* Support migration of members with:
UseLegacyEncoding+Clear
UseLegacyEncoding+Encrypted (Requires machine key)
UseLegacyEncoding+Hashed

* Fixes unit tests

* Avoid exceptions + unit tests

* Save unknown algorithm if we dont know it, instead of persisting a wrong algorithm.

* Added setting to enable clear text password rehashes.

* Removed support for migration of clear text passwords

* Fixed unit test
2021-12-02 10:54:24 +00:00
Paul Johnson
fce97314bd Cherry-pick: support import/export for doc type history cleanup policy (#11708)
* cherry-pick 13a51d32 (V8 History cleanup import/export)

Support import/export for doc type history cleanup policy (#11660)

* Support import/export for doc type history cleanup policy

* Support unset/null history cleanup value

* Resolve issue when api endpoints called without cleanup policy.
noop isn't good enough as map fails for response.

* null conditional vs null coalesce assignment

* Don't overwrite existing policy if omitted in import XML

* Update history cleanup warning and translations

* Change history cleanup alert to infomational styling

* Remove margin around history cleanup config

Co-authored-by: Ronald Barendse <ronald@barend.se>
# Conflicts:
#	src/Umbraco.Core/Models/IContentType.cs
#	src/Umbraco.Core/Packaging/PackageDataInstallation.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs
#	src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
#	src/Umbraco.Tests/Packaging/PackageDataInstallationTests.cs
#	src/Umbraco.Tests/Services/Importing/ImportResources.Designer.cs
#	src/Umbraco.Tests/Umbraco.Tests.csproj
#	src/Umbraco.Web.UI/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
#	src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.resx
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/Importing/SingleDocType-WithCleanupPolicy.xml

* Remove namespace aliases

* Update IContentTypeWithHistoryCleanup documentation

Co-authored-by: Ronald Barendse <ronald@barend.se>
2021-12-02 11:37:12 +01:00
Paul Johnson
08f106a23f Fix smidge bundles not always invalidated between backoffice versions. (#11700)
* Introduced new smidge CacheBuster with sensible defaults.

* Bring back reset functionality in SmidgeRuntimeMinifier

* Clearer obsolete messaging.
2021-12-02 11:32:19 +01:00
Nikolaj Geisle
6c5851f556 v9: Remove install endpoint as valid endpoint (#11710)
* Remove installer endpoint from valid candidates

* Removed unrelevant change
2021-12-02 10:07:47 +01:00
Nikolaj Geisle
dd7805552f v9: Remove install endpoint as valid endpoint (#11710)
* Remove installer endpoint from valid candidates

* Removed unrelevant change
2021-12-02 10:01:23 +01:00
Mole
249d87297d V9: Fix backoffice javascript loading slowly (#11714)
* Update Smidge

* Add SmidgeRequestHelper to override the compression order

By default Smidge will always try and use Brotli (br), this compression is good in the the sense that it compresses the file quite a bit, but sadly it's super super slow, like 10 seconds for backoffice js slow.

* Remove unnecessary new keyword

Co-authored-by: nikolajlauridsen <nel@umbraco.dk>
2021-12-01 19:55:59 +01:00
Mole
980cf00cba V9: Fix backoffice javascript loading slowly (#11714)
* Update Smidge

* Add SmidgeRequestHelper to override the compression order

By default Smidge will always try and use Brotli (br), this compression is good in the the sense that it compresses the file quite a bit, but sadly it's super super slow, like 10 seconds for backoffice js slow.

* Remove unnecessary new keyword

Co-authored-by: nikolajlauridsen <nel@umbraco.dk>
2021-12-01 19:53:27 +01:00
Bjarke Berg
40119219f8 Bumb version to 9.1.2 2021-12-01 19:06:23 +01:00
Erik-Jan Westendorp
5d2c950073 Rename AddOEmbedProvider() and Obsolete OEmbedProviders() (#11703)
* Rename AddOEmbedProvider to AddEmbedProvider

* Obsolete  OEmbedProviders()

Obsolete OEmbedProviders() and proxy it to a new EmbedProviders()

* Rename EmbedProviderBase to OEmbedProviderBase

Rename EmbedProviderBase to OEmbedProviderBase
Add an obsoleted  class EmbedProviderBase
Add todo's to all implementations

* remove unintentionally comment

Rem: automatic tests failures not linked to this PR.
2021-11-30 04:10:54 +01:00
Jeavon Leopold
b86505d8f2 Change httpsCheckInvalidUrl to healthCheckInvalidUrl 2021-11-28 12:58:02 +01:00
Erik-Jan Westendorp
4cd0544c65 Create an extension methods to easily append to CollectionBuilders (#11691)
* Create UmbracoBuilder.ContentApps.cs

Add an extension method to register content apps to make it possible to register content apps in the startup.cs class.

* Create UmbracoBuilder.CollectionsBuilders

* White space

* Rename OEmbedProvider to EmbedProvider

* Rename EmbedProvider to OEmbedProvider
2021-11-26 10:18:45 +01:00
Paul Johnson
6a2a5d7fc9 Bugfixes for MNTP / EntityController (#11685)
* Added EntityController.GetUrlsByIds support for int & guid + update MNTP

Fixes issue with MNTP (for 8.18) in a partial view macro - GH #11631

Renamed GetUrlsByUdis to match, don't do this in v9 as it would be
breaking there, instead mark it obsolete.

TODO: v9 ensure integration test coverage, more painful here as no
WebApplicationFactory.

* Added partial test coverage for GetUrlsByIds.

This doesn't actually work in the backoffice because of GH #11448

So lets fix that next.

* Failing test demonstrating #11448

* Fix for #11448 getByIds doesn't work as expected.

ParameterSwapControllerActionSelectorAttribute - cached body survived between requests.

* Expand on sync vs async comment for future confused souls.

* Might aswell cache parsed json vs string for performance

* Make ParameterSwapControllerActionSelector remarks more accurate.

* Share deserialized request body between action constraint and model binder

* Be more defensive with RequestBodyAsJObject HttpContext item

Only store if deserialize success.
Don't assume key being present means can cast as JObject.

* Nest constant a little deeper.

* Final defensive tweak
2021-11-25 13:47:59 +01:00
Nikolaj Geisle
a0695850cb Merge pull request #11587 from umbraco/v8/bugfix/membership-contentapp
Move member properties to Member Content App
2021-11-24 10:45:53 +01:00
Nikolaj Geisle
b5a895e269 Merge pull request #11349 from umbraco/v9/feature/update-imagesharp-web
Update to SixLabors.ImageSharp.Web 1.0.4 and remove processing order workarounds
2021-11-24 10:24:23 +01:00
Nikolaj Geisle
004d3410e9 Merge pull request #11359 from umbraco/v9/feature/imagesharp-cachecontrol-immutable
Change Cache-Control header when cache buster value is present
2021-11-24 09:48:51 +01:00
Nikolaj Geisle
c19463b8ae Revert changes in Umbraco.Web.Common.csproj 2021-11-24 09:22:47 +01:00