Commit Graph

134 Commits

Author SHA1 Message Date
Nikolaj Geisle
595ee242aa V14: Remove old backoffice project. (#15752)
* Move magical route to management api

* Move auth around

* Remove "New" cookies, as they are no longer needed

* Move all installer related

* Remove BackOfficeServerVariables.cs and trees

* Move webhooks to management api

* Remove remainting controllers

* Remove last services

* Move preview to management api

* Remove mroe extensions

* Remove tours

* Remove old Auth handlers

* Remove server variables entirely

* Remove old backoffice controller

* Remove controllers namespace entirely

* Move rest of preview

* move last services

* Move language file extension

* Remove old backoffice entirely (Backoffice and Web.UI projects)

* Clean up unused security classes

* Fix up installer route

* Remove obsolete tests

* Fix up DI in integration test

* Add missing property mapping

* Move core mapping into core

* Add composers to integration test

* remove identity

* Fix up DI

* Outcomment failing test :)

* Fix up remaining test

* Update mapper

* Remove the actual project files

* Remove backoffice cs proj

* Remove old backoffice from yml

* Run belissima before login

* Remove caching

* Refactor file paths

* Remove belle from static assets

* Dont refer to old project in templates

* update gitignore

* Add missing files

* Remove install view as its no longer used

* Fix up failing test

* Remove outcommented code

* Update submodule to latest

