Commit Graph

89 Commits

Author SHA1 Message Date
Nikolaj Geisle
7aeb400fce V10: fix build warnings in test projects (#12509)
* Run code cleanup

* Dotnet format benchmarks project

* Fix up Test.Common

* Run dotnet format + manual cleanup

* Run code cleanup for unit tests

* Run dotnet format

* Fix up errors

* Manual cleanup of Unit test project

* Update tests/Umbraco.Tests.Benchmarks/HexStringBenchmarks.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update tests/Umbraco.Tests.Integration/Testing/TestDbMeta.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update tests/Umbraco.Tests.Benchmarks/TypeFinderBenchmarks.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update tests/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update tests/Umbraco.Tests.Integration/Umbraco.Core/Events/EventAggregatorTests.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Fix according to review

* Fix after merge

* Fix errors

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-21 08:09:38 +02:00
Mole
8ffede0441 V10: merge release branch 20220620 (#12590)
* Add Umbraco specific global usings

* Enable implicit usings

* v10: Wait for updated ConnectionStrings during install (#12536)

* Do not change/reload configuration

* Wait for updated connection string options

* recase assigndomain (#12448)

* Add depth property to ICoreScope (#12540)

* Remove ambient scope stack from httpcontext.items. (#12539)

This change makes it easier to use service calls in parallel whilst
a httpcontext is available.

* v10: Prefer SQLite primitive types to flexible types (#12541)

* Prefer SQLite primitive types to flexible types.

* SQLite - column mappings use TEXT for decimals

Thanks @mattbrailsford for sense check.

* Fix issue where languages files are not found in subdir of package dir (#12543)

* Make FindContent return type nullable (#12545)

* Updated nuget dependencies (07-06-2022) (#12525)

* Updated nuget dependencies

* Move Nerdbank.GitVersioning update to Directory.Build.props

* Updated more dependencies

* Improve FlagOutOfDateModels property behaviour.

(cherry picked from commit 54077725c373495fce0d3fbc5cdb6469aad3b676)

* Fix logic error WRT models builder flag out of date models. (#12548)

(cherry picked from commit 6b0149803a879d1c6902a5f61d1f2e9dc8545aac)

* Fixed issue with expected null value. (#12550)

Fixes https://github.com/umbraco/Umbraco-CMS/issues/12526

* Updated Examine to 3.0.0

* Fixes relation issue, when moving a root item to recycle bin, the "Relate Parent Media Folder On Delete"/"Relate Parent Document On Delete" cannot get the parent node type, because it is a fake root.

* Fix possible null error

* Bump version to 10.0.0 final

* Fix attempting to write lock files to LocalTempPath before it exists (#12563)

* Re fix usage statements

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Paul Johnson <pmj@umbraco.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-06-20 09:20:47 +02:00
Bjarke Berg
3754824ac9 Merge remote-tracking branch 'origin/release/10.0.0' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs
#	src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TwoFactorLoginRepository.cs
#	src/Umbraco.Infrastructure/Routing/RedirectTrackingHandler.cs
#	src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs
#	src/Umbraco.Infrastructure/Scoping/LegacyIScope.cs
#	src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs
#	version.json
2022-06-03 07:12:56 +02:00
Nikolaj Geisle
f4e333c178 V10: fix build warnings infrastructure (#12369)
* Run code cleanup

* Run dotnet format

* Start manual fixes

* Manual fixing of warnings

* Fix nullability in columnalias

* Fix tests

* Fix up after merge

* Start updating after review

* Update editorconfig to contain new static & const rules

* Fix up editorconfig to not contain duplicate rules

* Fix up static member names

* Fix up according to review

* Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.DistributedCache.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Examine/ExamineUmbracoIndexingHandler.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Extensions/InstanceIdentifiableExtensions.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_0_0/AddMemberPropertiesAsColumns.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/NPocoMapperCollectionBuilder.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Querying/ExpressionVisitorBase.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Fix [..] to substring

* Fix after merge with 10/dev

* Fox ContentValueSetValidator.cs

* Update LoggerConfigExtensions

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-06-02 08:18:31 +02:00
Paul Johnson
edc9e9623d v10: fix migrations fluent create table builder sqlite (#12518)
* Fix create table builder setup for migrations with SQLite.
2022-06-01 17:04:46 +01:00
Paul Johnson
8c7905a354 merge release/10.0.0 into v10/dev
commit 9ff06eec6e
Author: Ronald Barendse <ronald@barend.se>
Date:   Wed May 25 11:16:39 2022 +0200

    v10: Instantly reload ConnectionStrings after saving configuration (#12475)

    * Do not replace DataDirectory placeholder when setting connection string

    * Ensure ConnectionStrings options are updated when configuration is reloaded

    * Use CurrentValue to get default Umbraco connection string

commit fcee6dc06a
Author: Paul Johnson <pmj@umbraco.com>
Date:   Wed May 25 10:08:43 2022 +0100

    Fix legacy scope provider no longer implementing ICoreScopeProvider (#12480)

commit 88f3628d0a
Author: Paul Johnson <pmj@umbraco.com>
Date:   Wed May 25 09:49:33 2022 +0100

    Fix options monitor setup for connectionstrings (#12472)

commit 4eeb03e7fb
Author: Johan Runsten <jrunestone@users.noreply.github.com>
Date:   Wed May 25 10:13:25 2022 +0200

    Fixed null check typo in CacheInstructionService. Fixes #12473. (#12474)

    * Fixed null check typo. Fixes #12473.

    * Removed unneccessary null forgiving operator

    Co-authored-by: Johan Runsten <johan.runsten@toxic.se>

commit d810d66e9a
Author: Asbjørn Riis-Knudsen <ar@jf-data.com>
Date:   Tue May 24 17:41:10 2022 +0200

    Fix #12454 by having Coalesce handle null values (#12456)

    * Fix #12454 by having Coalesce handle null values

    * Allow null values in Html.Coalesce #12454

commit 963d4c5051
Author: Paul Johnson <pmj@umbraco.com>
Date:   Tue May 24 13:55:39 2022 +0100

    Ensure unique buildnumber for devops UI
2022-05-25 10:48:45 +01:00
Paul Johnson
fcee6dc06a Fix legacy scope provider no longer implementing ICoreScopeProvider (#12480) 2022-05-25 10:08:43 +01:00
Bjarke Berg
e6479207f1 Merge remote-tracking branch 'origin/release/10.0.0' into v10/dev 2022-05-24 14:11:18 +02:00
Paul Johnson
41a003e20e Ensure legacy scope returned when using legacy scope provider (#12465)
* Separate legacy scope provider interface and explicitly implement.

* Don't rely on legacy scope provider for existing tests.

* Assert correct type returned when using legacy scope provider.
2022-05-24 12:26:28 +02:00
Mads Rasmussen
971f0d7984 Feature: Configure Data Type conversion (#12374)
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2022-05-24 09:01:32 +02:00
Paul Johnson
01d2d0326c Merge release/10.0.0 into v10/dev
commit e0aa430d4c
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 10:00:57 2022 +0100

    Fix typo in pipeline yaml

commit 2ec450f2d6
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 09:14:47 2022 +0100

    Fix yaml conditions

commit c2d548039a
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 09:02:50 2022 +0100

    Azure pipeline refactor (#12428)

    * Skip symbols for Umbraco.Templates

    * Resolve some test issues

    + Fixed whitespace dependant tests to pass regardless of build OS vs
    run OS.

    + Snap dictionary tests were failing when Configuration was release

    + Removed hardcoded baseUrl from one of the acceptance tests

    * Move docfx setup to ./build and fix

    * Update UI docs title

    * Added dockerfile that can be used when running the acceptance tests.

    * Take explicit dependency on System.Security.Cryptography.Pkcs

    * Refactor ci/cd pipeline

commit ee8359af75
Author: Mole <nikolajlauridsen@protonmail.ch>
Date:   Thu May 19 09:57:21 2022 +0200

    V10: Reintroduce appsettings-schema.json (#12416)

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

    * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

    * Generate json schema on build

    * Add targets file

    * Gitignore auto generated appsettings schema

    * Fix build not copying file

    * Use the new path in appsettings

    * Update copy message

    * Build json schema as release

    * Update json schema options

    Otherwise just running the project will put the file in the wrong place

    * Generate schema if it doesn't exist in Web.Ui

    * Update json schema options

    Otherwise just running the project will put the file in the wrong place

    Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
    Co-authored-by: Ronald Barendse <ronald@barend.se>

commit dd617ede80
Author: Ronald Barendse <ronald@barend.se>
Date:   Thu May 19 09:51:11 2022 +0200

    v10: Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj (#12413)

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

    * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

    Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

commit b83216876f
Author: Ronald Barendse <ronald@barend.se>
Date:   Thu May 19 08:36:04 2022 +0200

    v10: Project template database/connection string improvements (#12407)

    * Add new connection-string-provider-name parameter

    * Use template value forms to correctly encode JSON values

    * Add new development-database-type parameter

    * Update package template and fix App_Plugins directory rename

    * Remove conflicting short parameter name

    * Lowercase framework parameter to align with MS templates

    * Cleanup default template settings

    * Write unattended install parameters when either connection string or development database is set

    * Include RootNamespace in UmbracoPackage template

    * Update Umbraco specific gitignore rules

    * Revert "Lowercase framework parameter to align with MS templates"

    This reverts commit 22de389272a7e119df569ec2e54190265f6d0ae0.

    * Add exclude-gitignore parameter

    * Update template schemas

    * Add minimal-gitignore parameter

commit e40049dcf1
Author: Mole <nikolajlauridsen@protonmail.ch>
Date:   Wed May 18 15:22:51 2022 +0200

    Fix domain for invariant content nodes (#12405)

    Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>

commit a3692b887a
Author: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Date:   Mon May 9 11:42:10 2022 +0200

    Use SnippetCollection to when working with snippets  (#12355)

    * Introducing a new Snippet type

    * Adding a SnippetCollection and SnippetCollectionBuilder

    * Using snippetCollection to get the snippets instead of fileService

    * Fixed fetching the correct content

    * Make ISnippet non-discoverable

    * Split the SnippetCollection into PartialViewSnippetCollection and PartialViewMacroSnippetCollection

    * Update CodeFileController to use the 2 snippet collections

    * Display the names with Empty.cshtml on top

    * Remove merging embedded snippets with custom snippets from ~\Umbraco.Web.UI\umbraco\PartialViewMacros\Templates folder for the Partial View Collection

    * Fix naming

    * Fix another naming

    * Cleanup + Use base items

    Co-authored-by: Bjarke Berg <mail@bergmania.dk>
    (cherry picked from commit 9326cc5fc6)

commit 4f48a4937b
Author: patrickdemooij9 <patrickdemooij98@hotmail.com>
Date:   Fri Oct 8 11:18:00 2021 +0200

    Cherry picked from 4c08b44684

commit 4fdbfee597
Author: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Date:   Wed May 11 00:51:37 2022 +0200

    Show nicer overlay when clicking block card for deleted element type (#12140)

    * Show nicer overlay when clicking block card for deleted element type

    * Cleanup

    * Remove stop-scrolling container

    * Use flex-start instead on start

    * Remove legacy flexbox fallback

    * Remove unnecessary hack

    * Use standard gap property instead

    * Localization of message

    * Fix translation

    * End sentence with a dot

    (cherry picked from commit ebb1dc21a9)

commit 3856bf8288
Author: Henk Jan Pluim <henkjan.pluim@greenchoice.nl>
Date:   Mon Apr 25 10:02:06 2022 +0200

    #fix 12254 return emptyresult

    (cherry picked from commit 7993d19c1b)

commit 7087c3d9f6
Author: Ronald Barendse <ronald@barend.se>
Date:   Tue May 17 12:59:01 2022 +0200

    v10: Use ForceCreateDatabase during unattended install and extend GetUmbracoConnectionString extension methods (#12397)

    * Add extension methods to get the Umbraco connection string/provider name from configuration

    * Added tests for configuration extension methods.

    * Fix issue with InstallMissingDatabase and ForceCreateDatabase

    * Fix comments

    * Revert casing change in GenerateConnectionString

    * Re-add AddOptions (without config binding) to fix test

    * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs

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

    * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs

    * Update src/Umbraco.Infrastructure/Runtime/RuntimeState.cs

    * Whitespace and documentation updates

    * Add DatabaseProviderMetadataExtensions

    * Filter before ordering

    * Replace DataDirectory placeholder when setting connection string

    Co-authored-by: Andy Butland <abutland73@gmail.com>
    Co-authored-by: Bjarke Berg <mail@bergmania.dk>
    (cherry picked from commit 8e6e262c7f)

commit e90bf26577
Author: Ronald Barendse <ronald@barend.se>
Date:   Tue May 17 07:33:54 2022 +0200

    v10: Support System.Data.SqlClient provider name (#12408)

    * Add support for System.Data.SqlClient provider name

    * Only update connection string when required

    (cherry picked from commit e82bcb1b76)

commit fd0637c96d
Author: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Date:   Mon May 16 14:23:59 2022 +0200

    Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
    (cherry picked from commit 2ed71a64ec)
2022-05-19 10:25:44 +01:00
Paul Johnson
c2d548039a Azure pipeline refactor (#12428)
* Skip symbols for Umbraco.Templates

* Resolve some test issues

+ Fixed whitespace dependant tests to pass regardless of build OS vs
run OS.

+ Snap dictionary tests were failing when Configuration was release

+ Removed hardcoded baseUrl from one of the acceptance tests

* Move docfx setup to ./build and fix

* Update UI docs title

* Added dockerfile that can be used when running the acceptance tests.

* Take explicit dependency on System.Security.Cryptography.Pkcs

* Refactor ci/cd pipeline
2022-05-19 10:02:50 +02:00
Bjarke Berg
13f6d4791c Move umbraco views to static assets and make that an RCL + Embedded language files (#12324)
* RCL for static assets to replace the nuspec

* Fix build

* Fix unit tests

* clean up in build.ps1

* Removed test (lang files will be removed later anyway)

* Fixed namespaces.. + Ensure we set web root path if missing (e.g. wwwroot folder do not exist) + Added StaticWebAssetBasePath

* fixed namespace

* cleanup

* Set root variable

* Added static assets

* Experimenting with StaticWebAssetBasePath

* Embedded lang files into Umbraco.Core

* Removed legacy test. New test can be implemented instead

* Fixed tests

* clean up

* Fix merge issue
2022-05-02 19:38:33 +02:00
Ronald Barendse
f00bfc408e v10: Make language name editable (#12243)
* Update language models to get and set manual name

* Save custom language name in controller

* Rewrite AngularJS language edit view and controller

* Cleanup language overview

* Remove icon from language overview

* Make styling of control group the same as properties

* Ensure both ISO code and culture name are set in language model

* Use new language model constructor

* Update tests to use new language constructor

* Update culture name in dictionary package export

* Use language name in dictionary

* Fix language nullability issues

* Cleanup GetAllCultures and added null checks

* Re-add obsolete constructors

* Make language name required and update Cypress test

* Fix routing/saveNewLanguages Cypress test

* Make language name optional (improved backwards compatibility)

Co-authored-by: Ronald Barendse <ronald@panoramastudios.nl>
2022-05-02 15:42:19 +02:00
Bjarke Berg
11f9bcbea2 Update examine to version 3 (#12307)
* Updating to Examine 3 beta. Currently not building due to missing support for updating values in the OnTransformingIndexValues event

* Updated to beta 6  - It builds, but we need to fix tests

* Fixed issue with values being passed into nested lists.

* Fixed issue in test

* Updated to examine beta.9

* Fixed breaking changes
2022-05-02 14:11:46 +02:00
Nikolaj Geisle
cf2b9a0f21 V10: Move core services to core project (#12314)
* Move AuditService to core project

* Move two factor login service to core

* Move ServerRegistrationService to core

* Move BasicAuthService to Core project

* Move IdKeyMap to core project

* Added CacheInstructionService to the infrastructure namespace

* Move DataTypeService to core namespace

* Update CacheInstructionService.cs to use CoreScopeProvider

* Move core editors to core

* Move more Property editors and configuration

* Remove obsoleted constructors in internal classes

* Update PropertyEditors to use new ctors

* Fix propertyEditors to use new ctors

* Use the right property editor constructors

* add DI in the property method

* Update grid to use new ctor

* Fix non-assignment of variable

* Apply suggestions from code review

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Fix suggestions from code review

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Kevin Jump <kevin@thejumps.co.uk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-04-29 11:52:58 +02:00
Paul Johnson
95aa143db0 v10 make migration from v9 less painful WRT IScope (#12293)
* Restore IEventDispatcher

* Fix breaking changes WRT IScopeProvider and IScope

* Update internal usage.

* Update src/Umbraco.Core/Services/UserService.cs

* Better obsolete message

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-04-26 10:22:37 +01:00
Paul Johnson
551f523079 V10 - Reduce usage of temp AspNetCoreHostingEnvironment (#12270)
* Move MapPathWebRoot & MapPathContentRoot to extension methods.

* Set AspNetCoreHostingEnvironment ApplicationId without service provider.

* Drop some usages of TempHostingEnvironment

* Logging setup cleanup - AppDomainId has no value (it is always "1")

Creating new AppDomains isn't possible in .Net core.
Attempting to do so results in a platform exception.

A dotnet core process has a single AppDomain instance whose Id property
is always the integer 1.

* Setup logging without IHostingEnvironment

* Mark IUmbracoBuilder.BuilderHostingEnvironment obsolete
And remove internal usages.

* Typeloader no longer uses umbraco-types.list

* Added UmbracoHost - setup serilog two-stage init.

* Add ApplicationIdEnricher

* Defensive tweaks for those not using UmbracoHost

* Drop UmbracoHost static class

* Setup runtime logger without host builder extensions.

* Prevent RefreshingRazorViewEngine related explosions

* Filescoped namespaces for new classes.

* Apply suggestions from code review
2022-04-25 16:27:53 +02:00
Paul Johnson
2df6c937fd Fix flakey write lock test. (#12294)
And reduce logging noise.
2022-04-25 09:33:03 +02:00
Nikolaj Geisle
70a75d8c9b Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs
#	src/Umbraco.Core/Models/Member.cs
#	src/Umbraco.Core/Models/Membership/User.cs
#	src/Umbraco.Core/Services/MemberService.cs
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
#	src/Umbraco.Infrastructure/Security/MemberUserStore.cs
2022-04-22 12:32:57 +02:00
Bjarke Berg
379d2e3e4e Dependency updates (#12283)
* Upgraded MailKit

* Upgraded Microsoft.* packages

* Upgrades various nuget packages to latest version

* Upgrades various nuget packages related to test
2022-04-22 09:24:30 +02:00
Mole
7df4f84247 V10: Migrate member properties to columns on the member table (#12205)
* Add new columns to the member table

* Add missing IsApproved column

* Add joins with nested query

* Add query for selecting new column values from existing members

* Update the member data from the same query

* Make escapes work for sqlite

* Use GetFieldNameForUpdate instead of GetFieldName

* Left join on memberDto

* Remove the now unused property types and data

* Don't create member columns as properties anymore

* Store old properties in fields on member

Also switch the dates to nullable since they can be null

* Map columns when mapping from DTO to Member object

* Display columns in the member content app

* Fix null exception when creating new user

* Hide value if user doesn't have access to sensitive data

* Remove hardcoded member properties

* Obsolete old member alias constants

* Map and persist member properties

* Correctly update LastLogin when member logs in

* Map IsApproved and IsLockedOut when saving member in backoffice

* Update the query mappers for members

* Fix member service tracks dirty changes test

* Remove no longer existing property types from member type builder

* Fix null error in UpdateMemberProperties

* Fix builder tests

* Fix SetupMemberTestData in MemberControllerUnitTests

* Let LastLoginDate be null and handle check in controller

There's no reason to default a perfectly nullable property to default(DateTime)

* Add translation key for is approved and use that instead of constant

* Obsolete old label constants

* Fix whitespace post merge

* Fix up test comments

* Apply suggestions from code review

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Fix member properties always being sensitive

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2022-04-21 14:47:27 +02:00
Nikolaj Geisle
060e0181a7 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs
#	src/Umbraco.Core/Extensions/PublishedContentExtensions.cs
#	src/Umbraco.Core/Telemetry/Models/TelemetryReportData.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs
#	src/Umbraco.PublishedCache.NuCache/ContentStore.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberTypeTreeController.cs
#	src/Umbraco.Web.Common/ModelsBuilder/InMemoryModelFactory.cs
#	src/Umbraco.Web.Common/Security/MemberManager.cs
#	src/Umbraco.Web.Website/Routing/ControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/IControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs
2022-04-21 10:26:51 +02:00
Bjarke Berg
b19dab5f3a Fix merge issues 2022-04-20 15:42:27 +02:00
Bjarke Berg
23a49161d6 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/build.ps1
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/dotnetcli.host.json
#	build/templates/UmbracoProject/.template.config/ide.host.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Umbraco.Core/Constants-System.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	umbraco-netcore-only.sln
2022-04-20 11:09:28 +02:00
Nikolaj Geisle
c07ffb68fc v9: Implement telemetry levels (#12267)
* Add initial classes

* Add TelemetryProviders

* Add new NodeCountService.cs and NodeTelemetryProvider

* Add data contract attribute to UsageInformation

Otherwise it wont serialize correctly

* Implement more providers

* Fix builders and propertyEditorTelemetry

* Add MediaTelemetryProvider

* Add MediaTelemetryProvider

* Fix doubling of media telemetry

* Move contentCount from NodeCountTelemetryProvider and move to ContentTelemetryProvider

* Revert ContentTelemetryProvider changes

* Add detailed information to TelemetryService

* Add integration tests

* Add more tests and todos for tests

* Fix stylecop warnings

* Use yield return instead of instantiating local list

* Implement Macro test

* Inject interface instead of implementation in TelemetryService

* Fix TelemetryServiceTests.cs

* Implement media tests

* Implement propertyTypeTests

* Implement constants instead of hardcoded strings

* Add SystemInformationTelemetryProvider

* Use SystemInformationTableDataProvider in UserDataService

* Implement more properties

* Add UsageInformation

* Replace UserDataService with SystemInformationTelemetryProvider

* Undo changes to UserDataService and obsolete it

* Remove ISystemInformationTableDataProvider

* Register SystemInformationTelemetryProvider as telemetry provider

* Use constants for telemetry names

* Make UserDataServiceTests test SystemInformationTelemetryProvider instead

* Update UserDataServiceTests to cover new data

* Add unit tests

* Add integration test testing expected data is returned

* Implement Analytics dashboard

* Improve assertion message

* Add text and styling to analyticspage

* Rename consent to analytic

* implement save button for consent level

* Implement save button

* Fix system information test

* Add TelemetryResource

* Move telemetry providers to infrastructure

* Add database provider to system information

* Set startvalue for slider

* Fix unit tests

* Implement MetricsConsentService using KeyValueService

* Return void hen setting the telemetry level

* fix startposition when not reloading

* Add a couple tests

* Update src/Umbraco.Core/Services/MetricsConsentService.cs

* Rename ConsentLevel.cs

* Use direct Enum instead of parsing

* rename consent resource

* add lazy database

* refactor slider

* Implement ng-if and propers pips

* Make classes internal

* Fix slider not loading when navigating to tab

* Add telemetry level check to TelemetryService.cs

* Add Consent for analytics text

* Fix build errors for unit tests

* Fix TelemetryServiceTests

* revert package-lock.json

* Fix integration test

* Update slider

* Update TelemetryService.cs

* Apply suggestions from code review

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-04-19 15:06:10 +02:00
Bjarke Berg
852305b7d1 Simplified setup of 2FA for users (#12142)
* Added functionality to enable 2FA for users..

* Do not use the obsolete ctor in tests

* cleanup

* Cleanup

* Convert User view from overlay to infinite editor

* Add support for having additional editors on top of the user (2fa) which overlay does not support
* Add controllerAs syntax in the template
* Remove unused dependencies

* Adjustments to 2fa login view

* organize elements
* add translations
* add a11y helpers
* add autocompletion = one-time-code
* change to controllerAs syntax

* add callback to cancel 2fa and fix error where submit button was not reset when all other validations were

* add a cancel/go back button to the 2fa view

* replace header with something less obstrusive

* move logout button to the footer in the new editor view

* change 'edit profile' to an umb-box and move ng-if for password fields out to reduce amount of checks

* Add umb-box to external login provider section

* add umb-box to user history section

* bug: fix bug where notificationsService would not allow new notifications if removeAll had been called

* add styling and a11y to configureTwoFactor view

- also ensure that the view reloads when changes happen in the custom user view to enable 2fa
- ensure that view updates when disabling 2fa
- add extra button to show options (disable) for each 2fa provider

* add notification when 2fa is disabled

* add data-element to support the intro tour

also changed a minor selector in the cypress test

* correct usage of umb-box with umb-box-content

* do not use the .form class twice to prevent double box-shadow

* make tranlastion for 2fa placeholder shorter

* ensure that field with 2fa provider is always visible when more than 1 provider

* move error state of 2fa field to token field

* update translation of multiple 2fa providers

* move CTA buttons to right side to follow general UI practices

* rename options to disable

* add disabled state

* add helper folders to gitignore so you can work with plugins and custom code without committing it accidentally

* move the disable functionality to its own infinite editor view

* use properties from umb-control-group correctly

* add 'track by' to repeater

* make use of umb-control-group

* remove unused functions

* clean up translations

* add Danish translations

* copy translations to english

* Only return enabled 2fa providers as expected

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-04-19 08:33:03 +02:00
Nikolaj Geisle
8865c5d486 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice 2022-04-05 11:25:52 +02:00
Paul Johnson
d036c6a118 Fix tests when running filtered set (SQL Server)
Without InstallDefaultDataSettings DatabaseSchemaCreator makes use of
static service locator which isn't wired up in time.
2022-04-05 10:18:04 +01:00
Nikolaj Geisle
76c525b611 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice 2022-04-05 11:11:44 +02:00
Paul Johnson
c34479c2bb Fix tests when running filtered set.
Without InstallDefaultDataSettings DatabaseSchemaCreator makes use of
static service locator which isn't wired up in time.
2022-04-05 10:04:39 +01:00
Nikolaj Geisle
a6128bfe8e Merge branch 'v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/Cache/MacroCacheRefresher.cs
#	src/Umbraco.Core/Services/MacroService.cs
#	src/Umbraco.Core/StaticApplicationLogging.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Infrastructure/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Infrastructure/Security/UmbracoPasswordHasher.cs
#	src/Umbraco.Web.BackOffice/Controllers/ImagesController.cs
2022-04-05 08:51:08 +02:00
Bjarke Berg
fe1c2f5d4f Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/HealthCheckNotifier.cs
#	src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs
#	src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs
#	tests/Umbraco.Tests.Integration.SqlCe/Umbraco.Infrastructure/Persistence/DatabaseBuilderTests.cs
#	tests/Umbraco.Tests.Integration/Testing/BaseTestDatabase.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SchemaValidationTest.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SqlServerTableByTableTest.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Components/ComponentTests.cs
2022-03-31 12:51:55 +02:00
Andy Butland
02e76c8227 Configuration to control the creation of default data (#12122)
* Added configuration and checks for creation of default Umbraco data.

* Fixed configuration binding issues.

* Updated comments.

* Added DefaultDataCreationSettings to the JSON schema.

* Removed option to not install default relation types as Umbraco relies on (and will recreate) them if they aren't there.

* Renamed configuration class used for install of default data and converted to named optios.

* Fix to failing unit tests.

* Fixes for integration tests.

* Apply suggestions from code review

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Further fix from code review.

* Updated naming as per PR review suggestions.

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2022-03-25 08:58:07 +01:00
Nikolaj Geisle
214bcceffc Merge v10/dev into infrastructure 2022-03-16 14:39:28 +01:00
Elitsa Marinovska
5bebf98339 Test + fix 2022-03-16 14:19:25 +01:00
Paul Johnson
3961c4c233 v10 SQLite support + distributed locking abstractions (#11922)
* Created Persistence.SQLite project skeleton.

* SQLite database initialization

* Various changes and hacks to make things work.

* WIP integration tests

* Fix thread safety tests

* Fix tests that relied on tie breaker sorting.

Spent a fair amount of time looking for a less lazy fix but gave up.

* Convert right join to left join ContentTypeRepository.PerformGetByQuery
SQLite doesn't support right join

* Fix test Can_Generate_Delete_SubQuery_Statement

Worth noting that NPoco.DatabaseTypes.SQLiteDatabaseType doesn't override
EscapeSqlIdentifier so NPoco will escape with [].

SQLite docs say > "A keyword enclosed in square brackets is an identifier.
This is not standard SQL.
This quoting mechanism is used by MS Access and SQL Server and is
included in SQLite for compatibility."

Also could have updated SqliteSyntaxProvider to match npoco but
decided against it.

* Fixes for paginated custom order by

* Fix tests broken by lack of unique indexes.

* Fix SqlServerTableByTableTest tests.

These tests didn't actually do anything as the tables already exist so schema creator just returned.

Did however point out that the default implementation for DoesTableExist just returns false so added a default naive implementation.

* Fix ValidateLoginSession - SelectTop must come later

* dry up database cleanup

* Fix up db migration tests.
We can't drop pk in sqlite without recreating table.
Test looks to be testing that add column works as intended which we can test.

* Prevent schema creation errors.

* SQLite ignore lock tests, WAL back on.

* Fix package schema tests

* Fix NPocoFetchTests - case sensitivity not under test

* Fix AdvancedMigrationTests (where possible)

Migrations probably need a good look later.
Maybe nuke old migrations and only support moving to v10 from v9.

If we do that can do some cleanup.

* Cleanup test database configuration

* Run integration tests against SQLite on build agent.

* Drop MS.Data.SQLite
System.Data.SQLite was quicker to roll out due to more CLR type mapping

* YAML

* Skip Umbraco.Tests.Integration.SqlCe

* Drop SqlServerTableByTable tests.

Until this week they did nothing anyway as they with NewSchemaPerTest
so the tests all passed as CreateTable was no op (already exists).

Also all of the tables are created in an empty database by SchemaValidationTest.cs
DatabaseSchemaCreation_Produces_DatabaseSchemaResult_With_Zero_Errors

* Might aswell run against macOS also.

* Copy azure pipelines task header layout

* Delete SQLCe projects

* Remove SQL CE specific code.

* Remove SQL CE NuSpec, template params, build script setup

* Delete umbraco-netcore-only.sln

* Add SkipTests solution configuration and use for codeql

* Remove reference to deleted nuspec file.

* Refactor ConnectionStrings WRT DataDirectory placeholder & ProviderName.

At this point you can try out SQLite support by setting the following
in appsettings.json and then completing the install process.

"ConnectionStrings": {
  "umbracoDbDSN": "Data Source=|DataDirectory|/umbraco.sqlite",
  "umbracoDbDSN_ProviderName": "System.Data.SQLite"
},

Not currently possible via installer UI without provider name pre-set in
configuration.

* Switch to Microsoft.Data.Sqlite

Some gross hacks but will be good to find out if this works
with apple silicon.

* Enable selection of SQLite via installer UI (also quick install)

* Remove SqlServerDbProviderFactoryCreator to cleanup a TODO

* Move SQL Server support to its own class library

* Add persistence dependencies to Umbraco.CMS metapackage

* Bugfix packages delete query

Created invalid query for SQLite.

* Try out cypress tests Linux + SQLite

* Prevent cypress test artifact upload failure on attempt 2+

* LocalDb bugfixes

* Drop redundant enum

* Move SqlClient constant

* Misc whitespace

* Remove IsSqlCe extension (TODO: drop non 9->10 migrations later).

* Umbraco.Persistence.* -> Umbraco.Cms.Persistence.*

* Display quick install defaults and per provider default database name.

* Misc remove old comment

* little re-arrange

* Remove almost all usages of IsSqlite extension.

* visual adjustments

* Custom Database Configuration is last step and should then say Install.

* use text instead of disabled inputs

* move legend, rename to Install

* Update SqlMainDomLock to work without distributed locks.

* Added IDistributedLockingMechanism interface and in memory impl.

* Drop locking from ISqlSyntaxProvider & wire up scope to abstraction.

* Added SqlServerDistributedLockingMechanism

* Move distributed locking interfaces and exceptions to Core + xmldocs.

* Fix tests, Misc cleanup, Add SQL distributed locking integration tests

* Provide mechanism to specify DistributedLockingMechanism in config
(even if added by composer)

* Nomplementation -> NoImplementation

* Fix misleading comment

* Integration tests use SqlServerDistributedLockingMechanism when possible

* Handle up-gradable locks SqlServerDistributedLockingMechanism.
TODO: InMemoryDistributedLockingMechanism.

Note: Nuked SqlServerDistributedLockingMechanismTests, will still sleep
at night.
Is covered by Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.LockTests

* Make tests pass for InMemoryDistributedLockingMechanism, pretty hacky.

* Tweak constraints on WithCollectionBuilder so i can drop bad constructor

* Added SqliteDistributedLockingMechanism

* Dropped InMemoryDistributedMechanism + magic

InMemoryDistributedMechanism was pretty rubbish and now we have
a decent implementation for SQLite as we no longer block readers
see 8d1f42b.

Also drop the CollectionBuilder setup, instead do the same as we do
for syntax providers etc, it's more automagical so we never require an
explicit selection although we are allowing for it.

However keeping the optional IUmbracoBuilder constructor param for
CollectionBuilders as it's extremely useful.

* Fix quick install "" database name.

* Hide Database Configuration section when a connection string is pre-set.

Doesn't seem worth it to extract db name from connection string.

* Ensure wal test 2+

* Fix logging inconsistencies.

* Ensure in transaction when obtaining locks + no-op the SQLite read lock.

There's no point in running the query just to make a single test pass.

* Fix installer database display names

* Allow SQLite shared cache without losing deferred transactions

* Opt into shared cache for new SQLite databases + fix filename

* Fix misc inconsistency in .gitignore

* Prefer our interceptor interface

* Restore DEBUG_DATABASES code OnConnectionOpened in case it's used.

* Back to private cache.

* Added retry strategy for SQLite + refactor out SQL server specific stuff

* Fix SQL server tests.

* Misc - Orphaned comment, incorrect casing.

* InMemory SQLite test database & turn shared cache back on everywhere.

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2022-03-11 17:14:20 +01:00
Bjarke Berg
981e66a673 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Core/Telemetry/TelemetryService.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/DashboardController.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ScheduledPublishingTests.cs
2022-03-10 14:36:30 +01:00
Elitsa Marinovska
d9d5dc5626 Item tracking improvements (#11919)
* Adding TrackedReferencesController

* Adding/changing views

* Adding/Editing js files

* RelationService changes

* RelationRepository changes

* Adding missing translations

* Adding/Modifying tests

* Beginning of #9125 migration

* Introducing a new component + refactoring based on that

* Abstracting + refactoring

* Work on content unpublishing

* Work on media.delete

* Various small changes

* Beginning of #9119 migration

* Changes on content.delete

* Various fixes

* Adding new keys used in the listview bulk actions

* Adding methods to get the items used in relations from array of ids

* Adding the checkLinkedItems function to the trackedReferencesResource

* Passing the selected items from a listview to unpublish and delete

* Adding umb-tracked-references-listview

* Adding umb-tracked-references-listview-table with language column

* Fixes for tracked references

* Changes in listview unpublish dialog

* Changes in listview delete dialog

* Removing Variants logic as it is not currently supported

* Visual fixes

* Closing dialogs on click

* Fix wording

* Fix breaking changes

* Change to a single title "Items in use" instead of 2 different for Content and Media

* No need for obsoleting because we can change new controllers

* Return ActionResult from actions

* V9:  Prevent delete or unpublish of items that have references (#12047)

* Introducing config settings that prevent delete or unpublish of items referenced by other items

* Disable deletion of content items and show a new warning

* Disable deletion of media items and show a new warning

* Disable deletion of list view items

* Disable unpublish and bulk unpublish

* Add a new warning

* V9: Displaying descendants in use as part of item tracking (#12039)

* Replace HasReferencesInDescendants with GetPagedDescendantsInReferences

* Display descendants in use on parent's info tab

* Add getPagedDescendantsInReferences to trackedReferencesResource

* Add lang keys for Descendants in use

* Refactoring controller actions

* Don't call check descendants usage when it is a new item

* rename busfy to busy

* always show references

* rearrange for scrollbar to appear at the edge of the dialog

* use the word referenced instead of used

* change fallback texts

* Added "IsDependency" to relation types

* refactor of umb-tracked-references

* rename checkLinkedItems to getPagedReferencedItems

* rename check to load, to be consistent with the rest.

* Refactored backend . Needs frontend fixes

* Cleanup

* Use filters

* Front-end refactor to match refactored end-points

* Fixed bug + warning

* Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join).

* remove comment

* hideNoneDependencies including varying text for the configuration

* Hack for SqlCE :(

* some final adjustments for item tracking ui

* Unbreak change

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-07 22:46:16 +01:00
Nikolaj Geisle
d1cf640f2a more build errors in Core 2022-02-27 21:20:50 +01:00
Paul Johnson
83204edbd4 V10/feature/filesystem maindomlock (#12049)
* Filesystem based MainDomLock & extract interface for MainDomKey generation (#12037)

* Extract MainDomKey generation to its own class to ease customization.

Also add discriminator config value to GlobalSettings for advanced users.
Prevents a mandatory custom implementation, should be good enough for
the vast majority of use cases.

* Prevent duplicate runs of ScheduledPublishing during slot swap.

* Add filesystem based MainDomLock

(cherry picked from commit 860c8e8ae2)

# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs

* Remove obsolete constructors from ScheduledPublishing & SqlMainDomLock

* FileSystemMainDomLock promoted to default fallback for all platforms.

* Various fixes & improvements
2022-02-25 12:06:30 +00:00
Paul Johnson
4a6c409a1f Explicitly close release signal file. (#12057) 2022-02-25 10:56:45 +00:00
Paul Johnson
4351ce6ee4 Further changes requested during review of #12049 (#12053) 2022-02-25 08:22:37 +00:00
Paul Johnson
860c8e8ae2 Filesystem based MainDomLock & extract interface for MainDomKey generation (#12037)
* Extract MainDomKey generation to its own class to ease customization.

Also add discriminator config value to GlobalSettings for advanced users.
Prevents a mandatory custom implementation, should be good enough for
the vast majority of use cases.

* Prevent duplicate runs of ScheduledPublishing during slot swap.

* Add filesystem based MainDomLock
2022-02-24 10:17:34 +00:00
Paul Johnson
a1e562cab6 Switch ConfigureServices back to protected.
Downstream users may wish to subclass and add their application specific
services.
2022-02-12 11:57:28 +00:00
Paul Johnson
fcd4ad17bb Make webhost setup less confusing. 2022-02-12 11:41:59 +00:00
Paul Johnson
c1fddd98be Additional refactoring I have been meaning to get around to for a while. 2022-02-11 20:39:57 +00:00
Paul Johnson
76cda7fd0c Fix issue running UmbracoTestServerTestBase tests with debugger attached
Ensure ConfigureWebServer called before ConfigureServices for tests that
make use of WebApplicationFactory.

Still not apparent why tests would pass if debugger isn't attached?
2022-02-11 16:52:57 +00:00
Bjarke Berg
ae6920a4a2 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/scope-provider-cleanup
# Conflicts:
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
2022-01-23 14:16:44 +01:00
Bjarke Berg
e92abf7d51 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
2022-01-23 13:46:10 +01:00