* Provides an abstraction for creating the JavaScriptEncoder used in SystemTextConfigurationEditorJsonSerializer.
* Generalised JSON serialization encoder factory to work for all System.Tex.Json serializers.
Added the serializer's name as a parameter to allow for different encodings per serializer if required.
* Fixed tests by removing use of obsolete constructors.
* Removed name parameter and used a generic type instead.
* Implement IEmailSenderClient interface and implementation
In an effort to support oauth 2 and other schemes, we extract a emailsenderclient interface, allowing to replace default smtp client with one that fits the usecase, without having to implement all of Umbracos logic that builds the mimemessage
* fix test
* Documentation
* EmailMessageExtensions public, use EmailMessage in interface and impl.
* move mimemessage into implementation
* revert EmailMessageExtensions back to internal
* use StaticServiceProvider to avoid breaking change
* Fix test after changing constructor
* revert constructor change and add new constructor an obsoletes
* Moved a paranthesis so it will build in release-mode
(cherry picked from commit bff321e6f5)
* Remove nucache reference from Web.Common
* Get tests building-ish
* Move ReservedFieldNamesService to the right project
* Remove IPublishedSnapshotStatus
* Added functionality to the INavigationQueryService to get root keys
* Fixed issue with navigation
* Remove IPublishedSnapshot from UmbracoContext
* Begin removing usage of IPublishedSnapshot from PublishedContentExtensions
* Fix PublishedContentExtensions.cs
* Don't use snapshots in delivery media api
* Use IPublishedMediaCache in QueryMediaApiController
* Remove more usages of IPublishedSnapshotAccessor
* Comment out tests
* Remove more usages of PublishedSnapshotAccessor
* Remove PublishedSnapshot from property
* Fixed test build
* Fix errors
* Fix some tests
* Delete NuCache 🎉
* Implement DatabaseCacheRebuilder
* Remove usage of IPublishedSnapshotService
* Remove IPublishedSnapshotService
* Remove TestPublishedSnapshotAccessor and make tests build
* Don't test Snapshot cachelevel
It's no longer supported
* Fix BlockEditorConverter
Element != Element document type
* Remember to set cachemanager
* Fix RichTextParserTests
* Implement TryGetLevel on INavigationQueryService
* Fake level and obsolete it in PublishedContent
* Remove ChildrenForAllCultures
* Hack Path property on PublishedContent
* Remove usages of IPublishedSnapshot in tests
* More ConvertersTests
* Add hybrid cache to integration tests
We can actually do this now because we no longer save files on disk
* Rename IPublishedSnapshotRebuilder to ICacheRebuilder
* Comment out tests
* V15: Replacing the usages of Parent (navigation data) from IPublishedContent (#17125)
* Fix .Parent references in PublishedContentExtensions
* Add missing methods to FriendlyPublishedContentExtensions (ones that you were able to call on the content directly as they now require extra params)
* Fix references from the extension methods
* Fix dependencies in tests
* Replace IPublishedSnapshotAccessor with the content cache in tests
* Resolving more .Parent references
* Fix unit tests
* Obsolete and use extension methods
* Remove private method and use extension instead
* Moving code around
* Fix tests
* Fix more references
* Cleanup
* Fix more usages
* Resolve merge conflict
* Fix tests
* Cleanup
* Fix more tests
* Fixed unit tests
* Cleanup
* Replace last usages
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Remove usage of IPublishedSnapshotAccessor from IRequestItemProvider
* Post merge fixup
* Remo IPublishedSnapshot
* Add HasAny to IDocumentUrlService
* Fix TextBuilder
* Fix modelsbuilder tests
* Use explicit types
* Implement GetByContentType
* Support element types in PublishedContentTypeCache
* Run enlistments before publishing notifications
* Fix elements cache refreshing
* Implement GetByUdi
* Implement GetAtRoot
* Implement GetByRoute
* Reimplement GetRouteById
* Fix blocks unit tests
* Initialize domain cache on boot
* Only return routes with domains on non default lanauges
* V15: Replacing the usages of `Children` (navigation data) from `IPublishedContent` (#17159)
* Update params in PublishedContentExtensions to the general interfaces for the published cache and navigation service, so that we can use the extension methods on both documents and media
* Introduce GetParent() which uses the right services
* Fix obsolete message on .Parent
* Obsolete .Children
* Fix usages of Children for ApiMediaQueryService
* Fix usage in internal
* Fix usages in views
* Fix indentation
* Fix issue with delete language
* Update nuget pacakges
* Clear elements cache when content is deleted
instead of trying to update it
* Reset publishedModelFactory
* Fixed publishing
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
* Started work on service
* temp work
* temp commit
* Temp commit
* Added more routing logic
* Fixed tests
* Refactor and prepare for isdraft
* Work on drafts
* Fixed tests
* Move to enlistment to ensure caches is only updated on scope complete
* Clean up and handle null cultures
* Added functionality to the INavigationQueryService to get root keys
* Added migration
* Fixed issue with navigation
* Added migration
* Temp commit, move to cache refreshers.
* Fixed issues
* List urls
* fix build
* Fixed integration tests
* Refactor to create new content finder instead of changing the old
* rollback wrong commited line
* Clean up, and use docuemnt url service for index
* Fixed List endpoin
* Do not use Navigation service in methods intended by management api
* Fixed examine tests
* Make methods virtual
* Use domain from published request
* Use hybrid cache from new content finder
* Eliminate nucache usage
* Fixed issue with delivery api and url generation
* Fixed linux tests
* Added hybrid cache to all integration tests
* Force system text json for IJSonSerializer
* Migrate ColorPickerValueConverter
* Move ColorPickerValueConverter
* Clean up ColorPickerValueConverter
* Remove obsoleted property editors
* Migrate FlexibleDropdownPropertyValueConverter to System.Text.Json
* Use IJsonSerializer instead and move the value converter to Core
* Migrate ImageCropperValueConverter to System.Text.Json
* Inject jsonserializer in test and obsolete old constructor
* Migrate JsonValueConverter to System.Text.Json
* Remove ContextualConfigurationEditorJsonSerializer
* Remove JsonNetSerializer
* Remove obsolete DeserializeSubset from JsonSerializer interface
* Fix FlexibleDropdownPropertyValueConverter
* Update test JSON to be actual valid json
* Update more test json
* Update time format to be valid
* Add JsonPropertyName to models
* chore: Fix XML warnings
* docs: Fix XML warnings
* docs: Fix XML in resource designer
* docs: Fix XML warnings
* Revert "docs: Fix XML in resource designer"
This reverts commit 8ea61c51ac161e1853ae080db7fe1b4d4cb4d2be.
* First attempt at OpenIddict
* Making headway and more TODOs
* Redo current policies for multiple schemas + clean up auth controller
* Fix bad merge
* Clean up some more test code
* Fix spacing
* Include AddAuthentication() in OpenIddict addition
* A little more clean-up
* Move application creation to its own implementation + prepare for middleware to handle valid callback URL
* Enable refresh token flow
* Fix bad merge from v11/dev
* Support auth for Swagger and Postman in non-production environments + use default login screen for back-office logins
* Add workaround to client side login handling so the OAuth return URL is not corrupted before redirection
* Add temporary configuration handling for new backoffice
* Restructure the code somewhat, move singular responsibility from management API project
* Add recurring task for cleaning up old tokens in the DB
* Fix bad merge + make auth controller align with the new management API structure
* Explicitly handle the new management API path as a backoffice path (NOTE: this is potentially behaviorally breaking!)
* Redo handle the new management API requests as backoffice requests, this time in a non-breaking way
* Add/update TODOs
* Revert duplication of current auth policies for OpenIddict (as it breaks everything for V11 without the new management APIs) and introduce a dedicated PoC policy setup for OpenIddict.
* Fix failing unit tests
* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Update src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* 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.
* 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>
* Allow changing UmbracoMediaPath to an absolute path. Also ensure Imagesharp are handing requests outside of the wwwroot folder.
* Let UmbracoMediaUrl fallback to UmbracoMediaPath when empty
* Add FileSystemFileProvider to expose an IFileSystem as IFileProvider
* Replace IUmbracoMediaFileProvider with IFileProviderFactory implementation
* Fix issue resolving relative paths when media URL has changed
* Remove FileSystemFileProvider and require explicitly implementing IFileProviderFactory
* Update tests (UnauthorizedAccessException isn't thrown anymore for rooted files)
* Update test to use UmbracoMediaUrl
* Add UmbracoMediaPhysicalRootPath global setting
* Remove MediaFileManagerImageProvider and use composited file providers
* Move CreateFileProvider to IFileSystem extension method
* Add rooted path tests
Co-authored-by: Ronald Barendse <ronald@barend.se>
* starts cleaning up old test project, removing ones we'll never convert, moves new test to where it should be.
* Makes ContentNodeKit immutable properties, moves first nucache tests over
* Gets the Nucache unit tests working and refactors a bit to use builder pattern for models.
* Migrates first xml based cache test to use nucache.
* Migrates a bunch more
* Migrates remaining tests for PublishedContentTests
* Moves PublishedRouterTests
* Moves PublishedContentExtensionTests
* Moves more tests.
* committing wip
* committing wip
* Gets PublishedContentLanguageVariantTests converted and working.
* Fixes DataTable ext method and moves PublishedContentDataTableTests
* Moves PublishedMediaTests
* wip - moving EntityXmlSerializerTests
* Moves more tests
* moves more tests
* moves more tests
* Move another test
* Moves more tests
* Fix test
* move another test
* Moves more tests
* Moves more tests
* Moves more tests
* wip before merge
* More tests
* More tests
* More tests
* More tests
* More tests
* More tests
* Cleanup and moving classes.
* Remove unused code
* Fixed failing tests, due to new null checks, that did not exist in v8
* Avoid breaking changes
* Unbreak more things, even that it the old solution was crazy..
* Fixed bug where ordering of stream readings was changed..
* cleanup
Co-authored-by: Bjarke Berg <mail@bergmania.dk>