* fix build

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-02-27 12:40:30 +01:00
Jacob Overgaard
52a9939480 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	.artifactignore
#	build/azure-pipelines.yml
#	tests/Umbraco.Tests.AcceptanceTest/misc/umbraco-linux.docker
2024-02-02 13:48:28 +01:00
Ronald Barendse
30c1baecd7 Remove Linux only Docker build for E2E tests (#14042)
* Remove Linux only Docker build for E2E tests

* Fix cmsVersion variable

* Remove custom build number step (already done by Nerdbank.GitVersioning)

* Add and use global.json to configure .NET SDK version

* Only publish tests build output

* Only include unit tests and integration build output (without reference assemblies)

* Added "pr: none" to nightly trigger (#15044)

* Only run SQL Server Acceptance Tests on release builds or when parameter is set

* Use SQLite in-memory database and configure database optimizations (#15461)

* Disable content version cleanup and server election

* Reference Umbraco.Tests.AcceptanceTest.UmbracoProject instead of copying files

* Suspend/disable scheduled publishing

* Ensure all Playwright results are copied to the artifact staging directory

* Update E2E SQL Server job and also run on Linux

* Fix building acceptance test project

* Fix building acceptance test project (suing PrivateAssets)

* Explicitly disable building project references in E2E tests and use pre-built output

* Include obj folder of acceptance test project in build artifacts

* Download build artifacts

* Re-add PrivateAssets

* Revert to copying C# files to E2E application

* Disable Integrated Security for SQL Server on Linux

* Update SQL Server on Linux connection string

* Disable encryption on SQL Server for Linux

* Update SQL Server on Linux steps

* Add Database to SQL Server connection string on Linux

* Update Integration Tests and use SQL Server 2022 Docker image

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
(cherry picked from commit 0e1ca76d6e)
2024-02-02 13:40:09 +01:00
Bjarke Berg
95094361cc Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Packages.props
#	build/azure-pipelines.yml
#	src/Umbraco.Cms.Api.Delivery/Handlers/InitializeMemberApplicationNotificationHandler.cs
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoLogin/Index.cshtml
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.CollectionBuilders.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockListPropertyEditorBase.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueCreator.cs
#	tests/Directory.Packages.props
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDataType.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/helpLinks.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/BlockListPropertyValueConverterTests.cs
#	version.json
2023-12-13 15:34:22 +01:00
Ronald Barendse
8fefca557f Improve Central Package Management, update dependencies and fix package validation/MSBuild warnings (#15362)
* Use version overrides for ImageSharp 2

* Move Directory.Packages.props to root, use GlobalPackageReference and replace Microsoft.CSharp with Microsoft.CodeAnalysis.CSharp

* Replace NPoco.SqlServer with NPoco and remove unused System dependencies

* Fix package validation and MSBuild warnings

* Add nuget.config and enable package source mapping

* Remove explicitly set C# language version

* Add empty Directory.Packages.props file for acceptance test

* Downgrade SixLabors.ImageSharp back to 3.0.2 because of breaking changes

* Update ImageSharp/ImageSharp.Web to 3.1.0 and use ComputeHMAC
2023-12-06 08:19:46 +01:00
Bjarke Berg
ddf9f05a8f Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	version.json
2023-11-28 15:18:24 +01:00
Bjarke Berg
1f527fefd8 Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml
2023-11-28 11:20:02 +01:00
Bjarke Berg
280518c9d6 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Cms.ManagementApi/Umbraco.Cms.ManagementApi.csproj
#	src/Umbraco.Infrastructure/Logging/Viewer/LogViewerConfig.cs
#	src/Umbraco.Web.UI.Client/.nvmrc
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
2023-11-28 09:39:31 +01:00
Bjarke Berg
ab781560bc Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
2023-11-27 19:47:24 +01:00
Bjarke Berg
bf8af4588e Centralised NuGet packages (#15293)
* Moved to centralized nuget packages

* Handle JsonSchema

* Change PackageReference to PackageVersion

* Opt out of central package management for mangement api (at least for versions less than 14) and the UI project

* ManagePackageVersionsCentrally = false

* Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props

* Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props

* change working directory

* workingDirectory

* Force the template to use local nuget packages

* Force the template to use local nuget packages

* clean up

* added wait on

* added wait on
2023-11-27 15:18:00 +01:00
Bjarke Berg
fb55e1b244 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs
2023-11-14 13:22:10 +01:00
Bjarke Berg
cea6c3f20e Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-11-14 09:31:25 +01:00
Bjarke Berg
633f649be9 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/Umbraco.Cms.ManagementApi.csproj
#	src/Umbraco.Infrastructure/Cache/DistributedCacheBinder_Handlers.cs
2023-11-13 18:40:11 +01:00
Bjarke Berg
d6751e2832 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	version.json
2023-11-13 18:30:50 +01:00
Bjarke Berg
e13ab13183 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Build.props
#	src/Umbraco.Core/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/CompatibilitySuppressions.xml
#	src/Umbraco.Web.BackOffice/CompatibilitySuppressions.xml
#	src/Umbraco.Web.Common/CompatibilitySuppressions.xml
#	tests/Umbraco.Tests.Common/CompatibilitySuppressions.xml
#	tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml
2023-11-09 09:41:39 +01:00
Ronald Barendse
d301679e53 Include Umbraco.Web.UI.Login project, update compatibility suppressions and remove unnecessary package references (#15163)
* Fix Umbraco.Web.UI.Login not showing up in solution

* Update PackageValidationBaselineVersion  to 13.0.0-rc1 and remove all CompatibilitySuppressions.xml files

* Remove unnecessary package references

* Move Microsoft.EntityFrameworkCore.Design reference and add comment

* Disable package validation and fix override in tests

* Inherit package validation setting for EF Core projects
2023-11-09 08:39:42 +01:00
Bjarke Berg
e147c93cf9 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Build.props
#	build/azure-pipelines.yml
#	src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderAuthExtensions.cs
#	src/Umbraco.Cms.Api.Common/OpenApi/SwaggerRouteTemplatePipelineFilter.cs
#	src/Umbraco.Cms.Api.Common/Security/Paths.cs
#	src/Umbraco.Cms.Api.Delivery/Controllers/Security/MemberController.cs
#	src/Umbraco.Cms.Api.Delivery/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Cms.Api.Delivery/Handlers/InitializeMemberApplicationNotificationHandler.cs
#	src/Umbraco.Cms.Api.Delivery/Handlers/RevokeMemberAuthenticationTokensNotificationHandler.cs
#	src/Umbraco.Cms.Api.Delivery/Security/MemberApplicationManager.cs
#	src/Umbraco.Cms.Api.Delivery/Services/RequestMemberAccessService.cs
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoLogin/Index.cshtml
#	src/Umbraco.Core/Constants-OAuthClaims.cs
#	src/Umbraco.Core/Constants-OAuthClientIds.cs
#	src/Umbraco.Core/DeliveryApi/IApiContentQueryProvider.cs
#	src/Umbraco.Core/DeliveryApi/IApiContentQueryService.cs
#	src/Umbraco.Core/DeliveryApi/IRequestMemberAccessService.cs
#	src/Umbraco.Core/DeliveryApi/NoopRequestMemberAccessService.cs
#	src/Umbraco.Core/Models/DeliveryApi/ProtectedAccess.cs
#	src/Umbraco.Core/Services/ITagService.cs
#	src/Umbraco.Core/Services/UserService.cs
#	src/Umbraco.Infrastructure/Security/IMemberApplicationManager.cs
#	src/Umbraco.Infrastructure/Security/OpenIdDictApplicationManagerBase.cs
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/systemInformation.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	version.json
2023-10-26 09:48:05 +02:00
Jacob Overgaard
a27267e5d3 V13: New login screen (#14780)
* implement interface

* add build targets for login screen

* package lock

* move components to pages folder

* load logo and background from property

* styling

* move mocks around

* remove unused vars

* add backoffice handlers

* install rxjs

* add mock data

* add element and context for localization

* mock data

* use umb-localize

* remove the extra logic with check for section_

* change key for login button

* add base to vite environment

* login styling

* cleanup and button styling

* use correct reset url

* change body of reset request

* validate password reset code

* redirect to /login/new on reset password code verify

* add obsolete messages

* remove inline scripts for old backoffice

* remove shadowdom from localize element

* Revert "remove shadowdom from localize element"

This reverts commit 46ae282f7ce9235c15f160d57d54acd5d3378668.

* hook up reset password to api

* rename pages to state as it is not actually used as different pages

* reset password styling

* more styling

* add confirmation page to new password

* set router to firstUpdated to avoid rAF

* set a custom baseUrl on the router to make sure it works without trailing slash

* use route parameters to redirect on the login page to ensure correct escaping

* add server variables

* make sure auth layout uses the provided properties for images

* format

* redirect to code expired page

* add missing properties

* use allowPasswordReset and allowInvite properties in routing and layout

* make ts happy

* cleanup

* init invite page

* hook up usernameIsEmail

* init external login providers

* add mock provider

* add padding to buttons

* replace uui button with normal button

* add external login providers as slot

* add disableLocalLogin property

* add form to external login providers

* remove unused method

* fix build errors

* add attributes for external login

* add custom view to external login

* add new custom icon registry

* attach two icon registries

* use relative paths

* use relative paths

* use main registry instead of providing directly

* add look and color to external login

* implement getIcons() method

* use getIcons() to request icons

* install remixicon to supplement backoffice icons (replacing font-awesome eventually)

* move icon registries to auth element

* Revert "install remixicon to supplement backoffice icons (replacing font-awesome eventually)"

This reverts commit 0c6659d8d9dfe0664314ec6a3acaa8e20cb606ed.

* add icons for common external providers

* add more icons

* remove resetCode hack as it is no longer needed

* add validation to new password

* get gretting from translation file

* add hack to get text left aligned in uui-button

* add custom router

* WIP Use router

* also change the URL during an action

* update login action to redirect to /new when needed

* redirect to login from reset and new if not allowed

* fix new password button href

* use property on login element instead of context

* check for redirect on invite-user

* move fake external login providers to index.html for use in dev server

* allow password reset on dev server

* add look and color

* only set styles for default view buttons

* suppress vite import warning

* check and inform for errors and show 'nothing' if a custom view fails to load

* fix mock path for localizedtext

* fix build errors

* ensure that msw (and all its dependencies) do not end up in the production bundle (saved ~500 KB)

* Revert AngularValueExternalLoginInfoScriptAsync removal

* forward the providerName to custom views

* change default icon

* add button look and color to external login provider options

* add obsolete to ButtonStyle and add a mapper to new values

* add required xml comments

* map external login providers to <umb-login-external />

* fix typo

* only show external login layout if there are slotted children

* pass on name as "provider"

* send externalLoginUrl to custom views

* cleanup

* global import

* hide external logins completely when empty

* cleanup

* setup redirect to invite

* rename pages to name-page

* fix names and paths

* use new password layout for invite and new password

* add comments

* cleanup and use confirmation element

* set parameters after successful verifyinvite

* map display-name and provider-name to the external element

* map display-name

* set up external login to handle correct display- and provider-name with documentation

* add support for disabling local login

* update path to handlers

* add more localization

* add handlers for 2fa

* router should support a factory for component

* push login to ?flow=mfa on 402 codes

* add page to handle 2fa/mfa

* add support for custom routing

* add fallback for welcome greeting

* handle AngularJS silliness

* fix typo

* fix router and replace custom umbroute:statechange  event with native pushState

* simplify code and cleanup

* a11y improvements

* you can now navigate to anywhere from anywhere with pushState

* access the "twoFactorView" from the backend

* set the default implemented twoFactorView to NULL

* add initial logic to handle a custom mfa view

* roll back custom pushState changes

* add mocks for 2fa custom view

* use router redirect

* re-enable click url change

* cleanup

* remove debug buttons

* add unsafeHTML to localize element

* load mfa custom views

* load custom view

* improve external login custom views

* using optimisation

* add current culture

* only show mfa page if 402 code has been encountered in same session

* format

* remove unnesesary action

* add new user invite password

* remove console log

* fix getting stuck at new password page if you've triggered custom validity

* unify layouts

* add styling to buttons in error layout

* remove unused css

* add error message to new password page

* add error message to reset password

* add error message to invite page

* fix invite page not being rendered

* cleanup

* add obsolete notice to PostSetInvitedUserPassword

* add request model to set a new password for an invited user

* add new method to handle invited user password

* add get password config api call

* fix password config parameters and add invite call

* get invited user

* get password config

* assign unique guid to login project

* add userId to get password config and use the config as validation

* fix

* add alerts

* fix the new password layout

* auth redirects invite error to error page

* use password config on new password page

* remove console log

* move file and remove unused extension

* make ts happy

* file structure

* rename login-extern to external-login-provider

* update element name

* update dependencies

* export custom-view.element.ts

* remove debug

* use umb-custom-view to load custom views

* build types

* move @umbraco/uui to the login app and import from there in backoffice

* make the ui library and icon registry generally available as exports from the login app

* add mock handler for icons

* cleanup package

* use uui for external login providers in the backoffice

* add imports and enable the backoffice icon registry globally

* disable shadowdom

* default background image

* use undefined

* revert angular values

* remove legacy sys variables

* add logic to handle mfa in an overlay scenario without routing

* add new login screen to replace the overlay when logged in to the backoffice

* update spec to work with locators

* cleanup of legacy context

* ViewData is not always required

* add method to solely return the default view of the backoffice to simply BackofficeController as well as unit tests

* add test for the login view

* cleanup usings

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* remove 'remember me'

* add more contrast to external login divider

* update dependencies

* set "lang" attribute to lowercase

* remove default headline

* localize the "Or" divider and add aria-hidden

* remove Umbraco reference from logo and add aria-hidden

* add aria-hidden to uui-icon inside external login buttons

* format code

* update dependencies

* update dependencies

* add translations to invite user page

* use back to login button

* update localization-context.ts to match api from old LocalizeService in Angular

* add tsc to watch

* formatting

* add missing localizations

* fix a11y issues with muted text

* refresh current user after login

* remove unused variable

* add localization

* add localization for error messages

* remove unused var

* return user after login and set successful auth

* retry request queue after login

* add language keys for failed login

* add language keys for failed login

* render the views without a router so that it works inside a modal in the backoffice

* add autocomplete to reset password fields

* add autocomplete to login screen

* add generic error layout to new-password-page

* new-password-layout should be able to handle with and without username

* update language keys

* check for userId before trying to request invited user

* show error when no invited user is found

* place back-to-login button on all error layouts

* update lockfile

---------

Co-authored-by: Jesper Møller Jensen <26099018+JesmoDev@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-10-23 10:06:17 +02:00
Kenn Jacobsen
0496fba70b Fix EFCore.Sqlite and EFCore.SqlServer project load in solution file (#14480) 2023-06-29 18:36:29 +02:00
Bjarke Berg
4aa7001fbf Merge remote-tracking branch 'origin/v12/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Infrastructure/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
2023-06-27 09:50:37 +02:00
Bjarke Berg
2973f9fe5a Add OpenIddict tables to database (#14449)
* Added migrations to install EF Core OpenIddict tables

* Handle Install of ef core data (Needs to be outside of transaction

* Cleanup and renaming, as these things will be reused for more than openiddict in the future

* Cleanup

* Extract db context setup

* Minor cleanup

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-06-26 13:50:57 +02:00
Bjarke Berg
28712bd5cd Make new backoffice packable (#14286)
* This moves around files and deletes the temp projects with files that are not moved to Core, Infrastructure etc.

Also moves the from new backoffice to static access, and override those with the old views in the legacy executeable

* Removes old files from the new executeable.

* Added missing files

* Added EF Core project to solution file

* fix build
2023-05-25 10:38:44 +02:00
Bjarke Berg
2922c1fc92 Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderApiExtensions.cs
#	src/Umbraco.Cms.Api.Delivery/Controllers/DeliveryApiControllerBase.cs
#	src/Umbraco.Core/CompatibilitySuppressions.xml
#	src/Umbraco.Web.Common/Configuration/ConfigureApiVersioningOptions.cs
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts
2023-05-12 11:42:15 +02:00
Nikolaj Geisle
487e85cacd Entity Framework Core Support (#14109)
* Add UmbracoEFCore project

* Add EFCore composer

* Add Locking Mechanisms

* Add scope interfaces

* Add excecute scalar extension method

* fix up query in locking mechanism

* Add scoping

* Add scoping

* Add test DbContext classes

* add locking test of EFCore

* Creat ScopedFileSystemsTests

* Add EFCoreScopeInfrastructureScopeLockTests

* Add EFCoreScopeInfrastructureScopeTests

* Add EFCoreScopeNotificationsTest.cs

* Add EFCoreScopeTest.cs

* Remake AddUmbracoEFCoreContext to use connection string

* Remove unused code from extension method

* Reference EFCore reference to Cms.csproj

* Remove unused parameter

* Dont have default implementation, breaking change instead

* Add compatability suppression file

* Updated EFCore packages

* Use timespan for timeout

* Allow overriding default EF Core actions

* Option lifetime needs to be singleton

* Use given timeout in database call

* dont use timespan.zero, use null instead

* Use variable timeout

* Update test to use locking mechanism

* Remove unneccesary duplicate code

* Change to catch proper exception number

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-12 09:25:19 +02:00
Ronald Barendse
b0d19bf9d2 v12: Rename V2 to Umbraco.Cms.Imaging.ImageSharp2 (#14223)
* Rename Umbraco.Cms.Imaging.ImageSharp.V2 to Umbraco.Cms.Imaging.ImageSharp2

* Rename Umbraco.Cms.Imaging.ImageSharp to Umbraco.Cms.Imaging.ImageSharp3

* Rename Umbraco.Cms.Imaging.ImageSharp3 back to Umbraco.Cms.Imaging.ImageSharp
2023-05-11 11:01:59 +02:00
Mole
5e9ce916cf V12: Update ImageSharp V3 and Add Legacy V2 Project (#14216)
* Rename old imagesharp to v2

* Add Ronalds PR as imagesharp

* Ensure that we use V3 by default
2023-05-09 10:09:54 +02:00
Bjarke Berg
0f1c2f7022 Ensure no management api for v12 (#14197)
* Remove management api

* Remove actual files
2023-05-04 13:32:41 +02:00
Bjarke Berg
fff393c9ed Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/ManagementApiComposer.cs
#	src/Umbraco.Core/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/CompatibilitySuppressions.xml
2023-04-19 11:42:01 +02:00
Bjarke Berg
c06e89af64 Content Delivery API (#14051)
* Add the core parts of the headless PoC

* Add Content API project (WIP - loads of TODOs and dupes that need to be fixed!)

* Rename the content API project and namespaces

* Fixed bad merge

* Rename everything "Headless" to "ContentApi" or "Api"

* Refactor Content + Media: Key => Id, Name not nullable

* Make Content API property return value types independent of datatype configuration

* Clean up refactorings

* First stab at an expansion strategy using content picker as example implementation

* Use named JSON options for content API serialization

* Proper inclusion and registration of the content API

* Introduce API media builder

* Make MNTP return API content/media depending on configuration (instead of links) and support output expansion

* Content API: Get by controllers (#13740)

* Adding ContentApiControllerBase

* Adding get by id and url controllers

* Change route of get all test controller

* Rename to ContentApiController

* Refactoring

* Removing test controller

* Content API: Add start-node header value to deal with url collisions (#13746)

* Use start-node header value to deal with url collisions

* Cleanup

* Rename "url" param to "path"

* Adding a start node service to get the start-node header value

* Trim '/' from both beginning and end

* Content API: Support Accept-Language header (#13831)

* Move the content API JSON type resolver to an appropriate namespace

* Add localization based on Accept-Language header

* Content API: Output expansion  (#13848)

* Implement request based output expansion strategy + expansion output cache at property level

* Slighty leaner implementation for default output expansion strategy

* Clarify the code a bit

* Fix bad merge

* Encapsulate content API dependencies in the DI

* Support multi-site and multi-culture routing + a little rename/refactor (#13882)

* Support multi-site and multi-culture routing + a little rename/refactor

* Make the by route controller handle root nodes

* Rename Url to Path in API content output

* Add a few comments for magic route creation

* Rename services from "Default" to "Noop"

* Ensure that Umbraco can boot without adding "AddContentApi()" to ConfigureServices

* Moved incorrectly placed media builder

* Fix API routes (#13915)

* Fix multi URL picker value converter trying to access disposed objects in edge cases

* Delivery API: Content routing and structure (#13984)

* Introduce content route instead of content path, rename and rework start item (previously start node) handling

* Strip out start node path in generated route path

* Make the start-item header take precedence over the request domain

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Include umbraco properties (width, height, ...) in the Media Properties collection (#14023)

* Move umbraco properties (width, height, ...) to the Properties collection of the API Media model

* Don't output the umbracoFile property of media items

* Add content type deny list (#14025)

* Create a deny list of content types and utilize it for output generation

* Add unit tests

* Dedicated property cache level for Content API (#14027)

* Support redirect tracking (#14033)

* Create a deny list of content types and utilize it for output generation

* Add unit tests

* Handle redirect tracking in the content API

* Include start item routing info for redirects

* Add cultures and their routes to the API output (#14038)

* Create a deny list of content types and utilize it for output generation

* Add unit tests

* Handle redirect tracking in the content API

* Include start item routing info for redirects

* Add culture routes to root output (for HREFLANG support)

* Rename redirect service method to better match its purpose

* Review changes

* Delivery API: Query controller (#14041)

* Initial commit

* Custom ContentAPIFieldDefinitionCollection

* Make index IUmbracoContentIndex

* Add querying for children by parent id (key)

* Add missing interface

* Adding querying endpoint

* Test code

* Compose unpublishedValueSet, so that you get the correct data in the ContentAPI index

* Renaming

* Fix ancestorKeys index values

* Adding IApiQueryExtensionService to be able to query the ContentAPI index in a generic way

* Fix IApiQueryService and clean up QueryContentApiController using it

* Support querying for path

* Fix content API indexing

* Fix default sorting

* Implement concrete QueryOption implementations

* Introduce new ExecuteQuery that uses the Core OptionHandlers

* Implement ExecuteQuery

* Change ExecuteQuery signature and implementation

* Implement demo sorting and fetching

* Add query option handlers and collection builder for them

* Cleanup

* Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)"

This reverts commit 78e1f748e55383baecd123d06457111e18f13365.

* Revert "Delivery API: Content routing and structure (#13984)"

This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75.

* Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases"

This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db.

* Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)"

This reverts commit 78e1f748e55383baecd123d06457111e18f13365.

* Revert "Delivery API: Content routing and structure (#13984)"

This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75.

* Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases"

This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db.

* Fix multi URL picker value converter trying to access disposed objects in edge cases

* Delivery API: Content routing and structure (#13984)

* Introduce content route instead of content path, rename and rework start item (previously start node) handling

* Strip out start node path in generated route path

* Make the start-item header take precedence over the request domain

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Test commit

* Refactored interfaces for the query handlers and for the selectors (that will handle the value of the fetch query option)

* Implemented a base class for the query options

* Refactored the names of the selectors and made use of the base class

* Refactored the ApiQueryService

* Refactored the QueryContentApiController.cs

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Fixing merge gone wrong

* Fix multi URL picker value converter trying to access disposed objects in edge cases

* Delivery API: Content routing and structure (#13984)

* Introduce content route instead of content path, rename and rework start item (previously start node) handling

* Strip out start node path in generated route path

* Make the start-item header take precedence over the request domain

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Make fetching work with the new setup

* Moving files to dedicated folders

* Removing ? for array

* Rename selector query method

* Implement FilterHandler and some filters

* Implement SortHandler and sort some sorts

* Refactoring

* Adding more fields to index due to querying

* Appending filtering and sorting queries

* Implementing a new ISelectorHandler without Examine types

* Re-implementing the collection to have a dedicated one for the selectors

* Implementing a new IFilterHandler without Examine types & refactoring the filters implementing it

* Adding a new collection dedicated to filters

* Renaming the old collection

* Implementing a new ISortHandler without Examine types & refactoring the sorts implementing it

* Adding a new collection for the sorts & adding all collections to UmbracoBuilder.Collections

* Refactoring the service to use the new collections and types

* Refactoring the fields in ContentApiFieldDefinitionCollection

* Remove nullability in Handlers

* Don't return null for selector

* Add TODO for having the filters support negation

* Changing the SortType to FieldType with our custom types on the SortOption

* Fix AncestorsSelector

* Fix ApiQueryService

* Documentation

* Fix Swagger docs

* Refactor the QueryContentApiController

* Adding handling for the IApiContentResponse in the JsonTypeResolver

* Refactor the service to use a safe fallback value in Examine queries

* Adding Noop for the IApiQueryService

* Cleanup

* Remove comment

* Fix name field for indexing

* Don't inherit QueryOptionBase in filters

* Fix casing for API index constant + swap FIXME with TODO

* Add TODO for handling missing fetch with start-item header

* Rename query handler parameters to not leak source (i.e. query string)

---------

Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Elitsa <>
Co-authored-by: Zeegaan <nge@umbraco.dk>

* Delivery API: Adding pagination to query endpoint (#14083)

* Adding pagination to query endpoint

* Optimize the paging using Examine directly

* Fix comment

* Remove skip/take code duplication

---------

Co-authored-by: kjac <kja@umbraco.dk>

* Add missing CompatibilitySuppressions.xml

* Make Delivery API packable

* Make Api.Common packable

* Renamed extension method and namespace so it is discoverable

* Untangle ApiVersion configuration into api.common, so delivery api do not require the management api to boot.

* configure options in management api

* RTE output as JSON for Content API (#14067)

* Conditionally serve RTE output as JSON instead of HTML

* Fixed merge

* Rename to Delivery API (#14119)

* Rename ContentApi to DeliveryApi

* Rename delivery API index implementation

* Update comments from "Content API" to "Delivery API"

* Rename project from Content to Delivery

* Add dedicated controller base for content delivery API

* Rename delivery API content index to include "content" specifically

* Fix compat suppressions

---------

Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-04-19 11:21:31 +02:00
Elitsa Marinovska
70aa626991 Fix sln file for the new backoffice (#13765)
* Fix sln file and add README commands to get started

* expand the docs a bit

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2023-02-01 10:37:21 +01:00
Elitsa Marinovska
aa90efa5b7 New Backoffice: Log viewer controller (#13648)
* Fixing a few nullable reference types for log viewer (#13634)

(cherry picked from commit b4ca2a6636)

* Adding LogControllerBase

* Migrating GetLogLevels()

* Migrating GetNumberOfErrors()

* Migrating GetLogLevelCounts()

* Migrating GetCanViewLogs()

* Migrating GetMessageTemplates()

* Migrating GetLogs()

* Migrating GetSavedSearches()

* Migrating PostSavedSearch()

* Migrating DeleteSavedSearch()

* Adding LoggerViewModel

* Adding LogViewModelMapDefinition

* Update OpenApi.json

* Cleanup

* V12: Change nullability for the log searches (#13647)

* Changing nullability

* Obsolete DeleteSavedSearch since the query param is not used

* Fix a bit more referenced

* Add default implementation for the new overload of DeleteSavedSearch

(cherry picked from commit 5e06f5a8a0)

* Updates based on nullability fix

* Adding GetSavedSearchByName

* Implementing ByName endpoint

* Refactoring Delete endpoint based on GetSavedSearchByName

* Refactoring Create endpoint to return the item's location

* Suppress new GetSavedSearchByName in ILogViewer interfaces

* Update OpenApi.json

* Adding github initials to FIXME

* Renaming

* Moving files to Core proj

* Adding GetLogs with skip and take

* Introducing ILogViewerService

* Supressing xml for ILogViewer.GetLogsAsPagedModel()

* Changing to our own Enum representation of LogLevel

* Creating ILogEntry needed for GetPagedLogs()

* Refactoring controllers to use the new logViewerService

* Removing base class methods since those have been moved to the new service

* Removing ErrorCountLogViewerController since the result can be calculated from another endpoint

* Refactoring the MapDefinition because of the new return types from the service

* Update OpenApi.json

* Obsoleting old methods in favor of the ILogViewerService

* Cleanup

* Fixing enum representation as strings for Swagger

* Adding documentation

* Changing enum representation to string in OpenApi.OpenApi.json

* Fix FIXME (use CreatedAtAction)

* Removing JsonStringEnumConverter as there should be another way to fix enum representation for Swagger

* Removing MappingBuilderExtensions and making specific LogViewerBuilderExtensions

* Changes to the .sln file

* Take only the result in the response

* Register the LogViewer extensions

* Update OpenApi.json

* Fix the supressions.xml

* Add inheritdoc

* Remove GetSavedSearchByName as it isn't necessary to introduce it anymore

* Obsolete interfaces

* Rename ViewPermission controller to ValidateLogFileSize

* Make rest of the methods async

* Route name change

* Remove methods obsoletion

* Introduce the "attempt" pattern

* Refactoring of ILogViewerService

* Refactoring controllers

* Another OpenApi.json update

* Adding fixme

* Re-add new client project

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-01-25 11:53:42 +01:00
Jacob Overgaard
9c00c95f01 v13: New Backoffice in CMS (POC) (#13664)
* Added a new executeable to new backoffice

* add new backoffice client as submodule

* add new backoffice client as project

* add bootstrap of backoffice client

* experimentally allow CORS from local vite app running the backoffice

* fix base path

* move new backoffice projects to NewBackoffice folder

* add support for redirect urls to login page (temporary)

* update references to v13

* override databaseinstall/index.cshtml

* copy ignore lines from normal project

* remove redirect to AuthorizeUpgrade

* codeql: checkout submodules

* Section catch-all route

* fixed tests

* remove starter-kit file

* remove grid views

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-01-18 15:02:59 +01:00
Bjarke Berg
aec88e8418 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2022-12-14 09:11:30 +01:00
Kenn Jacobsen
801966f1ae Created a common library for the APIs (#13530)
* Created a common library for the APIs and moved stuff that is required for the new content API. Also moved the versioned backoffice API route handling to the management API where it belongs.

* Remove test auth attribute from Media
2022-12-09 08:52:17 +01:00
Kenn Jacobsen
bc94b2e16c Rename management API from Umbraco.Cms.ManagementApi to Umbraco.Cms.Api.Management (#13512) 2022-12-02 11:33:02 +01:00
Matthew Care
67c60d8a19 Update to latest framework version
Update reference to old framework version in web site projects
2022-11-30 16:16:08 +01:00
Ronald Barendse
2e54579a2f Simplify JSON schema, generation, copying and updating (#13427)
* Simplify JSON schema and only generate appsettings-schema.Umbraco.Cms.json

* Use Umbraco.JsonSchema.Extensions to dynamically add JSON schema references

* Move DependentUpon items to shared MSBuild props

* Update LangVersion to latest

* Update Umbraco.GitVersioning.Extensions to 0.2.0

* Remove JSON schemas on clean

* Remove Umbraco.JsonSchema.Core project

* Fix JSON schema nullability

* Ignore additional JSON schema files in template

* Update CompatibilitySuppressions.xml

* Remove GlobalSettings.UmbracoPath from JSON schema again

* Remove RemoveUmbracoJsonSchemaFiles target

* Update Umbraco.JsonSchema.Extensions to 0.2.0 and add weights

* Flatten generated JSON schema hierarchy

* Remove LicensesSettings from CMS codebase

* Change AdditionalParameters to IDictionary
2022-11-22 12:48:11 +01:00
Zeegaan
b797350d00 Post-merge 2022-10-05 15:16:43 +02:00
Zeegaan
9243c59ce9 Merge branch 'v10/dev' into v11/merge/merge-v10-to-v11
# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	.gitignore
#	Directory.Build.props
#	build/azure-pipelines.yml
#	src/JsonSchema/Options.cs
#	src/JsonSchema/UmbracoJsonSchemaGenerator.cs
#	src/Umbraco.Cms.ManagementApi/DependencyInjection/FactoryBuilderExtensions.cs
#	src/Umbraco.Cms.ManagementApi/ManagementApiComposer.cs
#	src/Umbraco.Cms.ManagementApi/OpenApi.json
#	src/Umbraco.Core/Models/Mapping/DictionaryMapDefinition.cs
#	src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs
#	tests/Directory.Build.props
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/packages.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts
#	tests/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs
2022-10-05 14:29:41 +02:00
Ronald Barendse
bc21c64617 v10: Cleanup project files (#13111)
* Backport project cleanup from #12907

* Remove empty Directory.Build.props

* Fix GenerateAppsettingsSchema target

* Re-add empty Directory.Build.props to prevent inheritance

* Add NRT to-do comment

* Explicitly generate HTTPS development certificate for E2E test
2022-10-05 12:11:51 +02:00
Ronald Barendse
3873a0735c v11: Decouple dependencies (#12907)
* Move core dependencies and MSBuild targets from Umbraco.Cms to Umbraco.Cms.Targets

* Re-add appsettings.Tests.json

* Include appsettings-schema.json

* Use .NET 7.x in CodeQL build

* Fix duplicate Directory.Build.props import

* Decouple ImageSharp/ImageSharp.Web implementations

* Further decouple SqlServer implementation

* Add SupportedImageFileTypes to IImageDimensionExtractor

* Update descriptions

* Update project metadata

* Re-enable package validation

* Add embedded package icon

* Move ContinuousIntegrationBuild to build script

* Move shared properties to root Directory.Build.props

* Fix GetInstallState throwing exception when default provider isn't configured

* Remove redundant PackageRequireLicenseAcceptance and update version to 11.0.0-rc1

* Update build script

* Remove LangVersion preview

* Disable app-local ICU for MacOS integration test

* Disable app-local ICU for all integration tests

* Fix RuntimeState_Run test assertion

* Update projects and build script to require Node.js 16.17 (latest LTS)

* Remove app-local ICU from unit tests

* Add missing project reference

* Generate XML documentation files

* Expose management API in Web.UI project

* Update .NET 7 dependencies to RC1

* Update package-lock.json files

* Downgrade Cypress version
2022-09-27 14:22:34 +02:00
Mole
748fb7d1f7 Implement new backoffice installer (#12790)
* Add new BackOfficeApi project

* Add swagger

* Add and route new install controller

* Add new install steps

* Add Setup endpoint

* Add missing RequiresExecution methods

* Fix nullability of databasemodel

* Move user information to separate model

* Remove ping method

* Add view models install data

* Move mapping folder

* Move ViewModels

* Add settings endpoint

* Remove unused binderprovider

* Postfix RequiresExecution with async

* Update NewDatabaseUpgradeStep to not depend on install step

* Add installstep collection

* Move registration into backoffice project

* Add InstallService

* Use service in controller

* Add upgrade to install service and use in controller

* Correctly check is database is configured

* Reorganize

* Reorganize into new core and infrastructure

* Rename steps

* Rename BackofficeApi to MangementApi

* Make install step an interface instead of abstract class

* Rename InstallStep to create CreateUserStep

* Move restart runtime and sign in user into install steps

* Move install service into new core project

* Map controllers in composer

* Restrict access to installcontroller based on runtime level

* Use FireAndForget when logging install

* Use actionresult instead of iactionresult

* Set new projects as not packable

* Link to backoffice in 201 response when installed

* Register installations

* Add custom backoffice routing template token

* Move umbraco path trimming out of application convention

* Make it easier to route to backoffice api

* Make swagger version aware and move behind backoffice path

* Obsolete old install classes

* Move maps into single file

This is all mappint to/from viewmodels in some manner

* Remove usage of InstallSetupResult

* Move new projects to the src folder

* Remove InstallationType from IInstallStep

This upgrade steps should implement their own IUpgradeStep interface

* Remove upgrade from service and controller

This should be its own service and controller

* Add xml docs

* Remove internals visible to

* Disable package validation for new projects

Quite the gotcha here, if the projects are brand new, there is no nuget packages to compare with, this causes the build to fail.

* Add ValidateDatabase endpoint

* Remove project references to new backoffice

We don't actually want to depend on this yet, it's just needed for testing/development

* Obsolete installationtype

* Add DatabaseSettingsFactory tests

* Add InstallServiceTests

* Fix InstallServiceTests

* Test RequireRuntimeLevelAttribute

* Implement new backoffice upgrader (#12818)

* Add UpgradeSettingsModel and viewmodel

* Add upgrade/settings endpoint

* Implement upgrade steps

* Add upgrade step collection

* Add UpgradeService

* Add authorize endpoint to UpgradeController

* Fix interface

* Add upgrade service tests

* Remove runtime check in databaseinstallstep

* Move RequireRuntimeLevel to controller

* Add a readme to the new backoffice part

* BackOffice not Backoffice

* Add conditional project references

* Fixes based on review

* Fix up

* Move running of steps into its own method in UpgradeService

* Make services transient

* More fixup

* Log exceptions when running steps
2022-08-29 09:50:48 +02:00
Mole
5c09af11dc Clean solution file (#12830)
* Remove docs folder

* Re-add docfx files

I think it makes sense to have these in the solution, however it's a build concern really, not a documentation in the sense that you'll learn anything from it.

* Remove build.ps1 scripts - it's not a thing in v10

* Add version.json to the solution file
2022-08-17 13:08:07 +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
Bjarke Berg
bc49fa5b3f Move default item excludes to root package (#12339)
* Moved DefaultItemExcludes to Umbraco.CMS package

* Use exact path to build props

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-05-03 17:15:38 +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
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
Sebastiaan Janssen
4469191c99 Updating some more obsolete Code of Conduct usages 2022-03-18 13:40:03 +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
Paul Johnson
548870d59d Fix whitespace in sln
(cherry picked from commit a34e278a40)
2022-02-14 14:47:07 +00:00