Compare commits

...
Author SHA1 Message Date
Bjarke Berg 2b7785fcd3 https://github.com/umbraco/Umbraco-CMS/issues/15195 Fixed issue with media not cached correct (#15196) 2023-11-14 09:14:39 +01:00
Bjarke Berg d112ba5e40 Bump version 2023-11-14 09:11:58 +01:00
Kenn JacobsenandBjarke Berg 80fac866c9 Ensure invariant properties return the correct cache value at source level (#15145)
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-11-07 09:02:08 +01:00
Elitsa MarinovskaandBjarke Berg d35c6f0e94 Update correct action (#15142)
(cherry picked from commit ffaa77eb25)
2023-11-06 17:56:08 +01:00
Bjarke Berg b12d88818d bump version 2023-11-06 17:54:38 +01:00
Zeegaan 10264f244b bump version 2023-11-02 09:14:18 +01:00
Zeegaan 609a3ebca1 Merge branch 'release/12.3.0' into v12/dev 2023-11-02 08:53:11 +01:00
Nikolaj Geisle c42eb28129 Bump version 2023-11-01 14:40:51 +01:00
Bjarke Berg c6e760c114 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-11-01 12:24:04 +01:00
Bjarke Berg 1ce71b6760 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-11-01 12:21:12 +01:00
Elitsa MarinovskaandNikolaj Geisle fc81cc8f38 Check content permissions before performing action (#15043)
* Setting actionContext.Result when authz wasn't successful

* Taking into account permissions when it is a new node

* Cleanup

* Passing nodeId as path when new item
2023-11-01 11:50:24 +01:00
Nikolaj GeisleandGitHub 52fd853d52 Move to core (#15084) 2023-11-01 11:47:27 +01:00
Nikolaj Brask-NielsenandNikolaj Geisle d5ff80352e Fix custom dbcontexts extention methods (#14937)
* test: Create failing test

* feat: New extension methods for adding Umbraco DBContexts

* test: Cleaned up integration tests
2023-11-01 10:06:17 +01:00
Jacob Overgaard 107a70ad31 bump @umbraco-ui/uui from 1.4.0 to 1.5.0 2023-10-30 14:54:53 +01:00
Jacob Overgaard bab06b7749 bump @umbraco-ui/uui from 1.4.0 to 1.5.0 2023-10-30 14:50:00 +01:00
de12019fea Bugfix: UI for preview bug related to single language & non variant content (#15032)
* Bump tinymce from 6.7.0 to 6.7.1

* Ensure PackageVersion is set correctly before transforming template.json

* rerun watchers every time we reinit the data

* handle variant content with only one language

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2023-10-26 09:25:50 +02:00
Bjarke Berg e7f4d321c5 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-10-26 09:02:42 +02:00
Bjarke Berg 610080afc4 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-10-26 09:02:04 +02:00
Ronald BarendseandGitHub 0170ecaec1 Ensure PackageVersion is set correctly before transforming template.json 2023-10-23 11:17:40 +02:00
Jacob Overgaard 3936fec57f Bump tinymce from 6.7.0 to 6.7.1 2023-10-23 09:41:15 +02:00
Ronald BarendseandGitHub 2c572c6f72 Only pack transformed template.json file
When building and packaging at the same time, the original template.json file was still included in the generated NuGet package, which resulted in duplicate files with the same name. This change explicitly disables packaging the original file, ensuring only the transformed template.json file (containing the current Umbraco version) is included.
2023-10-19 10:49:10 +02:00
Ronald BarendseandGitHub 0c7f9ec64f Fix unrecognized value stageDependencies in jobs 2023-10-18 14:58:44 +02:00
Ronald BarendseandGitHub eac6af6878 Use correct stage to stage condition dependencies 2023-10-18 14:52:08 +02:00
Kenn JacobsenandGitHub 684508643f Ensure additional preview URLs work on non-variant content (#14995) 2023-10-18 10:45:16 +02:00
Jacob OvergaardandGitHub 4a63788079 V12: Update Backoffice dependencies: jQuery, TinyMCE, SignalR, Ace Editor, Umbraco UI Library (#14994)
* bump @microsoft/signalr to 7.0.12

* bump @umbraco-ui/uui to 1.4.0

* bump ace editor to 1.30.0

* bump frontend build dependencies

* bump jquery to 3.7.1

* bump tinymce to 6.7.0

* bump frontend test suite tools
2023-10-18 10:44:06 +02:00
Sebastiaan Janssen 9c1abf23b0 Merge branch 'contrib' into v12/dev 2023-10-17 13:27:10 +02:00
Lucas Bach BisgaardandGitHub 738749b705 Fixes #14351 - Using Fallback to default langauge on a specific item changes the whole VariationContext (#14620) 2023-10-17 13:24:24 +02:00
0a8b12793e Add config to limit concurrent logins (#14967)
* Add new config options

* Change validation interval + related changes

* Fix typo

* Temp fix

* Set new setting to false for new dotnet projects

* Added logic to update security stamp on sign in + fixed wierd code calling handle signIn twice

* Cleanup

* Adding empty ctors

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-10-17 10:23:52 +02:00
Kenn JacobsenandGitHub ea4f07bd08 Create matcher policy to pick the correct item endpoint (#14987) 2023-10-17 08:55:09 +02:00
7cf1ad7592 add Audit Trail to the media info tab just alike the conten (#14781)
* add Audit Trail to the media info tab just alike the conten

* Change the tranlation from "content ..." to "Media ..."

---------

Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>
2023-10-16 16:55:30 +01:00
Sebastiaan Janssen 13913cd9fb Merge branch 'v12/dev' into contrib
# Conflicts:
#	version.json
2023-10-16 12:53:07 +02:00
Kenn JacobsenandGitHub 4bd9baa2eb Backport Delivery API member auth from V14 (#14964)
* Backport Delivery API member auth from V14

* Add default implementations to avoid breakage

* Review changes
2023-10-16 11:25:29 +02:00
4520fbe5b8 Out-of-date models status flag is created when using SourceCodeManual and Development Runtime (#14966)
* Update UmbracoBuilderDependencyInjectionExtensions.cs

* Remove duplicate OutOfDateModelStatus handlers

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2023-10-16 10:46:58 +02:00
Owain JonesandGitHub 1b3642e7f3 Updated Welsh lang file (#14978)
* Added missing Welsh translations

* added missing mfa en_us keys

* Removed outdated lang keys from the cy lang file

* Fixed some instances of &lt;/&gt; to use actual angle brackets in the cy lang file.
2023-10-15 01:09:09 +02:00
0b5d1f8aa6 Fix for fallback file upload (#14892)
* Added check for file type

* Removed unneeded null checks and fixed tabs

* Cleaning

* Cleanups, cleanups, and removal of unneeded null checks

* Reverted removal of relationshipservice

* Revert null check removals (too risky)

---------

Co-authored-by: Ambert van Unen <AvanUnen@ilionx.com>
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2023-10-14 17:13:26 +02:00
Georgina BidderandSebastiaan Janssen 8b1191c332 help links tests + clean up of system info 2023-10-14 16:04:15 +02:00
Bjarne FyrstenborgandEmma L Garland 70d36301ab Remove duplicate name attribute in 2FA login form 2023-10-14 10:56:34 +01:00
Bram HovenandGitHub b8928e9de0 Add IExceptionHandlerFeature check to dynamic route check (#14905)
* Add IExceptionHandlerFeature check to dynamic route check

* Decrease code complexity
2023-10-14 02:01:59 +02:00
Erik-Jan WestendorpandEmma L Garland 73fc6bdcdf a11y improvement 2023-10-13 13:47:53 +01:00
b850cd3ee0 Add SetMemberSignInManager builder extension (#14761)
* Add SetMemberSignInManager builder extension

* Added required using statement

---------

Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
2023-10-13 12:30:13 +01:00
Lucas Bach BisgaardandGitHub 0ece94bf46 Bug fix whre mediapicker dont load before an event fires elsewhere #14250 (#14803) 2023-10-13 10:34:45 +01:00
Michael 0362dcffc8 Remove submodule 2023-10-12 03:21:53 +02:00
KNOWIT\anndal3andMichael Latouche 612b6039f2 Add aria label to umbraco property 2023-10-12 02:22:21 +02:00
Ronald BarendseandGitHub b6f0db7b73 Fix build logging of warnings/errors during packaging step (#14933)
* Use DotNetCoreCLI for dotnet pack command

* Use NBGV to get major version and set build number

* Use NBGV_PublicRelease to determine stable build

* Use latest Node patch versions

* Generate NuGet packages during build
2023-10-11 11:25:05 +02:00
Bjarke Berg 0844cb8b29 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Core/Services/ContentService.cs
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorAdvanced.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorAreasContent.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorSettings.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Datatype/BlockGridEditorDataTypeBlocks.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViewMacroFiles.spec.ts
2023-10-10 12:49:22 +02:00
Bjarke Berg e6a1640c1b Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataTypes/dataTypes.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViews.spec.ts
2023-10-10 12:27:33 +02:00
Bjarke BergandGitHub 41f8f03c2c Fixed a couple of occurrences where scopes was auto-completed while modified db state (#14947)
* Fixed a couple of occurrences where scopes was auto-complated while actually modified the state of the database.

* Added temp ctor to fix boot issue
2023-10-10 11:51:47 +02:00
Richard OckerbyandEmma L Garland 6e154e0a0f Corrected mark-up
An extra closing div tag was lurking around
2023-10-09 08:48:15 +01:00
Vitor RodriguesandLaura Neto 39492f9654 Fixed URL tracking not working for invariant pages with culture variant ancestors 2023-10-06 18:30:02 +02:00
Erik-Jan WestendorpandEmma L Garland 6e937692be Update MemberService.cs 2023-10-06 13:54:48 +01:00
Erik-Jan WestendorpandEmma L Garland 7aa246b855 Update MediaController 2023-10-06 13:46:07 +01:00
JamesandEmma L Garland cd2855634e Update umbBlockGridPropertyEditor.component.js
currently checks the first group or tab (index 0) that was added to see if there are properties.

This doesn't work well when the tab has a single group, and the group is created after the tab, as the tab will be empty, even though the group has the properties. 

there is also some interactions when composing tabs from other doc types, but I didn't have a good amount of time to test this.
2023-10-06 13:22:29 +01:00
Bjarne FyrstenborgandEmma L Garland 46b0833d52 Pass in format parameter 2023-10-06 12:13:22 +01:00
Bjarne FyrstenborgandEmma L Garland d3ceeb0ace Update keywords 2023-10-06 12:13:22 +01:00
Bjarne FyrstenborgandEmma L Garland b917d64eec Allow to specify format and parsing format in dateHelper functions 2023-10-06 12:13:22 +01:00
justinbotgerandMichael Latouche 9e168f6502 Updated Dutch translation for "import"
Updated Dutch translation for "import"
2023-10-06 10:44:44 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
961f6a0bab Bump postcss from 8.4.24 to 8.4.31 in /src/Umbraco.Web.UI.Client (#14920)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.24...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-05 15:41:17 +02:00
thomashdkandLaura Neto ced8e0582d Update umb-tabs-nav.html
Added data-element="tab-{{tab.alias}}" to the dropdown tabs list
2023-10-03 19:29:56 +02:00
Laura NetoandGitHub 44a4abdfbd Updating contributing docs to add unwanted changes section (#14853)
* Updating contributing docs to add unwanted changes section

* Added new section to table of contents
2023-10-03 17:44:10 +01:00
1cac8ffe88 made link to umbraco learning base youtube visible with underline sty… (#14884)
* made link to umbraco learning base youtube visible with underline style as per the other links on other dashboards.

* Update membersdashboardvideos.html

---------

Co-authored-by: Georgina Bidder <georgina.bidder@truedigital.co.uk>
Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
2023-10-03 17:42:29 +01:00
Bjarne FyrstenborgandGitHub 34892101a9 Ensure focus on specific action in block card (#14846)
* Ensure focus on specific action in block card

* Move if statement to parent

* Change buttons in groups as well

* Adjust styling
2023-10-03 17:02:20 +01:00
Erik-Jan WestendorpandMichael Latouche 930f9f6704 Translate dictionary_noItemsFound 2023-10-03 16:19:59 +02:00
Anders BjernerandGitHub 4932119807 Replaced [MaybeNullWhen(false)] with [NotNullWhen(true)] for UdiParser.TryParse method (#14880)
* Replaced [MaybeNullWhen(false)] with [NotNullWhen(true)] for UdiParser.TryParse method

* Removing some empty lines
2023-10-03 14:43:54 +02:00
Kenn JacobsenandGitHub ccd54bfb0e Fix property variance cache issue (#14824)
* Property variance should be the union of variance between content type and property type

* Fix a few comments in the tests

* Review changes
2023-09-25 13:45:28 +02:00
CarlandJason Elkin 511ee96c9e Fix spelling mistake, and add details of additional packages
Notices this spelling mistake, quick fix
2023-09-22 09:53:12 +01:00
Bjarke BergandGitHub d39502674e Added our own db context pool, that basically bypass the bool until umbraco is in Run mode (#14852) 2023-09-22 10:38:55 +02:00
Jason Elkin 336b7ff499 Revert ""big PR" github action"
This reverts commit a3cfbbf56a.
2023-09-21 15:04:14 +01:00
Jason Elkin a3cfbbf56a "big PR" github action 2023-09-21 15:02:06 +01:00
Nikolaj Geisle 4ee21f19f9 Merge remote-tracking branch 'origin/release/12.2' into v12/dev
# Conflicts:
#	version.json
2023-09-21 09:59:07 +02:00
Kenn JacobsenandGitHub 2335924b57 Ensure that value type JSON is translated correctly for Delivery API output (#14839) 2023-09-21 09:25:29 +02:00
Zeegaan 173d8dcf47 Bump version 2023-09-20 10:29:50 +02:00
Bjarke Berg aa7632b271 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-09-20 10:03:39 +02:00
Bjarke Berg e263db7b3b post merge fix 2023-09-20 10:02:58 +02:00
Bjarke Berg 912e9f277e post merge fix 2023-09-20 10:02:25 +02:00
Bjarke Berg ed73b82fd0 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	tests/Umbraco.Tests.Integration/NewBackoffice/OpenAPIContractTest.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs
2023-09-20 09:51:56 +02:00
Bjarke Berg 4dd3c295e0 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-09-20 09:43:41 +02:00
Andreas ZerbstandGitHub e132bcb2a6 We updated our locator to use data-element instead of alias (#14828) 2023-09-19 10:50:58 +02:00
Arkadiusz BielandGitHub 86697ff137 fix: ensured that allowed user name characters are supported in backoffice users as well (#14810) 2023-09-18 14:55:59 +02:00
Mads RasmussenandGitHub cb4d8e34ce Feature: Add buttons for additional preview URLs (#14773)
* add button group for multiple preview urls

* generate default + sub buttons for urls

* allow button group to render label without a localisation key

* remove the existing preview button

* add data-element attr for buttons for tours + tests

* use info button style

* set the target of the new window

* get the additional preview urls from the active variant
2023-09-15 09:44:50 +02:00
Jacob Overgaard 643b79c145 V12: Property editors should only contain layout when in preview mode (#14796)
* Revert "Make sure the property editor layout is contained within its container (prevent Z-index bleed-through) (#13583)"

This reverts commit 8463d906a7.

* remove seemingly unused attribute readonly

* contain everything with contain:layout

this is set if the property editor is in preview mode to make sure all overlays work

* Revert "remove seemingly unused attribute readonly"

This reverts commit 7a2743e8f6.
2023-09-15 09:19:23 +02:00
Jacob Overgaard 7bbe994fc9 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/less/components/umb-property-editor.less
2023-09-14 13:20:55 +02:00
Jacob OvergaardandGitHub 614aee2fec V12: Property editors should only contain layout when in preview mode (#14796)
* Revert "Make sure the property editor layout is contained within its container (prevent Z-index bleed-through) (#13583)"

This reverts commit 8463d906a7.

* remove seemingly unused attribute readonly

* contain everything with contain:layout

this is set if the property editor is in preview mode to make sure all overlays work

* Revert "remove seemingly unused attribute readonly"

This reverts commit 7a2743e8f6.
2023-09-14 13:17:35 +02:00
Andreas ZerbstandGitHub 8ae4c6bf5b V12 Fixed flaky tests (#14789)
* Added a longer timeout for the tests. Also bumped the timeout for isSuccessNotificationVisible

* Added a longer timeout for our tests and the isSuccessNotificationVisible method

* Updated the locator for the flaky test. The locator we had before could sometimes find two elements, which resulted in flaky tests.

* Bumped version of playwright

* Updated to use isSuccessNotificationVisible()

* Added a wait for timeout

* Updated to use isSuccessNotificationVisible()

* Bumped the timeouts

* Bumped our timeouts

* Bumped version of our testhelpers

* Updated the button for save and publish and added an wait for timeout

* Added a missing save for the test

* The test could sometimes find two locators. It should be fixes now

* Removed old usage of notification to be visible

* Removed unnecessary timeouts since we have defined the timeouts in the test helpers
2023-09-13 14:01:08 +02:00
Sebastiaan JanssenandGitHub 1f24b79531 Update README.md 2023-09-13 08:38:54 +02:00
Johan MöllerandGitHub 0bbda02931 Fixes #14722 - DateTime picker calendar does not get updated when custom date format (#14767)
* Seperate properties for input ng-model and datepicker.

Since flatpickr can't handle custom formatting.

* Set picker format to default.
2023-09-12 17:22:29 +01:00
Bjarke Berg 2d76e447bb Post merge build fix 2023-09-12 09:53:10 +02:00
Bjarke Berg 2ce0505784 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Core/Services/ContentService.cs
2023-09-12 09:50:35 +02:00
Bjarke Berg d47d79af6a Merge remote-tracking branch 'origin/release/12.2' into v12/dev 2023-09-12 09:50:05 +02:00
Bjarke Berg bd9b30f143 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	version.json
2023-09-12 09:46:24 +02:00
Bjarke Berg ca8c260b6c Bump version 2023-09-12 09:46:07 +02:00
Bjarke Berg f332fe325e Merge branch 'release/11.5' into v11/dev 2023-09-12 09:45:23 +02:00
trba1810andMichael Latouche 7f318e8993 added validation messages in swedish language 2023-09-12 09:00:51 +02:00
Johan MöllerandGitHub 916e495dc4 Fixes: #14486 - Some sr-only texts not localized (#14750)
* Add visuallyHiddenTexts area and keys to swedish

Translations contributed by @plannero

* Add missing localizations.

* Revert prettier formatting

* Format in visual studio

* Change default UpgradeUnattended value to true (#13281)

* add labels to default en.xml + small glitch fix
2023-09-12 08:26:49 +02:00
Andreas ZerbstandJacob Overgaard c42ca63b8d Added test for checking if settings model contains default value (#14513)
* Added test for checking if a settings model contains default value.
Fixed tests

* Bumped version

* Moved createSliderWithDefaultValue function to our testHelpers. Removed the use of count in test since there was only one
2023-09-11 15:16:41 +02:00
Jacob Overgaard cee485c6db Render all tabs in the background to ensure they register their initial state on any $scope.model in the stack. (#14493)
Sometimes a tab, e.g. a "block list settings model" might register some default values, but if the user never clicks on the tab then they are not registered due to how AngularJS renders views with "ng-if".
2023-09-11 15:16:20 +02:00
Bjarne FyrstenborgandEmma L Garland 417e37ab1e Clean output 2023-09-11 12:02:20 +01:00
Bjarne FyrstenborgandEmma L Garland 2ea4b5793d Fallback to value in case no label exists 2023-09-11 12:02:20 +01:00
Bjarne FyrstenborgandEmma L Garland bfdd71944a Cleanup 2023-09-11 12:02:20 +01:00
Bjarne FyrstenborgandEmma L Garland 0296e70b30 Update syntax 2023-09-11 12:02:20 +01:00
Bjarne FyrstenborgandEmma L Garland da92c38dec Newer JS syntax 2023-09-11 12:02:20 +01:00
Bjarne FyrstenborgandEmma L Garland 65321e8f68 Simplify radiobuttonlist prevalue editor 2023-09-11 12:02:20 +01:00
Bjarne FyrstenborgandEmma L Garland 1f97c62a1b Update class name 2023-09-11 12:00:36 +01:00
Bjarne FyrstenborgandEmma L Garland c285caf260 Add dropdown prevalue editor 2023-09-11 12:00:36 +01:00
Bjarke Berg 81b0886021 Fix issue with too long audit log messages 2023-09-07 08:55:27 +02:00
Nikolaj Brask-NielsenandGitHub 6d48091328 docs: XML warnings (#14663)
* 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 8ea61c51ac.
2023-09-06 20:08:17 +02:00
Elitsa MarinovskaandGitHub eef0da096e Being able to specify a start item in preview through Start-Item header (#14757) 2023-09-06 10:18:04 +02:00
Bjarke Berg 28d16f69ba bump version 2023-09-06 08:51:36 +02:00
147b46440f V10/bugfix/14543 publish descendants (#14763)
* WIP: Fix publish descendants and related notifications

* Removed related entitities from publish notification

* Fixed root not being saved when publishingWithDescendants

* Updated integrationtests to reflect the update view on when to save the root when its part of a branch

* PR formatting fix

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

* PR Cleanup

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

* Spicing up the codebase with some PR pattern matching

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

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-09-05 10:25:21 +02:00
Sebastiaan Janssen 401c881567 Merge branch 'contrib' into v12/dev 2023-09-05 10:09:02 +02:00
Bjarke Berg 297b954df4 Merge remote-tracking branch 'origin/v11/dev' into release/11.5
# Conflicts:
#	version.json
2023-09-05 08:05:18 +02:00
Bjarke Berg fd8f809524 bump version 2023-09-05 08:04:16 +02:00
Ronald BarendseandBjarke Berg 003ac02009 Revert #13281 and only set UpgradeUnattended value to true for new projects (#14764)
* Revert "Change default UpgradeUnattended value to true (#13281)"

This reverts commit e5d6372dbd.

* Set UpgradeUnattended value to true for new projects
2023-09-04 10:49:33 +02:00
Ronald BarendseandGitHub bc68f11d82 Revert #13281 and only set UpgradeUnattended value to true for new projects (#14764)
* Revert "Change default UpgradeUnattended value to true (#13281)"

This reverts commit e5d6372dbd.

* Set UpgradeUnattended value to true for new projects
2023-09-04 10:49:19 +02:00
Bjarke Berg 155efb8019 Merge remote-tracking branch 'origin/v12/dev' into v12/dev 2023-09-04 10:29:19 +02:00
Ronald BarendseandBjarke Berg 5c7b3a3d48 Change default UpgradeUnattended value to true (#13281) 2023-09-04 10:29:05 +02:00
Ronald BarendseandGitHub e5d6372dbd Change default UpgradeUnattended value to true (#13281) 2023-09-01 15:45:06 +01:00
Vitor RodriguesandSebastiaan Janssen efe00910f3 DeliveryApi: Ensure the ContentType property is serialized first
This is needed so it can be used as a discriminator field by System.Text.Json
Changed both ApiElement and IApiElement to ensure not only ApiContentResponse,
but also ApiBlockItem, which uses the interface directly, are adjusted.
2023-08-29 12:34:36 +02:00
Vitor RodriguesandSebastiaan Janssen 4d80073547 Fixed incorrect BlockListPropertyValueConverter delivery api property value type 2023-08-29 09:59:42 +02:00
Sebastiaan Janssen 1bcfcf4e84 Merge branch 'v12/dev' into contrib 2023-08-28 12:49:14 +02:00
Bjarke Berg 4964066b59 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	version.json
2023-08-28 11:39:20 +02:00
Bjarke Berg b7738f5d17 Merge remote-tracking branch 'origin/release/12.1' into v12/dev
# Conflicts:
#	version.json
2023-08-28 11:38:52 +02:00
Bjarke Berg 630bbc1e12 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	version.json
2023-08-28 11:38:15 +02:00
Bjarke Berg f35b31956a Merge remote-tracking branch 'origin/release/11.5' into v11/dev 2023-08-28 11:36:56 +02:00
Nikolaj Brask-NielsenandSebastiaan Janssen fdb0bed960 test: Simplify test project references 2023-08-28 11:08:06 +02:00
Sebastiaan Janssen ab48af878a Merge branch 'contrib' into v12/dev 2023-08-28 10:16:35 +02:00
Sebastiaan Janssen d7ae0aa129 Merge branch 'contrib' of https://github.com/umbraco/Umbraco-CMS into contrib
# Conflicts:
#	src/Umbraco.Cms.Persistence.EFCore/UmbracoDbContext.cs
2023-08-28 10:02:43 +02:00
Nikolaj 9230b253b6 Bump version 2023-08-28 09:47:14 +02:00
Nathan WoulfeandNikolaj 27441dfee1 Don't pass content object to save method - it's not a suitable label key :) (#14496)
* don't set label key to entire content model...

* Remove the default parameter value

---------

Co-authored-by: kjac <kja@umbraco.dk>
(cherry picked from commit 5dfb914e0f)
2023-08-28 09:46:44 +02:00
Bjarke Berg 3a53f51ef3 Remove parsing of short into integer (#14721) 2023-08-25 13:08:51 +02:00
Christian Funder SommerlundandGitHub fec51a9ec5 Add ReSharperTestRunner64 to the assembly exclusion list in TypeFinder (#14498) 2023-08-24 13:06:21 +02:00
Nikolaj f2b0c0e8eb Bump version 2023-08-24 10:44:01 +02:00
Nikolaj Brask-NielsenandGitHub 3f6ebe7656 feat: Let the DbContext handle the connection to the database (#14674) 2023-08-24 10:15:18 +02:00
Ronald BarendseandNikolaj f97e9a9f34 Fix exceptions in Slider and Tags property value converters (#13782)
* Fix IndexOutOfRangeException when converting single value to range in SliderValueConverter

* Fix NullReferenceException while deserializing empty value in TagsValueConverter

* Use invariant decimal parsing

* Handle converting from slider to single value

* Fix parsing range as single value

* Make Handle methods autonomous

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-08-23 10:55:48 +02:00
Elitsa MarinovskaandGitHub d553297369 V12: Get multiple items by ids endpoints (#14702)
* Adding get multiple items by their ids endpoint

* Adding get multiple items by their ids endpoint for the Media API as well
2023-08-23 07:13:20 +02:00
Nikolaj Brask-NielsenandGitHub 7b336c45f7 perf: Don't call GetNextUsers when we don't have to (#14670) 2023-08-22 15:52:27 +01:00
Niels Lyngsøandkjac 19ee8e9254 directly render labels without angularJS template code (#14700) 2023-08-22 12:54:36 +02:00
5dfb914e0f Don't pass content object to save method - it's not a suitable label key :) (#14496)
* don't set label key to entire content model...

* Remove the default parameter value

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-08-22 11:10:58 +02:00
Nikolaj 380af0057b Bump version 2023-08-22 10:25:55 +02:00
Nikolaj 85f81ed44c Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-08-22 10:24:26 +02:00
Nikolaj Brask-NielsenandGitHub a5a6fe4f76 docs: Improve DbContext XML docs (#14673) 2023-08-22 09:34:19 +02:00
Nikolaj Brask-NielsenandGitHub 9a63542645 refactor: Only use pooled DbContexts (#14672) 2023-08-21 14:55:41 +02:00
66bbad3379 Media Delivery API (#14692)
* Introduce media API - controllers, services, tests, Swagger docs

* Add path to media API response + add "by path" endpoint

* Review comments

* Implement filtering and sorting

* Add explicit media access configuration

* Cleanup

* Adding default case as in the MediaApiControllerBase

* Update src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs

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

* Swap sort order calculation to align with Content API

* Add CreateDate and UpdateDate to media responses

* Mirror Content Delivery API behavior for empty children selector

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-08-21 13:57:36 +02:00
Bjarke Berg 29d0c6770c Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-08-21 08:02:15 +02:00
Bjarke Berg d676850f6c Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-08-21 07:58:22 +02:00
Nikolaj Brask-NielsenandJason Elkin d7cbd9bf61 fix: Translations keys from #12776 2023-08-17 10:38:27 +01:00
Nikolaj Brask-NielsenandJason Elkin 685b867456 fix: Pass correct user id to Audit log 2023-08-16 23:42:59 +01:00
Nikolaj Brask-NielsenandGitHub d33c44c0a3 Fix userid zero in integration tests (#14639)
* test: Fix invalid user ids

* feat: Update parameter defaults with constants
2023-08-16 22:37:10 +01:00
Nikolaj Brask-NielsenandGitHub 3a7e388547 Adds hide toggle to hide unavailable compositions (#12776)
* feat: Added hide toggle to hide unavailable compositions

* fix: Fixed - being .

* chore: Move toggle to top
2023-08-16 15:44:05 +01:00
Nikolaj 5f28f6d293 Merge branch 'release/12.1' into v12/dev
# Conflicts:
#	version.json
2023-08-15 11:02:43 +02:00
Bjarke Berg f39ae725a4 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-08-15 10:17:49 +02:00
Bjarke Berg 6f25d96b48 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-08-15 10:15:28 +02:00
767bd1bcc0 Add exclusion filter setting to typefinder settings (#14426)
* Obsolete constructor with deprecated IScopeProvider

* Add exclusion setting to typefinder settings

* The old TypeFinder constructor calls the new constructor now instead and excluded duplicates by using Union instead of Concat.

* Revert "The old TypeFinder constructor calls the new constructor now instead and excluded duplicates by using Union instead of Concat."

This reverts commit 87801c6c1c.

* Add changes to TypeFinder

* Do not use null when type is not nullable

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-08-15 09:46:27 +02:00
Nikolaj 6cdd56176f Bump version 2023-08-14 18:49:56 +02:00
MoleandGitHub 7abfd146ad Ensure EfCore is known regardless of DeliveryApi (#14678) 2023-08-14 15:15:44 +02:00
Bjarne FyrstenborgandMichael Latouche c472a910e2 Use generic Content Type instead of Document Type 2023-08-13 00:36:18 +02:00
Jacob Overgaard 327ea77294 Merge remote-tracking branch 'origin/v12/dev' into v12/dev 2023-08-10 10:35:32 +02:00
Jacob Overgaard dd94dabd61 update UI docs title to Umbraco 12 2023-08-10 10:35:12 +02:00
Søren GregersenandSebastiaan Janssen 0edee82b0b Remove todo - that has been done 2023-08-10 09:31:03 +02:00
Sebastiaan Janssen e7f940b358 Merge branch 'v12/dev' into contrib 2023-08-10 09:01:26 +02:00
Nikolaj Brask-NielsenandGitHub 7537509ede feat: Show published state in tree picker (#14641) 2023-08-09 16:30:28 +01:00
Bjarke Berg f7e6480f4b Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-08-09 15:27:39 +02:00
Bjarke Berg d421be9d3c Added Indexing to v11+ UmbracoCmsSchema.cs 2023-08-09 15:27:13 +02:00
Bjarke Berg 5fbc922814 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
2023-08-09 15:27:01 +02:00
Bjarke Berg 667627a6e2 Merge remote-tracking branch 'origin/release/12.1' into v12/dev 2023-08-09 13:21:20 +02:00
d9c3ebdfe8 Bugfix 31584 - Remove Lazy "caching" that retains keys of deleted ContentTypes which causes unecesary validation errors (#14643)
The validation errors should not happen as the model mapping cleans up block data for entity types that do not longer exist (which is checked on the aformentioned key)

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-08-09 13:12:39 +02:00
Bjarke Berg ea51daa086 bump version 2023-08-09 13:09:16 +02:00
Bjarke Berg 336ba22a01 Merge remote-tracking branch 'origin/release/12.1' into v12/dev 2023-08-09 13:08:50 +02:00
Bjarke Berg a4f84ed490 Added Indexing to v11+ UmbracoCmsSchema.cs 2023-08-09 11:51:47 +02:00
Bjarke BergandSven Geusens 945e3be553 Add config so it is configurable whether to explicitly index each nested property (#14648)
* Added new configuration "Umbraco:CMS:Examine:ExplicitlyIndexEachNestedProperty" that can be used to avoid nested properties like block grid to index each property individually.

* Moved the setting "Umbraco:CMS:Examine:ExplicitlyIndexEachNestedProperty" to "Umbraco:CMS:Indexing:ExplicitlyIndexEachNestedProperty" to make it more future proof

* Added missing registration

* Fixed registration

* Small readability improvement

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-08-09 11:51:01 +02:00
Bjarke Berg cae22a6b9f bump version 2023-08-09 08:39:53 +02:00
Bjarne FyrstenborgandMichael Latouche 8e8a09f1ba Fix warning icon color in health check dashboard 2023-08-09 01:17:11 +02:00
Bjarke Berg 85311f9277 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Core/Events/EventAggregator.Notifications.cs
#	src/Umbraco.Core/Events/EventAggregator.cs
2023-08-08 11:30:40 +02:00
Bjarke Berg 7cf4826e2f Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-08-08 11:26:01 +02:00
Bjarke Berg ef13b1fe1f Merge remote-tracking branch 'origin/release/12.1' into v12/dev 2023-08-07 20:16:45 +02:00
dddabdb8dc Small changes to the EF Core implementations (#14640)
* Added explicit migration for AddOpenIddict and

* Renamed the UmbracoOpenIddictDbContextModelSnapshot to UmbracoDbContextModelSnapshot to align with the name of the DBContext

* Added comment to UmbracoDbContext about it is for internal use

* Only execute all migrations at initial install time

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-08-07 19:16:35 +02:00
Jacob OvergaardandNiels Lyngsø cf12de50d8 V12: Remove avatar step from login (#14629)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2023-08-07 11:00:48 +02:00
Rasmus SöderströmandBjarke Berg 7d253d3454 Fix for #14565 - Empty DocType folders hidden (#14581) 2023-08-07 08:48:14 +02:00
Erik-Jan WestendorpandBjarke Berg 0046f1a9f8 Add missing translation (#14588) 2023-08-07 08:47:07 +02:00
Bjarke Berg b10b77bb08 Allow newlines in invite email and escape other html (#14618) 2023-08-07 08:19:43 +02:00
1d8ad9dabb V12: Remove avatar step from login (#14629)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2023-08-04 16:20:27 +02:00
Sebastiaan Janssen 772fa5e23b Revert "Fix for escaping markdown characters in property descriptions (#12345)"
This reverts commit 4aa1597138.
2023-08-02 15:15:11 +02:00
Bjarke BergandGitHub 0d82258803 Allow newlines in invite email and escape other html (#14618) 2023-08-02 12:39:06 +02:00
Bjarke Berg e48350e064 Added missing async awaits in notifications that ensures objects are not disposed too early
Fixes https://github.com/umbraco/Umbraco-CMS/issues/14574
2023-08-02 11:29:02 +02:00
MigaroezandGitHub 85b3d006bf Merge pull request #14626 from umbraco/v12/bugfix/14574_fixed_issue_with_disposed_objects_in_async_notifications
Fixed issue with disposed objects in async notifications
2023-08-02 11:26:05 +02:00
Bjarke Berg 982dd3700d Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
#	src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html
2023-08-02 10:13:02 +02:00
Bjarke Berg 8ce48a2634 post merge fix 2023-08-02 10:01:20 +02:00
Bjarke Berg dcdbdbfadd Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
#	src/Umbraco.Web.UI.Client/src/views/components/upload/umb-file-dropzone.html
2023-08-02 09:53:17 +02:00
Sebastiaan Janssen bc127d95ba Fixed note on #13145 - don't make IncludeDescendants settable 2023-08-01 16:11:44 +02:00
b923c32525 fix: mark MultiUrlPickerValueConverter with DefaultValueConverter (#13347)
Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
2023-08-01 14:20:22 +01:00
Bjarne FyrstenborgandGitHub 8f5fee9f76 Add cache buster to injected icons CSS in block grid (#14621)
* Inject icons css via shadow DOM

* Fix typo

* Import icons.less instead
2023-08-01 14:09:10 +01:00
Bjarke Berg c11d0d3f5a Added missing async awaits in notifications that ensures objects are not disposed too early
Fixes https://github.com/umbraco/Umbraco-CMS/issues/14574
2023-08-01 14:23:30 +02:00
Miguel PintoandGitHub 96f8f70ed5 Fixed incorrect assignment of Last Login Date after a user accepts an invite and sets the password (#14619) 2023-07-31 22:14:20 +02:00
Callum WhyteandGitHub b778834dea Update QR code icon (#14609) 2023-07-31 21:58:47 +02:00
Callum WhyteandGitHub b2831dcd5e Sort content template tree items alphabetically, exclude element types (#14454) 2023-07-31 21:44:02 +02:00
Erik-Jan WestendorpandSebastiaan Janssen 3572642873 Add AddMapDefinition Extension Method 2023-07-31 20:30:17 +02:00
Bjarne FyrstenborgandGitHub 88c35e97a2 Compile css for icons style (#14615) 2023-07-31 20:12:09 +02:00
Dhanesh Kumar MjandGitHub 2282099577 considering id, key & name as filter params for content listview (#14514) 2023-07-31 15:42:21 +02:00
Bjarne FyrstenborgandGitHub 7f09802712 Allow Media Picker 3 to be used as macro parameter editor (#14594) 2023-07-31 15:10:40 +02:00
Bjarne FyrstenborgandGitHub b7f3976831 Ignore 1Password as well in noPasswordManager directive (#14613) 2023-07-31 13:31:47 +02:00
71d990504e Fix incorrect redirectUrl check with external authentication (#14198) (#14423)
* Fix check local redirect url

* Removed line break

* Small adjustment

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2023-07-29 17:47:43 +02:00
rasmusmedjandMichael Latouche dc94797784 #14190: Save all languages sent to approval in audit log 2023-07-29 00:32:10 +02:00
Bjarne FyrstenborgandGitHub 157005194f Block grid area allowance editor (#14582)
* Add position relative to button to fix issue with umb-outline on button element

* Add pattern attribute to get more specific virtual numeric keyboard on some devices as we expect integer values

* Fix missing localization of title attributes due missing @ prefix

* Fix incorrect end-closing tag
2023-07-26 16:16:30 +01:00
Bjarne FyrstenborgandGitHub ea642d69e5 Replace attribute with noPasswordManager directive (#14593) 2023-07-25 22:38:40 +01:00
978da0384e Merge v11 into v12 (#14604)
* V12: Dropzone should handle internal and external errors when uploading (#14579)

* fix: for safety measure check that a file is truthy before trying to upload it

* fix: push an error when file.$error is encountered to make sure it does not get uploaded

* fix: mark file as done if it errors

* format error messages

* fix: check for maxFileSize before uploading pasted images in tinymce

* remove the image from the DOM if any error is encountered

* feat: add property to fileManager to get and format the maxFileSize

* fix: make tinymce use fileManager to get maxFileSize

* fix(image cropper): check for maxFileSize before setting file to upload

* multiply by 1000 to get bytes

* V11/merge v10 into v11 (#14602)

* V10: Dropzone should handle internal and external errors when uploading (#14578)

* fix: mark files that result in error as processed

* fix: for safety measure check that a file is truthy before trying to upload it

* fix: push an error when file.$error is encountered to make sure it does not get uploaded

* fix: remove header from error messages since it is not being used anyway

* fix: check for maxFileSize before uploading pasted images in tinymce

* use stored blob variable

* feat: add property to fileManager to get and format the maxFileSize

* fix: make tinymce use fileManager to get maxFileSize

* fix(image cropper): check for maxFileSize before setting file to upload

* multiply by 1000 to get bytes

---------

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

* Fix method invoke. (#14597)

* Ensure that the Slider does not crash the back-office (#14601)

* Ensure that the Slider does not crash the back-office

* Add field descriptions to config

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Adrian Cojocariu <95346674+acoumb@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Adrian Cojocariu <95346674+acoumb@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2023-07-25 11:16:00 +02:00
c8206cd7d7 V11/merge v10 into v11 (#14602)
* V10: Dropzone should handle internal and external errors when uploading (#14578)

* fix: mark files that result in error as processed

* fix: for safety measure check that a file is truthy before trying to upload it

* fix: push an error when file.$error is encountered to make sure it does not get uploaded

* fix: remove header from error messages since it is not being used anyway

* fix: check for maxFileSize before uploading pasted images in tinymce

* use stored blob variable

* feat: add property to fileManager to get and format the maxFileSize

* fix: make tinymce use fileManager to get maxFileSize

* fix(image cropper): check for maxFileSize before setting file to upload

* multiply by 1000 to get bytes

---------

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

* Fix method invoke. (#14597)

* Ensure that the Slider does not crash the back-office (#14601)

* Ensure that the Slider does not crash the back-office

* Add field descriptions to config

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Adrian Cojocariu <95346674+acoumb@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2023-07-25 10:18:49 +02:00
Bjarne FyrstenborgandGitHub 05b89999af Set max length of text input to avoid server error due character length in database (#14592) 2023-07-24 17:51:02 +01:00
Erik-Jan WestendorpandBusra Sengul 557fe38a98 Change 'Comment' to 'Commentaar' 2023-07-24 17:39:06 +03:00
dependabot[bot]andJacob Overgaard 46aad34396 Bump word-wrap from 1.2.3 to 1.2.4 in /src/Umbraco.Web.UI.Client
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 08:33:57 +00:00
Jacob Overgaard 24844c6ce2 V12: Dropzone should handle internal and external errors when uploading (#14579)
* fix: for safety measure check that a file is truthy before trying to upload it

* fix: push an error when file.$error is encountered to make sure it does not get uploaded

* fix: mark file as done if it errors

* format error messages

* fix: check for maxFileSize before uploading pasted images in tinymce

* remove the image from the DOM if any error is encountered

* feat: add property to fileManager to get and format the maxFileSize

* fix: make tinymce use fileManager to get maxFileSize

* fix(image cropper): check for maxFileSize before setting file to upload

* multiply by 1000 to get bytes
2023-07-24 10:20:07 +02:00
Jacob OvergaardandGitHub 41c7e34059 V12: Dropzone should handle internal and external errors when uploading (#14579)
* fix: for safety measure check that a file is truthy before trying to upload it

* fix: push an error when file.$error is encountered to make sure it does not get uploaded

* fix: mark file as done if it errors

* format error messages

* fix: check for maxFileSize before uploading pasted images in tinymce

* remove the image from the DOM if any error is encountered

* feat: add property to fileManager to get and format the maxFileSize

* fix: make tinymce use fileManager to get maxFileSize

* fix(image cropper): check for maxFileSize before setting file to upload

* multiply by 1000 to get bytes
2023-07-24 10:17:58 +02:00
Erik-Jan WestendorpandGitHub 1527b2577e Add missing translation (#14588) 2023-07-21 10:31:28 +02:00
nikolajlauridsen 04a10be2a9 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-07-21 10:17:57 +02:00
nikolajlauridsen 0884ee0a4e Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
2023-07-21 10:16:50 +02:00
Rasmus SöderströmandGitHub a936fe09ab Fix for #14565 - Empty DocType folders hidden (#14581) 2023-07-20 12:36:29 +01:00
Ronald BarendseandGitHub 57852f5e62 Add PreRouting and PostRouting pipeline filters (#14503) 2023-07-20 12:23:38 +01:00
Andy ButlandandGitHub 3a857ab584 Added tests for TopoGraph. (#14583) 2023-07-20 08:33:49 +02:00
MoleandGitHub 4824fc8839 Supress execution context flow when queuing email task. (#14571) 2023-07-19 14:42:25 +03:00
Dennis ÖhmanandGitHub a49a9851dc #14325 - Remove wildcard-background from RTE (#14439)
* Update rte-content.less

#14325 - Remove wildcard-background from RTE

* Update rte-content.less

I did an update. 🙂

The transparent background is there because the tinymce theme Oxide adds a background-color to all selected elements.
So the umbraco added transparent background makes white text not be visible.

https://github.com/tinymce/oxide/blob/012346905578b0d7e59f7000d447f56243243b4a/src/less/theme/content/selection/selection.less#L50C2-L50C2


So I put back the transparent background-color and added a @blueExtraDark as text-color

I have updated the issue with more details.
2023-07-18 17:10:33 +01:00
Andy ButlandandGitHub d1aac3964c Restored order of operations on scope dispose to that used in Umbraco 11 before refactor into Scope inheriting CoreScope. (#14573) 2023-07-18 12:57:09 +02:00
Sebastiaan Janssen dad49b846f Merge branch 'v12/dev' into contrib 2023-07-18 11:18:26 +02:00
Elitsa MarinovskaandGitHub ba423a0108 V12: Add ISO codes to make the migration from language IDs easier (#14567)
* Change the obsoletion messages for language IDs to target V14 instead of V13.

* Wrong Language file

* Add ISO codes required to migrate custom code from language IDs

* Population of the new language FallbackIsoCode prop

* Changing obsoletion msgs from v13 to v14

* Fix breaking changes
2023-07-18 10:53:14 +02:00
NuklonandGitHub d52dcb78bb Use built-in Enum parse method, avoids keeping single-use Enums in memory 2023-07-17 20:52:04 +01:00
NuklonandGitHub 531ad2e4d5 Improve Enum performance (#14384) 2023-07-17 17:35:44 +01:00
dependabot[bot]andJacob Overgaard 99263113a0 Bump tough-cookie from 4.1.2 to 4.1.3 in /src/Umbraco.Web.UI.Client
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 06:55:00 +00:00
nikolajlauridsen 103a792074 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	version.json
2023-07-14 09:44:25 +02:00
nikolajlauridsen af44f7f59d Fix migration plan 2023-07-14 09:38:16 +02:00
nikolajlauridsen 9122885c67 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2023-07-14 09:33:57 +02:00
nikolajlauridsen 291f90d03d Bump version 2023-07-13 10:48:43 +02:00
nikolajlauridsen e317aa29f7 Merge branch 'release/11.4' into v11/dev 2023-07-13 10:48:03 +02:00
nikolajlauridsen 4c39734b51 Merge branch 'release/12.0' into v12/dev
# Conflicts:
#	version.json
2023-07-13 10:38:03 +02:00
20a4e475c8 Merge pull request from GHSA-h8wc-r4jh-mg7m
* Don't login after install

* Fail the install if database is not created

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-07-13 06:18:34 +02:00
nikolajlauridsen 2a601ae0d0 Bump version 2023-07-13 06:17:34 +02:00
1f26f2c6f3 Merge pull request from GHSA-h8wc-r4jh-mg7m
* Don't login after install

* Fail the install if database is not created

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-07-13 06:10:51 +02:00
nikolajlauridsen 596284f32d Bump version 2023-07-13 06:07:59 +02:00
Bjarne FyrstenborgandGitHub 2b62969395 Make it possible to remove blocks using tab key in block grid configuration (#14518) 2023-07-11 15:14:19 +01:00
Sebastiaan JanssenandGitHub dd697ab71c Delete add-issues-to-review-project.yml 2023-07-11 12:58:11 +02:00
Andreas ZerbstandGitHub 313fdf79fe Added test for checking if settings model contains default value (#14513)
* Added test for checking if a settings model contains default value.
Fixed tests

* Bumped version

* Moved createSliderWithDefaultValue function to our testHelpers. Removed the use of count in test since there was only one
2023-07-10 10:38:43 +02:00
Andreas ZerbstandGitHub 45083b6735 Removed usage of sending umbracoApi to our testHelpers (#14526)
* Cleaned up in Advanced

* Cleaned up in Areas

* Cleaned up in Content

* Cleaned up in Rendering

* Cleaned up in Settings

* Updated the timeout to 40 seconds, 30 seconds is not always enough anymore.

* Bumped version of testhelpers and builders
2023-07-07 14:49:08 +02:00
d116366b28 V12: Deprecate XPath (#14372)
* Deprecate all outward facing methods that uses XPath

* Add more obsolete messages

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-07-07 11:12:04 +02:00
Bjarke Berg 16c78b76dd Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
2023-07-07 08:37:20 +02:00
Bjarke Berg 02e87233c1 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
2023-07-07 08:34:15 +02:00
Bjarne FyrstenborgandGitHub 0c595ccc5f Only show groups when any filtered results in group (#14505) 2023-07-06 17:22:49 +01:00
0da33d064a Fixes #12904 UmbracoHelper.GetDictionaryValue defaults to en-US when used in non-front end code (#12942)
* adding new overload/rename a method

* remove this keyword

* fix comment

* remove space

* commit

* revert

* replace param name

* public backward compatibility

* Minor style tweaks

* Don't change default culture in UmbracoCultureDictionary

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-07-06 12:29:18 +02:00
Jacob OvergaardandGitHub f18d4b2078 Render all tabs in the background to ensure they register their initial state on any $scope.model in the stack. (#14493)
Sometimes a tab, e.g. a "block list settings model" might register some default values, but if the user never clicks on the tab then they are not registered due to how AngularJS renders views with "ng-if".
2023-07-06 09:52:11 +02:00
41805af0d9 Updated the package validation baseline version to 12.0.0 (#14389)
* Updated the package validation baseline version to 12 RC1

* Update PackageValidationBaselineVersion to 12.0.0 and remove CompatibilitySuppressions.xml files

* Clean up project files

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2023-07-06 07:51:49 +02:00
Andreas ZerbstandGitHub c61e6c4901 Revert "Ensure package view path is generated with consideration the current section (#14268)" (#14508)
This reverts commit 5382820e58.
2023-07-05 13:38:02 +02:00
Sebastiaan Janssen c4c524deb5 Merge branch 'v12/dev' into contrib 2023-07-04 11:14:47 +02:00
1d239a30ca Fix broken CookieAuthenticationRedirect caused by PR #14036 for non-api requests (#14399)
* Fix broken CookieAuthenticationRedirect caused by PR #14036 when not in an API controller

* Added Integration Tests for the MemberAuthorizationFilter

* Fix merge conflict

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-07-04 10:37:13 +03:00
5382820e58 Ensure package view path is generated with consideration the current section (#14268)
* check section when determining package template path

* return sectionAlias as packageFolder and the route segment won't always match

* fix test

* adds PluginController attribute to StylesheetsTreeController
fixes actionUrl generation to ensure valid URL
find controller by fullname to avoid incorrect controller selection when multiple exist with same name

* Fix frontend breaking changes

* Adding missing PluginController attribute for ScriptsTreeController

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-07-03 15:17:24 +03:00
Kenn JacobsenandGitHub fad710364c Add additional preview URLs option (#14479) 2023-06-30 08:26:31 +03:00
Nikolaj 4d8409ffdf Merge remote-tracking branch 'origin/release/12.0' into v12/dev
# Conflicts:
#	version.json
2023-06-29 09:21:22 +02:00
Nikolaj Brask-NielsenandGitHub 1d14158d82 fix: Allows copying from unsaved content (#14464)
#14459
2023-06-27 17:18:07 +01:00
Anders BjernerandGitHub a090997aa1 Added missing Danish translation for general_change (#14461)
* Added missing Danish translation for `general_change`

* Update en_us.xml
2023-06-27 15:50:11 +01:00
Nikolaj ba724ed97d Bump version to final 2023-06-27 14:15:13 +02:00
Nikolaj 2ef75c5067 Merge branch 'release/12.0' into v12/dev 2023-06-27 14:13:29 +02:00
Bjarke Berg 2cbf44dd4c Updated login svg 2023-06-27 11:53:10 +02:00
Jacob Overgaard 3a790b9f04 Merge branch 'release/12.0' into v12/dev 2023-06-27 10:06:36 +02:00
Jacob Overgaard 941dc933fb package-lock sync 2023-06-27 10:04:23 +02:00
Bjarke Berg 685820c295 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-06-27 09:18:17 +02:00
Bjarke Berg f04b49a96c Merge remote-tracking branch 'origin/release/12.0' into v12/dev 2023-06-27 09:18:08 +02:00
Bjarke Berg c7699f2909 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	version.json
2023-06-27 09:07:40 +02:00
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
2c9d0b2cb1 Add create and update dates to Delivery API response (#14427)
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-06-26 08:33:16 +03:00
Kenn JacobsenandGitHub e92ea34098 Remove content from public facing Examine indexes when it is made protected (#14415)
* Remove content from Examine indexes when it gets protected

* Remove backwards compat for discoverability

* Fixed build error for tests
2023-06-23 12:00:32 +02:00
Elitsa MarinovskaandGitHub 115e79113e Delivery API: Ensure the path parameter starts with forward slash (#14428)
* Ensure path starts with forward slash in all cases

* Fix path in preview when getting by route

* Reintroduce path.length check

* Revert previous changes
2023-06-23 11:22:13 +02:00
Sebastiaan Janssen 62f692e617 Merge branch 'v12/dev' into contrib 2023-06-22 13:11:50 +02:00
Nikolaj 0f0c256beb Don't leak swagger out of delivery document 2023-06-22 11:38:00 +02:00
Nikolaj 8b1e4fa5c2 Don't leak swagger out of delivery document 2023-06-22 11:37:15 +02:00
Kenn JacobsenandGitHub 1fb8ea0411 Return raw markdown in the Delivery API (#14429)
* Return raw markdown in the Delivery API

* Reflect markdown value converter changes in the unit tests
2023-06-22 10:48:45 +02:00
Anders ReusandGitHub 4b0e971cf5 Obsolete constructor with deprecated IScopeProvider (#14424) 2023-06-21 22:44:39 +02:00
Bjarke Berg 159dbcc655 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	version.json
2023-06-21 08:54:10 +02:00
Bjarke Berg 3c81f968c3 post merge clean up 2023-06-21 08:53:18 +02:00
Bjarke Berg 44fde47ad9 Merge remote-tracking branch 'origin/release/11.4.1' into v11/dev 2023-06-21 08:52:40 +02:00
Bjarke Berg 7ab6598d0b Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
2023-06-21 08:41:35 +02:00
Bjarke Berg 6e41a3123d Merge remote-tracking branch 'origin/release/12.0' into v12/dev 2023-06-21 08:37:43 +02:00
Bjarke Berg 7cdf7258f4 Merge remote-tracking branch 'origin/release/12.0' into v12/dev
# Conflicts:
#	version.json
2023-06-21 08:37:15 +02:00
Kenn JacobsenandGitHub 0cdea6120b Add support for property value fallbacks in the delivery API (#14421)
* Add support for property value fallbacks in the delivery API

* Add dedicated tests for the IDeliveryApiPropertyValueConverter interface

* Rewrite for less impact and more streamlined with Razor output
2023-06-21 08:32:57 +02:00
nikolajlauridsen dcd400810c Bump version 2023-06-20 14:47:54 +02:00
miguelcrpintoandEmma L Garland 4d63b3ce30 Updated the IsoDateTimeConverter initialization in the JsonDateTimeFormatAttribute to set the Culture to InvariantCulture so that the custom DateTime format symbols ( date and time separators) are respected independent of the CurrentCulture being used. 2023-06-20 13:15:03 +01:00
Sebastiaan Janssen f91fde2462 Fixes #14269 - semaphore released too many times as it always happens in the finally, which is 1 too many times when the upload was a success 2023-06-20 14:02:53 +02:00
Bjarke Berg 197efbb12c Merge remote-tracking branch 'origin/release/12.0' into v12/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs
#	version.json
2023-06-20 13:56:27 +02:00
leekelleherandSebastiaan Janssen c608cc83ba 📓 Updated README
Moved the badges lower down and tweaked for consistency.
2023-06-20 13:36:58 +02:00
dependabot[bot]andJacob Overgaard 9c1f912639 Bump socket.io-parser from 4.2.1 to 4.2.4 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.4.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.4)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:30:20 +02:00
dependabot[bot]andJacob Overgaard 6b78d4b647 Bump socket.io-parser from 4.2.1 to 4.2.4 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.4.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.4)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:30:09 +02:00
Jacob Overgaard 29f8f0be39 Merge branch 'v11/dev' into release/11.4.1 2023-06-20 13:29:47 +02:00
dependabot[bot]andJacob Overgaard fba1afe7fe Bump socket.io-parser from 4.2.1 to 4.2.4 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.4.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.4)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:29:08 +02:00
dependabot[bot]andJacob Overgaard 020fabfe82 Bump socket.io-parser from 4.2.1 to 4.2.4 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.4.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.4)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:28:35 +02:00
dependabot[bot]andJacob Overgaard 7eef9f4652 Bump fast-xml-parser and is-svg in /src/Umbraco.Web.UI.Client
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) and [is-svg](https://github.com/sindresorhus/is-svg). These dependencies needed to be updated together.

Updates `fast-xml-parser` from 3.20.3 to 4.2.4
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/commits)

Updates `is-svg` from 4.3.1 to 4.4.0
- [Release notes](https://github.com/sindresorhus/is-svg/releases)
- [Commits](https://github.com/sindresorhus/is-svg/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: is-svg
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:23:56 +02:00
dependabot[bot]andJacob Overgaard 495b3669f5 Bump fast-xml-parser and is-svg in /src/Umbraco.Web.UI.Client
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) and [is-svg](https://github.com/sindresorhus/is-svg). These dependencies needed to be updated together.

Updates `fast-xml-parser` from 3.20.3 to 4.2.4
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/commits)

Updates `is-svg` from 4.3.1 to 4.4.0
- [Release notes](https://github.com/sindresorhus/is-svg/releases)
- [Commits](https://github.com/sindresorhus/is-svg/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: is-svg
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:22:58 +02:00
Jacob Overgaard c161616b91 sync lockfile 2023-06-20 13:22:31 +02:00
dependabot[bot]andJacob Overgaard 2e1873197a Bump fast-xml-parser and is-svg in /src/Umbraco.Web.UI.Client
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) and [is-svg](https://github.com/sindresorhus/is-svg). These dependencies needed to be updated together.

Updates `fast-xml-parser` from 3.20.3 to 4.2.4
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/commits)

Updates `is-svg` from 4.3.1 to 4.4.0
- [Release notes](https://github.com/sindresorhus/is-svg/releases)
- [Commits](https://github.com/sindresorhus/is-svg/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: is-svg
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:22:03 +02:00
dependabot[bot]andJacob Overgaard 2322a2befb Bump fast-xml-parser and is-svg in /src/Umbraco.Web.UI.Client
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) and [is-svg](https://github.com/sindresorhus/is-svg). These dependencies needed to be updated together.

Updates `fast-xml-parser` from 3.20.3 to 4.2.4
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/commits)

Updates `is-svg` from 4.3.1 to 4.4.0
- [Release notes](https://github.com/sindresorhus/is-svg/releases)
- [Commits](https://github.com/sindresorhus/is-svg/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: is-svg
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 13:20:50 +02:00
Jacob Overgaard b725153be1 v11: Backoffice JS Updates (#14407)
* update @umbraco-ui/uui to 1.3.0

* update @microsoft/signalr to 7.0.7

* update ace editor to 1.22.1

* update jQuery to 3.7.0

* update nouislider to 15.7.1

* update tinymce to 6.5.1

* update spectrum-colorpicker2 to 2.0.10

* update build dependencies
2023-06-20 13:18:25 +02:00
Bjarke BergandGitHub 54479c9538 Updated nuget packages to latest versions (#14419) 2023-06-20 12:21:16 +02:00
MoleandGitHub 446544c045 V12: Add deliver api information to detailed telemetry (#14418)
* Add deliver api information to detailed telemetry

* Update translation
2023-06-20 12:03:46 +02:00
Ronald BarendseandGitHub c989c5e214 Support publishing multiple notifications, filter on handler type and add IDistributedCacheNotificationHandler<TNotification> (optimizes cache refreshers) (#14332)
* Clean up DistributedCache and add additional checks

* Add IEnumerable overloads to DistributedCacheExtensions

* Update handlers to use new IEnumerable overloads

* Move DistributedCacheExtensions to Core

* Restructure cache refreshers into folders

* Add IDistributedCacheNotificationHandler

* Rewrite DistributedCacheBinder into seperate IDistributedCacheNotificationHandler implementations

* Obsolete DistributedCacheBinder and use new IDistributedCacheHandler implementations

* Clean up ServerMessengerBase

* Ensure cache refreshers only process distinct values

* Add support for publishing multiple notifications and filter on handler type

* Suppress compatibility issues

* Remove DistributedCacheBinder and suppress compatibility issues

* Add ScopedNotificationPublisher<TNotificationHandler>

* Improve notification type lookup/enumeration

* Ensure INotificationAsyncHandler handles multiple notitications sequentially

* Minimize cache instruction JSON

* Chunk notifications by type to keep publish order

* Only serialize required RefreshInstruction properties
2023-06-20 11:15:47 +02:00
Jacob Overgaard 326eab7d3c v11: Backoffice JS Updates (#14407)
* update @umbraco-ui/uui to 1.3.0

* update @microsoft/signalr to 7.0.7

* update ace editor to 1.22.1

* update jQuery to 3.7.0

* update nouislider to 15.7.1

* update tinymce to 6.5.1

* update spectrum-colorpicker2 to 2.0.10

* update build dependencies
2023-06-20 11:01:59 +02:00
Jacob Overgaard cbffd56459 v11: Backoffice JS Updates (#14407)
* update @umbraco-ui/uui to 1.3.0

* update @microsoft/signalr to 7.0.7

* update ace editor to 1.22.1

* update jQuery to 3.7.0

* update nouislider to 15.7.1

* update tinymce to 6.5.1

* update spectrum-colorpicker2 to 2.0.10

* update build dependencies
2023-06-20 11:00:31 +02:00
nikolajlauridsen 06492d9daf Set version 2023-06-20 10:01:59 +02:00
christophnzandBusra Sengul 77a2e4b557 Fixed typo "optinal" to "optional" for translation dictionary import dialog and 2 other occurrences 2023-06-20 10:38:50 +03:00
Jacob OvergaardandGitHub bcabc678a7 v11: Backoffice JS Updates (#14407)
* update @umbraco-ui/uui to 1.3.0

* update @microsoft/signalr to 7.0.7

* update ace editor to 1.22.1

* update jQuery to 3.7.0

* update nouislider to 15.7.1

* update tinymce to 6.5.1

* update spectrum-colorpicker2 to 2.0.10

* update build dependencies
2023-06-20 09:24:42 +02:00
4fb605c086 Delivery API: Add query params and headers to Swagger document (#14370)
* Adding query params documentation

* Adding headers

* Rename file

* Added a few more descriptions and changed a few as well

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-06-19 14:24:45 +02:00
Bjarne FyrstenborgandJacob Overgaard 78c8328501 Show SVG icons for toolbar in configuration of richtext editor (#14404)
* Load default icons to show them next to checkboxes in configuration of richtext editor

* More mapping of icons

* Fix vertical align items centered not reflected

* Wrap mapping in function

* Map a few more icons

* Cleanup and formatting

* Cleanup

* Cleanup

* Add period in description
2023-06-19 13:51:42 +02:00
Bjarne FyrstenborgandJacob Overgaard d42ef7b340 Show SVG icons for toolbar in configuration of richtext editor (#14404)
* Load default icons to show them next to checkboxes in configuration of richtext editor

* More mapping of icons

* Fix vertical align items centered not reflected

* Wrap mapping in function

* Map a few more icons

* Cleanup and formatting

* Cleanup

* Cleanup

* Add period in description
2023-06-19 13:50:15 +02:00
Bjarne FyrstenborgandJacob Overgaard 529d056c0c Show SVG icons for toolbar in configuration of richtext editor (#14404)
* Load default icons to show them next to checkboxes in configuration of richtext editor

* More mapping of icons

* Fix vertical align items centered not reflected

* Wrap mapping in function

* Map a few more icons

* Cleanup and formatting

* Cleanup

* Cleanup

* Add period in description
2023-06-19 13:49:50 +02:00
Bjarne FyrstenborgandGitHub 583965cf9d Show SVG icons for toolbar in configuration of richtext editor (#14404)
* Load default icons to show them next to checkboxes in configuration of richtext editor

* More mapping of icons

* Fix vertical align items centered not reflected

* Wrap mapping in function

* Map a few more icons

* Cleanup and formatting

* Cleanup

* Cleanup

* Add period in description
2023-06-19 13:48:03 +02:00
Mads Mørch SchouandGitHub 0a4a938b88 Makes sure the nucache is not truncated when its null (#14395)
* Makes sure the nucache is not truncated when its null
* Removed parentheses
2023-06-16 18:22:39 +01:00
Jason ElkinandGitHub 118f914158 Add ContentDeletingNotification to EmptyRecycleBin (#14397)
* Add ContentDeletingNotification to EmptyRecycleBin

* Fix formatting.
2023-06-16 16:45:49 +03:00
1ba834a9ca fix: #12253 Anchor picker does not appear (#13492)
* fix: #12253 Anchor picker does not appear

* Update ContentServiceExtensions.cs

fix: #12253  #13492 ; implement PR suggestions, test the new changes to confirm that they fix the issue with the anchorlink implementation on RTE from blocklist, blockgrid and normal RTE properties
Co-Authored-By: Laura Neto <12862535+lauraneto@users.noreply.github.com>

* Removed unnecessary using and code

* Small adjustments

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2023-06-16 14:40:19 +02:00
542d0f7f74 Fix/delete language error message 14333 (#14396)
* Update the tour text to the correct text and to save confusion

* Added extra information to the delete language warning to inform the user that it will also delete all content related to the language

* Updated language files with same message re deletion

---------

Co-authored-by: Paul Seal <p.seal@clerkswell.com>
Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
2023-06-16 12:11:23 +01:00
Jan SkovgaardandGitHub a823055c9d Change nonodes image (#14392) 2023-06-16 13:44:05 +03:00
Bjarne FyrstenborgandMichael Latouche 575f00d6f0 Update label in Danish translation 2023-06-16 11:33:34 +02:00
alevak09andGitHub 9f4d3e5525 Add Croatian Language (#14379)
Croatian language translation of Umbraco backoffice and culture settings
2023-06-16 09:49:22 +01:00
Paul SealandMichael Latouche 5073a26e7f Update the tour text to the correct text and to save confusion 2023-06-16 10:46:06 +02:00
9a5e1c437e V12/feature/enable trust server certificate from installer (#14361)
* Enable checkbox with Trust server certificate in installer

* Fix up behavioral change

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-06-12 10:58:40 +02:00
10631decb1 Update security stamps on logout (#14362)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-06-12 10:07:44 +02:00
Bjarke Berg 1033806c49 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-06-12 10:05:49 +02:00
Bjarke Berg f24ff4918e Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-06-12 10:03:26 +02:00
Kenn JacobsenandGitHub cbf42bd91a Make the API versioning and Swagger config less intrusive (#14363) 2023-06-12 09:31:39 +02:00
Kenn JacobsenandGitHub 6b280bd165 Make the Delivery API JSON type info resolver un-sealed (#14368) 2023-06-12 07:58:35 +02:00
MoleandGitHub 45fd5d218b Use ComputeHMACAsync instead of ComputeHMAC in URL generator (#14364) 2023-06-09 09:20:07 +02:00
8b7094c8cf V12: use database when testing examine (#14360)
* Use databases for examine tests

* Use same schema for entire fixture

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-06-08 12:05:10 +02:00
d9dced55c4 Disable sortable if readonly or max is limited to one item (#14252)
* Disable sortable if readonly or max is set limited to one item

* Disable sortable on single URL picker

* Don't disable block list sorting based on validation limit, but do for single block mode

* Disable sorting in media picker 3 in single mode

* Remove extra whitespace

* Disable draggable

* Tweaked wording of "item(s)"

---------

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
2023-06-08 10:31:16 +01:00
4aa1597138 Fix for escaping markdown characters in property descriptions (#12345)
* Added secure to the UMB-XSRF-V cookie when global https is true.

* tweaked markdown handling

* added in link handling tweak for simpleMarkdown filter

* tweaked simple markdown filter to modify all links instead of just the first one

* moved transformation of markdown content in description into C# code

* Format of white space

* Reverted unecessary change.

* Removed unwanted framework version lines

* Reduce nesting of if statements.

* Changed to .Contains for readability.

---------

Co-authored-by: Corey Philipp <CPhilipp@dewpoint.com>
Co-authored-by: jaandrews <jaandrews88@gmail.com>
Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
2023-06-08 10:11:18 +01:00
Kenn JacobsenandGitHub ddade09b14 Fix broken name sorting in the Delivery API (#14350) 2023-06-08 10:59:29 +02:00
Sebastiaan Janssen 8447350915 Merge branch 'v12/dev' into contrib 2023-06-08 10:24:39 +02:00
Bjarke Berg c9bb48aabf Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-06-08 10:10:45 +02:00
Bjarke Berg 96dc594269 Merge remote-tracking branch 'origin/v11/dev' into release/12.0
# Conflicts:
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs
#	version.json
2023-06-08 08:37:30 +02:00
Bjarke Berg 8ae0c82e85 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-06-08 08:36:15 +02:00
Lili RossiterandSebastiaan Janssen b60ddf484f fix for focus state of checkbox 2023-06-07 14:01:13 +02:00
ChadandGitHub e784cfa960 Improve logging performance by checking Trace/Debug log level is enabled (#12793) 2023-06-07 11:47:05 +02:00
nikolajlauridsen 599bfea496 Bump version 2023-06-06 13:52:53 +02:00
nikolajlauridsen 537e078d43 Merge branch 'release/12.0' into v12/dev 2023-06-06 13:52:17 +02:00
nikolajlauridsen a6bb637fab Add scopes to tests 2023-06-06 12:24:29 +02:00
MoleandGitHub 4744d711ed Use scopes in PackaginService (#14343) 2023-06-06 12:00:53 +02:00
Mole 2dd7d610da Update OpenIdDict (#14340) 2023-06-06 10:15:53 +02:00
MoleandGitHub cd3f06349b Update OpenIdDict (#14340) 2023-06-06 10:15:31 +02:00
MoleandGitHub b391fc50e9 Remove external login tokens before removing external logins (#14341) 2023-06-06 09:29:03 +02:00
809883f088 Support entirely unpublished content in preview mode (#14307)
* Support draft-only content in the Delivery API query

* Allow outputting "entirely unpublished" content

* Make the preview path explicit to avoid clashing endpoints

* Handle trailing slash setting for preview URLs

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

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

* Remove superfluous (and incorrect) unpublished route handling

* Make sure preview output includes routes for unpublished cultures

* Ensure that published content with unpublished ancestors are available in preview

* Fix route start item when previewing published content with unpublished parent

---------

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-06-05 12:00:25 +02:00
Nikolaj Geisle c65f22a1d6 Use hosting environment to get local temp path (#14335) 2023-06-05 10:57:39 +02:00
Nikolaj GeisleandGitHub 6073662140 Use hosting environment to get local temp path (#14335) 2023-06-05 10:56:56 +02:00
Arkadiusz BielandGitHub 9bafdbd992 Add notification flag to indicate the current publish operation includes descendants (#13145) 2023-05-31 17:33:23 +02:00
Bjarne FyrstenborgandGitHub 676efb9f89 Show summary of Examine search results (#14300) 2023-05-31 17:25:24 +02:00
Callum WhyteandGitHub e6903bffcd Convert collections for XPath in PropertyValueConverterBase (#14275) 2023-05-31 16:58:42 +02:00
Miguel PintoandGitHub 76cb85224e Swapped the sortCreateDateAscending and sortCreateDateDescending translation values to match the intended behavior (#14315) 2023-05-31 16:39:37 +02:00
AhmetandGitHub cf6a7a3bc0 Fix #14270 - ImageCropperValue.GetCropUrl(alias, imageUrlGenerator) always returns null (#14308) 2023-05-31 13:47:09 +02:00
RussellandGitHub dd59ef17f5 Fix for User null from IP address "::1" has logged out (#14322) 2023-05-31 12:46:02 +02:00
RussellandGitHub 0220621337 Change "Media Picker" in RTE to "Image Picker" (#14321) 2023-05-31 12:45:02 +02:00
184cf9f26d Fix URL encoded paths for the item endpoint (#14311)
* Fix URL encoded paths for the item endpoint

* Sanity check accept-language headers before accepting them

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-05-31 12:14:26 +02:00
Ronald BarendseandGitHub 41e51d6e71 Add PackageId to package manifest and PackageMigrationPlan (#14047)
* Add VersionAssemblyName to package manifest

* Fix/improve nullability

* Ensure package version from manifest is set when package migration exists

* Set versionAssemblyName in umbracopackage template

* Use Assembly.Load instead of ITypeFinder

* Use AssemblyLoadContext to get asesmbly by name

* Add PackageId to package manifest

* Show ID on installed packages overview

* Fallback to package ID to get assembly version

* Include package ID in telemetry data

* Set id in umbracopackage template

* Add PackageId to PackageMigrationPlan

* Get version from package migration assembly

* Hide unknown package version

* Always use package name from manifest

* Use IPackagingService to return package telemety data

* Set versionAssemblyName in umbracopackage-rcl template

* Set id in umbracopackage-rcl template
2023-05-31 11:31:37 +02:00
Bjarke Berg 82746518d4 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs
#	version.json
2023-05-31 09:11:24 +02:00
Bjarke Berg 2407d42de6 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/Constants-Telemetry.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Telemetry/TelemetryServiceTests.cs
2023-05-31 08:48:28 +02:00
Kenn JacobsenandGitHub 3b433e6658 Expose "expanding" state in API value conversion (#14312)
* Expose "expanding" state in API value conversion

* Add unit test

* Add non-breaking and obsoletion

* Add compat suppressions
2023-05-31 08:46:30 +02:00
Ronald BarendseandGitHub 84a0cd8c09 Add VersionAssemblyName to package manifest (#14046)
* Add VersionAssemblyName to package manifest

* Fix/improve nullability

* Ensure package version from manifest is set when package migration exists

* Set versionAssemblyName in umbracopackage template

* Use Assembly.Load instead of ITypeFinder

* Use AssemblyLoadContext to get asesmbly by name

* Get version from package migration assembly

* Hide unknown package version

* Set versionAssemblyName in umbracopackage-rcl template
2023-05-30 15:47:36 +02:00
michiel-sjandGitHub 0f18b50126 Adding logging and make sure PostAddFile always releases the file semaphore (#14269) 2023-05-26 13:51:29 +02:00
fcf477191f Delivery API: Adding support for "Contains" filters (#14289)
* Adding support for contains filters

* Making a dedicated name filter and making changes to the sort indexer

* Fixed the merge from release/12.0

* Make the "name" filter support OR for comma separated filter values

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-05-25 13:43:45 +02:00
Nikolaj 9ed54eb158 Fix version 2023-05-25 13:03:13 +02:00
Nikolaj c6d94b3fd4 Merge remote-tracking branch 'origin/release/11.4' into v11/dev 2023-05-25 12:59:24 +02:00
dependabot[bot]andJacob Overgaard fccbed125c Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.2.1 to 6.4.2
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.2.1...6.4.2)

Updates `socket.io` from 4.5.3 to 4.6.1
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.5.3...4.6.1)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 11:33:19 +02:00
Bjarke Berg efb9452678 Merge remote-tracking branch 'origin/release/12.0' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryProvider.cs
#	src/Umbraco.Cms.Api.Delivery/Services/ApiContentQueryService.cs
#	src/Umbraco.Core/DeliveryApi/IApiContentQueryProvider.cs
2023-05-25 11:29:10 +02:00
dependabot[bot]andJacob Overgaard 715dfa7ee0 Bump qs from 6.10.1 to 6.11.0 in /src/Umbraco.Web.UI.Docs
Bumps [qs](https://github.com/ljharb/qs) from 6.10.1 to 6.11.0.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.10.1...v6.11.0)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 11:28:48 +02:00
Kenn JacobsenandGitHub 53e0227c98 Fix the namespace for PagedModel (#14296)
* Fix the namespace for PagedModel

* Add compat suppressions
2023-05-25 11:27:37 +02:00
dependabot[bot]andJacob Overgaard 010a1b53f6 Bump decode-uri-component in /src/Umbraco.Web.UI.Docs
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 11:27:16 +02:00
dependabot[bot]andJacob Overgaard 426ade5c70 Bump minimist from 0.2.1 to 0.2.4 in /src/Umbraco.Web.UI.Docs
Bumps [minimist](https://github.com/minimistjs/minimist) from 0.2.1 to 0.2.4.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.4)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 11:26:55 +02:00
dependabot[bot]andJacob Overgaard 7a530f9c07 Bump socket.io-parser from 4.2.1 to 4.2.3 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.3.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.3)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 11:24:33 +02:00
Jacob OvergaardandBjarke Berg 7f798bcc91 v12: add support for Node.js 18 (#14259)
* add .nvmrc to instruct NVM of preferred version

* update azure-pipelines.yml with node 18.16

* update "engines" section of package.json with preferred node.js 18.16

* update lockfiles in accordance with node 18 (lockfileVersion: 3)
2023-05-25 11:19:03 +02:00
Jacob OvergaardandGitHub 6791a99872 v12: add support for Node.js 18 (#14259)
* add .nvmrc to instruct NVM of preferred version

* update azure-pipelines.yml with node 18.16

* update "engines" section of package.json with preferred node.js 18.16

* update lockfiles in accordance with node 18 (lockfileVersion: 3)
2023-05-25 11:18:29 +02:00
Nikolaj e52e98741e Fix integration tests 2023-05-25 08:54:38 +02:00
6bcec26db3 V10: Implement varying blocklist indexing (#14287)
* Implement available culture in Interface and base classes

* Add available cultures

* DI localizationService and use it

* Make the new method have default implementation to avoid breaking change

* Create implementations for old method

* Pass available cultures

* Pass localization service

* Create new method that takes available cultures

* Add ILocalizationService to DI

* implement missing method

* Add database for schema test

* Fixed issue with indexes not added correctly to nested types..

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-25 08:40:10 +02:00
Kenn JacobsenandGitHub 5ae984aca6 Empty filter and sort values should not be considered when executing queries (#14295) 2023-05-24 13:22:27 +02:00
Kenn Jacobsenandnikolajlauridsen 6a725f870a Ensure that blocks always open automatically when added to block list or block grid (#14294) 2023-05-24 10:23:05 +02:00
Kenn JacobsenandGitHub 315f08c55d Ensure that blocks always open automatically when added to block list or block grid (#14294) 2023-05-24 10:22:31 +02:00
Andy ButlandandGitHub e0d9084d04 Updated the installer text about Codegarden (#14276)
* Updated the installer text about Codegarden

* Further update to Codegarden installer message

* Removed whitespace
2023-05-24 09:59:31 +02:00
nikolajlauridsen 3fa49c7a55 Bump version to non-rc 2023-05-24 08:09:25 +02:00
3cadd35d40 Start-item support in RTE markup (#14283)
* Append start item to RTE markup

* Split the Examine specifics from API query service (#14257)

* Split the Examine specifics from API query service to a provider based model

* Review changes: Use paged model as provider return value + add logging

* Fix version

* Revert incidentally changed version number by targeting wrong branch

* Fix wrongly changed version number --- it's RC2 now

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-05-24 08:02:42 +02:00
Matt BrailsfordandGitHub afddb3d781 Enforce passing tree alias to tree api requests (#12678)
* Enforce passing tree alias to tree api proxy

* Update ApplicationTreeController.cs
2023-05-23 16:30:21 +01:00
Sebastiaan Janssen df8f13d6b8 Merge branch 'v12/dev' into contrib 2023-05-23 13:22:04 +02:00
Bjarke Berg c878567633 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-05-23 12:17:40 +02:00
Bjarke Berg 86f867479b Merge branch 'release/12.0' into v12/dev
# Conflicts:
#	version.json
2023-05-23 12:16:32 +02:00
Bjarke Berg 7e1620cbc3 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-05-23 12:15:39 +02:00
Nikolaj 7776cded73 Bump version to next RC 2023-05-22 15:19:13 +02:00
Nikolaj 54af079d97 Fix version 2023-05-22 15:18:14 +02:00
Nikolaj dee01e950c Merge branch 'release/12.0' into v12/dev 2023-05-22 15:17:25 +02:00
459d664531 V12: Map |DataDirectory| to path in connectionString (#14278)
* Add Data directory as constants

* Use new constants instead of internal ones

* Replace data directory in connection string if its there

* Update src/Umbraco.Cms.Persistence.EFCore/Extensions/UmbracoEFCoreServiceCollectionExtensions.cs

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2023-05-22 12:44:52 +02:00
MoleandGitHub 1e6c220610 Downgrade OpenIdDict (#14279) 2023-05-22 12:29:16 +02:00
Kenn JacobsenandGitHub 8bbca79e55 Split the Examine specifics from API query service (#14257)
* Split the Examine specifics from API query service to a provider based model

* Review changes: Use paged model as provider return value + add logging
2023-05-22 11:06:22 +02:00
Dhanesh Kumar MjandSebastiaan Janssen 7d3c22b28a [Fix] Block editor labels showing Angular JS on first load. (#14143)
Co-authored-by: Dhanesh Kumar <“dhanesh.kumar@phases.io”>
(cherry picked from commit 58695b6e9f)
2023-05-19 11:27:01 +02:00
58695b6e9f [Fix] Block editor labels showing Angular JS on first load. (#14143)
Co-authored-by: Dhanesh Kumar <“dhanesh.kumar@phases.io”>
2023-05-19 11:21:40 +02:00
Sebastiaan Janssen bd7de1c89b Merge branch 'v12/dev' into contrib 2023-05-19 10:47:27 +02:00
Mykyta ZakharovandGitHub 4b62cb59b7 Issue-12704: added new necessary indexes. 2023-05-18 12:28:00 +01:00
Nikolaj 867a8a4066 Bump version to next RC 2023-05-17 13:25:08 +02:00
Bjarke BergandGitHub a4202f352a Ignore macros completely in deliveryapi (#14262)
* Hack a fix for MNTP that saves content in configuration instead of document

* Ignore macro parsing in delivery api, instead of exploding
2023-05-17 11:03:27 +02:00
Marc GoodsonandGitHub 9640616b56 Update ContentValueSetValidator to allow include/exclude of fields (#14177) 2023-05-17 10:19:18 +02:00
Vitor RodriguesandEmma L Garland 6fcdb1a6e4 Fix build required before initial publish for packages 2023-05-16 21:33:20 +01:00
Kenn JacobsenandGitHub c5e524c9b9 Wrap RTE content in a dedicated model for future expansion (#14258) 2023-05-16 19:08:38 +02:00
Bjarne FyrstenborgandGitHub 53e3c99af6 Fix transparent background after upgrade of spectrum color picker (#14251) 2023-05-16 15:32:32 +01:00
c632908a51 Re-added the postmigration from the migration context (#14255)
* Re-added the postmigration from the migration context

* Minor cleanup

* Add executed migration contexts to the result object

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-05-16 14:28:30 +02:00
Warren BuckleyandJason Elkin 8c42f19d0d Fix the args used in log endMessages in the profillingLogger 2023-05-16 12:07:05 +01:00
0548266d0f Check folder exist before trying to delete (#14249)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-05-15 16:09:36 +02:00
Lucas Bach BisgaardandGitHub 9f028e0bd5 Add posibillty to use composition on memberstype (#14060) 2023-05-15 15:51:14 +02:00
Bjarke BergandGitHub 27e5b55e05 Added OpenIddict dependencies for future usage (#14247) 2023-05-15 13:24:19 +02:00
Nikolaj e50a3d1340 Trust Test DB certificate 2023-05-15 12:43:13 +02:00
Nikolaj 79ae829ac7 Set version to rc1 2023-05-15 10:55:43 +02:00
Sebastiaan Janssen f7bdba6279 Merge branch 'v12/dev' into contrib 2023-05-15 10:48:51 +02:00
e572dcfa2d Delivery API: Handle more unhappy paths when querying (#14245)
* Handle more unhappy paths

* Review comments

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-05-15 10:46:29 +02:00
Kenn JacobsenandGitHub b32b8c2265 Un-routable content should never be accessible in the delivery API (#14242) 2023-05-15 10:27:20 +02:00
Kenn JacobsenandGitHub 85d46c3e82 Merge local and global crops for MediaPicker3 (#14237) 2023-05-15 10:06:24 +02:00
Kenn JacobsenandGitHub 368e9f2f59 Fix delivery API cache level for media picker property editors (#14238) 2023-05-15 08:49:01 +02:00
5377c17b5d XPath can unambiguously use $site/$parent (#14127)
* XPath can unambiguously use $site/$parent

* add deprecation notices and obsolete methods

* Update deprecation description text/instruction

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

* Small spelling fix on deprecation description

* keep depr. getByQuery and handle legacy usage

---------

Co-authored-by: Kalle Macklin <karlmacklin@users.noreply.github.co>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2023-05-15 08:42:58 +02:00
Andreas ZerbstandGitHub 401fa7334b Fixed: an block grid editor accceptance test on the pipeline for v12 (#14240)
* The attribute we asserted on has been changed which failed our test. The test is updated to match with the correct url

* Updated so we use encodeURI instead of replacing the values in the path
2023-05-15 08:04:16 +02:00
Bjarke Berg 5df655d599 Unbreak breaking change 2023-05-15 07:58:43 +02:00
Bjarke Berg d48a8d7c75 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/ViewModels/Installer/InstallViewModel.cs
2023-05-15 07:57:45 +02:00
Bjarke Berg a29d63475c Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-05-15 07:55:39 +02:00
Elitsa MarinovskaandGitHub 1a8dc32b02 Adding Unauthorized to ProducesResponseType for single-item endpoints (#14239) 2023-05-12 09:26:26 +02:00
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
Kenn JacobsenandGitHub eb08a48c3a Fix "save and close"/"publish and close" for infinite editing of language variant content (#12577) 2023-05-12 00:11:51 +01:00
Niels LyngsøandGitHub 7d512bea39 enable hovering your way to a parent actions + remove unused part (#13692) 2023-05-11 16:25:35 +01:00
36fe2f7e49 V12: Remove test.only for acceptance tests (#14232)
* Remove test.only

* Try quick fix for test

* Fixed failing test so it now locates the correct class. Updated the locators aswell

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-05-11 15:02:52 +02:00
Kenn JacobsenandGitHub 06bd728c18 Only index content for the Delivery API when it is enabled (#14235) 2023-05-11 14:42:57 +02:00
Nikolaj GeisleandGitHub 8d4e55f8bb Enable ForceCreateDatabase for SqlServer (#14234) 2023-05-11 14:39:21 +02:00
Nikolaj GeisleandGitHub e4c03e0d4e V11: Obsolete action to publish (#14208)
* Add obsolete message to ActionToPublish

* Obsolete handler for ContentSentTOPublishNotifcation
2023-05-11 13:58:57 +02:00
36d72ac85c Fallback to detailed if not telemetry level not set (#14134)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-05-11 13:50:47 +02:00
02669e930c V12: Update dependencies to latest (#14204)
* Update dependencies to latest

* revert npoco back to 5.5.0

* Updated Npoco and Serilog

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-11 13:32:14 +02:00
Kenn JacobsenandGitHub b7cf00ac5d Handle applied public access restrictions in the Delivery API content index (#14233)
* Automatically remove content from the delivery API content index when public access restrictions are applied

* Review changes
2023-05-11 11:19:34 +02:00
Ronald BarendseandGitHub 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
Ronald BarendseandGitHub 27ae8bdba9 v12: Add HMAC image processing protection (#14181)
* Update to ImageSharp 2.1.0 and ImageSharp.Web 2.0.0-alpha.0.23

* Rename CachedNameLength to CacheHashLength and add CacheFolderDepth setting

* Replace PhysicalFileSystemProvider with WebRootImageProvider

* Support EXIF-orientation in image dimention extractor

* Remove virtual methods on FileProviderImageProvider

* Simplify FileInfoImageResolver

* Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.25 and remove custom providers

* Make CropWebProcessor EXIF orientation-aware

* Improve width/height sanitization

* Also use 'v' as cache buster value

* Add WebP to supported image file types

* Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.27 and fix test

* Fix rounding error and add test cases

* Update to newest and stable releases

* Move ImageSharpImageUrlGenerator to Umbraco.Web.Common

* Use IConfigureOptions to configure ImageSharp options

* Implement IEquatable on ImageUrlGenerationOptions classes

* Fix empty/null values in image URL generation and corresponding tests

* Use IsSupportedImageFormat extension method

* Remove unneeded reflection

* Add HMACSecretKey setting and add token when generating image URLs

* Ensure backoffice image URLs are generated by the server (and include a correct HMAC token)

* Abstract HMAC generation to IImageUrlTokenGenerator

* Change cache buster value to 'v' and use hexadecimal timestamp

* Update comments

* Fix backoffice thumbnail URL generation

* Update grid media thumbnail URL generation

* Remove breaking changes

* Strip unknown commands from image URL token

* Remove HMAC whitelisting possibility (not supported by ImageSharp)

* Update to SixLabors.ImageSharp 2.1.3

* Add comment to internal constructor

* Fix to support absolute image URLs

* Update to SixLabors.ImageSharp.Web 2.0.3-alpha.0.3

* Remove IImageUrlTokenGenerator and use ImageSharpRequestAuthorizationUtilities

* Move NuGet feed to config file

* Update to ImageSharp v3
2023-05-11 11:01:03 +02:00
martinaronnysdotterandGitHub 921ee4bc62 Sv translation (#14229)
* Adding swedish translations

* Adding swedish translations
2023-05-11 08:52:46 +01:00
Kenn JacobsenandGitHub f4ee0d027a Move all routing tokens (incl. API versioning) to Web.Common (#14231)
* Move all routing tokens (incl. API versioning) to Cms.Web.Common, so the site can start without adding the delivery API in Startup

* Fixed merge

* Fix backwards compat
2023-05-11 08:18:43 +02:00
f804c8c209 Handle culture variance and add more options for indexing fields (#14185)
* Handle culture variance and add more options for indexing fields

* Workaround for missing DB on install

* Add a document per language to the delivery API content index

* Filters and Selectors must be able to match multiple values (as OR)

* A few review changes

* Change TODO for a note

* Workaround for lazily resolved field value types in Examine

* Make removal tracking more granular to cover both single and all culture deletion

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-05-10 15:48:00 +02:00
Nikolaj GeisleandGitHub eb0c7e617e Unbreak IMigrationPlanExecutor.cs (#14225) 2023-05-10 15:23:00 +02:00
Nikolaj GeisleandGitHub b0b591821b V11: prevent currentuser resetting password without old password (#14189)
* Implement check for current user if no old password

* Add default implementation to avoid breaking change9
2023-05-10 14:55:06 +02:00
Kenn JacobsenandGitHub 2f7cb83462 IAppCache implementations should not cache null values (#14218)
* IAppCache implementations should not cache null values

* Add comment
2023-05-10 14:23:02 +02:00
b0f42a2c86 Move the built-in properties back to the delivery API media model + support property expansion for other media properties (#14224)
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-05-10 14:04:42 +02:00
9187d92a2c Copied back swagger for delivery api from v13 implementation (#14222)
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-05-10 13:29:45 +02:00
Sebastiaan Janssen db50b11a67 Merge branch 'v12/dev' into contrib 2023-05-10 13:13:45 +02:00
e3e6582715 Always use text elements in RTE JSON output (#14220)
* Always wrap text in #text elements for RTE JSON output

* Small cleanup

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-05-10 08:47:23 +02:00
7ed59f05cb Delivery API: Not Found response when the start-item in "Start-Item" header is invalid (#14217)
* Update comment

* Implement ValidateStartItemAttribute

* Implement StartItemHeaderHasValue() on IRequestStartItemProvider

* Fix case-sensitivity problem on url segment

* Change StartItemHeaderHasValue() to RequestedStartItem()

* Fix variant start-item header bug

* Rearranging attributes

* Revert to not explicitly get the culture from IRequestCultureService

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-05-10 08:05:57 +02:00
6f3cf6ead5 Migration needs to check for completed transitions before accessing (#14174)
* check for completed transitions before accessing target state

* upgrader should be happy with initial and final state being the same value - only an empty final state should throw

* refactor

* reduce complexity

* Don't check for successfull

* Add test that runs migration twice

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-05-09 12:26:41 +02:00
MoleandGitHub 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
NuklonandGitHub dfde6798d9 Fixes #14102 - NestedPropertyIndexValueFactoryBase ignores compositions (#14115) 2023-05-09 09:04:01 +02:00
Bjarke Berg 7ca6cb97d3 Merge remote-tracking branch 'origin/v12/dev' into v12/dev 2023-05-08 16:59:57 +02:00
Bjarke Berg aee358330d Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/Controllers/ModelsBuilder/BuildModelsBuilderController.cs
#	src/Umbraco.Cms.ManagementApi/DependencyInjection/MappingBuilderExtensions.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts
2023-05-08 16:57:26 +02:00
43e0dfc7c7 Delivery API: Make classes sealed (#14214)
* Make implementations sealed and internal if possible

* Remove usings

* Making some models sealed as well

* Making more models sealed

* Last model changes

* Un-seal ApiContentResponse

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-05-08 13:20:02 +02:00
Bjarke Berg fb11fc6bc4 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
2023-05-08 10:36:26 +02:00
8f8eeefd90 Delivery API: Fix default sorting when querying (#14207)
* Fix default sort for the query endpoint

* Revert changes in PathSortIndexer

* If no sort query option is provided, keep the index sorting as default

* Delete path sort and path sort indexer

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-05-08 09:34:43 +02:00
Elitsa MarinovskaandGitHub 83230d377c Handle unhappy paths for the multiple items endpoint (#14199) 2023-05-08 06:52:02 +02:00
Bjarke BergandGitHub 0f1c2f7022 Ensure no management api for v12 (#14197)
* Remove management api

* Remove actual files
2023-05-04 13:32:41 +02:00
Nikolaj b39525b881 Merge branch 'release/11.4' into v11/dev
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts
2023-05-04 09:23:05 +02:00
Nikolaj 842f1f886f Use regex for class 2023-05-03 13:15:17 +02:00
Nikolaj a744cd465a Try quick fix for test 2023-05-03 13:13:39 +02:00
Nikolaj cc7798b343 Remove test.only 2023-05-03 12:13:34 +02:00
Nikolaj e7f07a881b Revert "Case-insensitive tag names with SQLite provider (#14012)"
This reverts commit bb7752c483.
2023-05-03 11:39:24 +02:00
Jacob Overgaard 3c5de5a321 Backoffice JS dependency updates (#14179)
* updates @babel/* to 7.21.4

* update @microsoft/signalr to 7.0.5

* update @umbraco-ui/uui to 1.2.1

* update ace editor to 1.18.0

* update all build dependencies to latest version

* update jquery to 3.6.4

* update spectrum-colorpicker2 to 2.0.10

* Add icon for "styles" alias (style select)

* update tinymce to 6.4.2

Read more here: https://www.tiny.cloud/docs/tinymce/6/6.4.1-release-notes/
2023-05-03 11:10:12 +02:00
Jacob Overgaard c2a550daf0 Fix: Form elements in thirdparty dashboard views get removed (#14152) 2023-05-03 11:09:29 +02:00
Jacob Overgaard c4d84e1c91 Fix: Form elements in thirdparty dashboard views get removed (#14152) 2023-05-03 11:09:11 +02:00
Jacob Overgaard 32b4627ee8 Fix: Form elements in thirdparty dashboard views get removed (#14152) 2023-05-03 11:08:54 +02:00
Jacob OvergaardandGitHub f3668e0aab Fix: Form elements in thirdparty dashboard views get removed (#14152) 2023-05-03 10:37:57 +02:00
Nikolaj bcf7d907ed Merge remote-tracking branch 'origin/v11/dev' into release/11.4 2023-05-03 10:03:47 +02:00
Sebastiaan Janssen b3d580de31 Merge branch 'v11/dev' into contrib 2023-05-03 09:56:43 +02:00
Ronald BarendseandNikolaj 47ae6e4ee8 Add DynamicRequestCultureProviderBase and improve locking (#14064) 2023-05-03 09:49:55 +02:00
Jacob OvergaardandZeegaan aeb0251727 Backoffice JS dependency updates (#14179)
* updates @babel/* to 7.21.4

* update @microsoft/signalr to 7.0.5

* update @umbraco-ui/uui to 1.2.1

* update ace editor to 1.18.0

* update all build dependencies to latest version

* update jquery to 3.6.4

* update spectrum-colorpicker2 to 2.0.10

* Add icon for "styles" alias (style select)

* update tinymce to 6.4.2

Read more here: https://www.tiny.cloud/docs/tinymce/6/6.4.1-release-notes/
2023-05-03 08:21:27 +02:00
Jacob OvergaardandGitHub 99049c2c07 Backoffice JS dependency updates (#14179)
* updates @babel/* to 7.21.4

* update @microsoft/signalr to 7.0.5

* update @umbraco-ui/uui to 1.2.1

* update ace editor to 1.18.0

* update all build dependencies to latest version

* update jquery to 3.6.4

* update spectrum-colorpicker2 to 2.0.10

* Add icon for "styles" alias (style select)

* update tinymce to 6.4.2

Read more here: https://www.tiny.cloud/docs/tinymce/6/6.4.1-release-notes/
2023-05-03 08:10:32 +02:00
Anders BrohusandGitHub 7df5c9c212 Fixing danish typos (#14184)
* Fixed typo

* Fixed another typo

* Removed space from translation
2023-05-02 10:13:47 +01:00
Ronald BarendseandGitHub 3caa2a3ce2 Add DynamicRequestCultureProviderBase and improve locking (#14064) 2023-05-02 09:46:43 +02:00
367e110681 Move relation mapping (#14153)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-05-02 07:40:09 +02:00
a3160fe022 Move relation mapping (#14153)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-05-02 07:37:59 +02:00
2aa9ceab1a Add member system fields to ListView (#14069)
* Add member system fields to ListView

* Small fix

* Add sort options for new systemfield for members.

---------

Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>
2023-04-28 16:37:22 +02:00
fc3f342906 Add sort handlers for create and update date (#14178)
* Add sort handlers for create and update date

* Make things sealed

* Update the field names

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-28 11:14:50 +02:00
376c0bf7ba Update the delivery API content index at un/publish (#14175)
* Update the delivery API content index at un/publish

* Make the query service use "itemId" instead of "id" when extracting GUIDs + only fetch that single field rather than all fields

* Simplify the code a little

* Making AncestorsSelectorIndexer sealed

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-28 09:46:28 +02:00
Elitsa MarinovskaandGitHub ca5c3c240a Delivery API: Apply start-item in the base querying request (#14168)
* Taking into account the start item when no "fetch" selector is present

* Fix spacing

* Get rid of extra DefaultSelect method

* Remove comment for default selector

* Apply default sorting directly in HandleSorting()

* Get rid of nesting conditional logic
2023-04-27 19:32:05 +02:00
d72eb23102 Handle unroutable published content (#14166)
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-27 13:32:15 +02:00
d2a8068ca6 Filter out disallowed content types from the delivery API content index (#14156)
* Filter out disallowed content types from the delivery api content index

* Added .

* Allow children of disallowed content types in the index

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-27 10:30:30 +02:00
a0d325cfe0 Make delivery API indexers and handlers public (sealed) so they can be overridden by custom ones (#14160)
* Make delivery API indexers and handlers public (sealed) so they can be overridden by custom ones

* Making the rest of the indexers public (sealed)

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-26 15:13:26 +02:00
MoleandZeegaan d589115b67 Set culture variation when getting property types for indexing (#14167) 2023-04-26 15:01:35 +02:00
Bjarke Berg 4fcdcb4002 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-04-25 15:43:22 +02:00
Bjarke Berg a45f158d9e Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-04-25 15:42:21 +02:00
Elitsa MarinovskaandNikolaj c33ec7ca55 Change state to publishing before handling ContentSavingNotification (#14114) 2023-04-25 15:10:13 +02:00
Michałandgeorgebid 0765a2ebbb Save and preview translation. 2023-04-25 14:05:25 +01:00
7e49493c8c V12: Reset cache on migrating (#14133)
* Reset cache when migrating

* Manually delete cache file

* Rewrite migration to delete files

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-04-25 14:50:17 +02:00
Bjarke Berg c85a6274f8 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Document/BlockGridEditorInDocument.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaFiles.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/mediaSection.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/partialViews.spec.ts
2023-04-25 13:45:26 +02:00
7e117d2496 Delivery API content index handlers + unpublished/protected content handling (#14138)
* Introduce content index handlers for the Delivery API

* Do not add protected content to the index

* Re-introduce public collection builder extensions

* Add backwards compatible constructor to ConfigureIndexOptions

* Fix edge case for published children of unpublished parents

* Reduce number of hardcoded field names

* Fixed copy/paste comment

* Fix field definition type for date

* Do not add trashed items to the content index

* Don't expose protected content through the item endpoints

* Removing ReSharper comment

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-04-25 09:21:33 +02:00
Niels LyngsøandZeegaan 08bedd7c13 fix situation when config was not available. (#14148) 2023-04-25 09:14:37 +02:00
Richard OckerbyandGitHub eb1523cc81 Alter the datatype of the UmbracoKeyValue value column (#14085) 2023-04-24 12:38:21 +02:00
Niels LyngsøandGitHub 3b104bf256 fix situation when config was not available. (#14148) 2023-04-24 12:24:36 +02:00
Kenn JacobsenandGitHub 6760f72512 Fix the "disposed object" error when rendering RTE content as JSON (#14147) 2023-04-24 12:04:05 +02:00
Mark DrakeandGitHub 1436fe4e15 Edge Cases for Issue #13838: Hotkey Actions Triggered from Web Components (#14098) 2023-04-21 14:12:18 +02:00
Kenn JacobsenandGitHub ced4f84dfe JSON output from RTE - review changes (#14139) 2023-04-21 11:42:49 +02:00
Dhanesh Kumar MjandGitHub 00eab03d50 Save and Preview blank on second use #14052 (#14094) 2023-04-21 11:27:08 +02:00
Michael RobertsonandGitHub 2987dcb30e Add IModelsGenerator Interface (#12210) 2023-04-20 11:12:53 +02:00
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 78e1f748e5.

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

This reverts commit a0292ae535.

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

This reverts commit 6b7c37a5bf.

* 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 78e1f748e5.

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

This reverts commit a0292ae535.

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

This reverts commit 6b7c37a5bf.

* 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
Søren KottalandGitHub c4cf5f910d Adds padding to the icon in btn-social (#14080) 2023-04-18 16:29:31 +02:00
Sebastiaan Janssen 11ac2ca971 Merge branch 'v11/dev' into contrib 2023-04-18 14:23:42 +02:00
Markus JohanssonandLaura Neto 80f6bb404a #14016 Fixed, added cache buster to Block Grid Editor stylesheets 2023-04-15 18:16:15 +02:00
Mark Drakeandgeorgebid 9a638b6edc resolve spacing issues with block list inline editor when it is the last property editor on the current tab 2023-04-14 14:48:36 +01:00
Bjarke Berg 2af425fd90 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	version.json
2023-04-14 10:12:51 +02:00
Bjarke Berg 4521c881db Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	version.json
2023-04-14 10:04:35 +02:00
Dhanesh KumarandMichael Latouche 2c580e8d4f fix for the char limit(512) for textboxdatatype 2023-04-13 23:06:23 +02:00
Erik-Jan WestendorpandGitHub f43bc50e7d Translate tree headers to Romanian (#14077)
* Translate treeHeaders

* Oops
2023-04-13 20:07:06 +02:00
eb31889be9 V12: Cherry pick unscoped migrations (#14086)
* New Backoffice: Refactor migrations to allow for unscoped migrations (#13654)

* Remove PostMigrations

These should be replaced with Notification usage

* Remove outer scope from Upgrader

* Remove unececary null check

* Add marker base class for migrations

* Enable scopeless migrations

* Remove unnecessary state check

The final state of the migration is no longer necessarily the final state of the plan.

* Extend ExecutedMigrationPlan

* Ensure that MigrationPlanExecutor.Execute always returns a result.

* Always save final state, regardless of errors

* Remove obsolete Execute

* Add Umbraco specific migration notification

* Publish notification after umbraco migration

* Throw the exception that failed a migration after publishing notification

* Handle notification publishing in DatabaseBuilder

* Fix tests

* Remember to complete scope

* Clean up MigrationPlanExecutor

* Run each package migration in a separate scope

* Add PartialMigrationsTests

* Add unhappy path test

* Fix bug shown by test

* Move PartialMigrationsTests into the correct folder

* Comment out refresh cache in data type migration

Need to add this back again as a notification handler or something.

* Start working on a notification test

* Allow migrations to request a cache rebuild

* Set RebuildCache from MigrateDataTypeConfigurations

* Clean MigrationPlanExecutor

* Add comment explaining the need to partial migration success

* Fix tests

* Allow overriding DefinePlan of UmbracoPlan

This is needed to test the DatabaseBuilder

* Fix notification test

* Don't throw exception to be immediately re-caught

* Assert that scopes notification are always published

* Ensure that scopes are created when requested

* Make test classes internal.

It doesn't really matter, but this way it doesn't show up in intellisense

* Add notification handler for clearing cookies

* Add CompatibilitySuppressions

* Rename Execute to ExecutePlan

We have to do this to be able to obsolete :(

* Update CompatibilitySuppressions

* Update src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs

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

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

* generate compatability suppresion file

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-04-13 12:23:44 +02:00
fe11f3c8e1 Bumped version to 12.0.0-rc (#14087)
* Bumped version to 12.0.0-alpha1

* Update version.json

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-04-13 11:01:28 +02:00
Nikolaj c636c7a7d2 Bump version 2023-04-13 08:52:50 +02:00
Nikolaj 810df46823 Merge branch 'release/11.3' into v11/dev 2023-04-13 08:49:32 +02:00
Nikolaj a1d6f65cff Bump to non-rc 2023-04-12 09:36:49 +02:00
Mike MaseyandMichael Latouche cb544f15ee feat: add cite as valid element for tinymce default settings 2023-04-07 23:48:37 +02:00
9223b5737e Update target to execute during packaging (#13521)
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-04-05 12:59:01 +02:00
Ronald BarendseandGitHub 4cb46f06ae Update default UmbracoVersion template value using MSBuild target (#13481)
* Update default UmbracoVersion template value using MSBuild target

* Fix target order when using pack --no-build

* Use JsonPathUpdateValue MSBuild task to update default UmbracoVersion template value

* Update UmbracoVersion in Umbraco Package RCL
2023-04-05 11:16:43 +02:00
Ronald BarendseandGitHub 92d92feb15 Add new 'Umbraco Package RCL' project template (#13776)
* Add new 'Umbraco Package RCL' project template

* Add --no-restore, hide --framework and remove conflicting -v parameter in Umbraco Package project template

* Hide --framework and --PackageTestSiteName, remove conflicting -v parameter in Umbraco project template and persist selected parameters

* Revert changes to Framework and UmbracoVersion parameter names
2023-04-05 09:32:48 +02:00
Bjarke Berg be2887683b Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-04-04 09:18:03 +02:00
Lewis HazellandGitHub 37d737f9bc Case-insensitive tag names with SQLite provider (#14012)
* Ensure case insensitivity in tag name queries.

Use LIKE instead of = to ignore collation rules.

* Add integration test for creating tag relations with mixed casing.
2023-03-31 20:36:25 +02:00
b8899459dc Determine correct if we can create a database with current connectionstring (#14030)
* Fix CanForceCreateDatabase method and add some unit tests

* Fixed an old copy/paste error

* A little nitpicking over wording and formatting

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-03-31 11:37:41 +02:00
Lucas Bach BisgaardandLaura Neto 3385947c4e Fix bug, in multiurlpicker where you cannot deselect a selected entity. 2023-03-31 10:03:18 +02:00
c662f5a36e Determine correct if we can create a database with current connectionstring (#14030)
* Fix CanForceCreateDatabase method and add some unit tests

* Fixed an old copy/paste error

* A little nitpicking over wording and formatting

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-03-30 10:19:35 +02:00
e30587f90d Support readonly set via SendingContentNotification (#13557)
* Support readonly set via SendingContentNotification

* Apply changes to second umb-property-editor as well

* Remove check on property.supportsReadOnly

* Disable allow unlock

* Add check on property.readonly

* Small adjustment in the order of preview checks

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2023-03-30 09:15:46 +02:00
Bjarke Berg 8e7798b8f0 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-03-29 10:58:40 +02:00
Bjarke Berg 61a33c734c Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
2023-03-29 10:30:16 +02:00
BatJanandSebastiaan Janssen 69010baceb Change style to class 2023-03-28 12:54:26 +02:00
7349ae1c5c Fix pressing enter in a property editor name field (#13329)
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2023-03-28 12:53:13 +02:00
patrickdemooij9andGitHub b17d9004fd Memory improvements to ShortStringHelper (#13089) 2023-03-28 10:18:41 +02:00
Bjarne FyrstenborgandGitHub 3a214975ed Add sortorder to configuration field (#13075) 2023-03-28 09:58:56 +02:00
1f6307944b Fixes: listitem: <li> elements must be contained in a <ul> or <ol> (#13120)
Co-authored-by: Rob Nicolson <rob.nicolson@brightwire.net>
2023-03-28 09:36:53 +02:00
Sebastiaan Janssen a88d0c0ec9 Unit tests need updating now that the WriterId is properly being set after merging #12843 2023-03-27 17:46:13 +02:00
Matthew CareandGitHub b34a93ed59 Prevent overflowing property values (#12943) 2023-03-27 12:40:39 +02:00
Ealse BoumaandSebastiaan Janssen 93a85a46f3 Fix: Infinite Editor creates each save action a new version when content is invalid (#12713) 2023-03-27 11:29:07 +02:00
Patrick de MooijandSebastiaan Janssen 3ee9bfbc93 12748: Make sure to set writerId 2023-03-27 09:54:35 +02:00
Sebastiaan Janssen 47bcc3e209 Merge branch 'v11/dev' into contrib 2023-03-24 10:51:31 +01:00
Bjarke BergandGitHub f8e5205aa7 Reverse the EnablePackageValidation in tests, so it is explicity opt-in. Otherwise the generated csproj file in Benchmarks will always fail (#14004) 2023-03-24 08:40:51 +01:00
patrickdemooij9andGitHub e550a4ce3a Performance improvement for ReplaceFirst function (#13018)
* Some benchmarks for replacefirst & span method
2023-03-23 20:11:59 +00:00
LandLogic ITandMichael Latouche 99268f6211 Add it key translation 2023-03-23 19:14:29 +01:00
031beee989 Improve ImageSharpImageUrlGenerationTests (#13332)
* Improve ImageSharpImageUrlGenerationTests

Removed a few "stale" tests that look to have been from code of old.
Add tests for all ImageUrlGenerationOptions.
Add some edge case tests to make the tests more sensitive.
Reduce scope for certain tests so the test is more focused on one thing rather than multiple

* Amending a mis-spelt variable.

---------

Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
2023-03-23 09:38:18 +00:00
Nikolaj 1ece9627f7 Convert path to absolute 2023-03-23 09:22:51 +01:00
DennisandGitHub f64f634979 Fix equality check on property group (#13133)
* Fix equality check on property group

Also fix circular reference on PropertyTypeCollection
2023-03-21 23:38:10 +00:00
Nikolaj 21036a4c50 Merge remote-tracking branch 'origin/release/11.2.1' into v11/dev
# Conflicts:
#	build/azure-pipelines.yml
#	version.json
2023-03-21 08:54:08 +01:00
jesperweberandSebastiaan Janssen 36069aa813 Added sort audit to nodes actually being sorted 2023-03-20 16:21:38 +01:00
Sebastiaan Janssen d1fae0e350 Merge branch 'v11/dev' into contrib
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
2023-03-20 16:01:08 +01:00
Joel MandellandGitHub 451d1cec6a Fixing issue #13865 (i.e. Rich text link picker not resolving correct variant when using .ValueFor()). (#13889) 2023-03-20 15:52:36 +01:00
Busra SengulandGitHub 5d3e3a4c71 Updated core collabs team member on contributing page 2023-03-20 11:14:52 +00:00
Bjarke Berg 298890436a Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-03-20 08:41:29 +01:00
Bjarke Berg 5e21ddccc4 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
2023-03-20 08:38:28 +01:00
9a5e21702d small wording change for Element Type description (#13971)
* small wording change for Element Type description

* updated language files IRT Element Types

* replacing a duplicate Block List with Block Grid

---------

Co-authored-by: Rheannon <ral@umbraco.dk>
2023-03-18 00:03:49 +01:00
Donald NairnandKyle Eck 5915c9b29f Remove limitation on nested content to 1,000 items where max items unset. 2023-03-17 09:19:29 -04:00
Dhanesh Kumar MjandGitHub 71e7836001 [fix] Infinite Editor from member property with a media picker (#13817) 2023-03-17 12:20:23 +01:00
Sebastiaan Janssen 70b6aaf963 Merge branch 'v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/directives/components/umbavatar.directive.js
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
2023-03-17 08:56:55 +01:00
Ronald BarendseandGitHub 180fae342e Revert breaking changes from #13936 and remove CompatibilitySuppressions.xml (#13979)
* Revert breaking changes introduced by PR #13936

* Update PackageValidationBaselineVersion to 11.0.0 (stable version) and remove all CompatibilitySuppressions.xml files

* Fix build pipeline (pack solution again, avoiding trying to pack template projects)
2023-03-16 20:32:54 +01:00
Sebastiaan Janssen 28ce2c5787 Merge branch 'v11/dev' into contrib 2023-03-16 08:07:25 +01:00
Lennard FonteijnandMichael Latouche e10ff16fa1 Fixed issue where filtering allowed element types with a NotificationHandler causes issues with Block Grid areas 2023-03-16 04:34:32 +01:00
Matt BegentandGitHub f6ebcdcfb6 Add skip links to header (#13938)
* Add skip links to header

* Tweak skip link z-index
2023-03-15 20:49:53 +01:00
6594c1350f Updated the version requirements for running the current back office (#13940)
* Updated the maximum Node version supported

Building the current version of the back office is only supported on Node v16 and earlier so have updated the docs to reflect that.

* Updated the .Net and VS requirements

For v11 you now need to be running .Net 7 and VS 2022 so have updated the docs to reflect that.

* Apply suggestions from code review

Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>

---------

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
2023-03-15 12:56:47 +01:00
Erik-Jan WestendorpandGitHub 11b20cc6cc Add Romanian language (#13965) 2023-03-15 07:26:11 +01:00
Jason ElkinandSebastiaan Janssen 50c4f8c6b5 Use correct listenAddress for Karma on node 18+ 2023-03-15 07:24:28 +01:00
Nikolaj 921a32ee03 Bump version 2023-03-14 14:20:31 +01:00
Bjarke BergandNikolaj fcca1cf5c0 Check the tmpimg path is in the expected folder 2023-03-14 14:19:11 +01:00
Karn Blackmoreandgeorgebid daf54468b1 Fix algiment issues by setting the editor to position fix. 2023-03-14 12:18:01 +00:00
kiasynandGitHub 62b49c7ea7 Fix ViewContext.FormContext not being set during BeginUmbracoForm (#13914)
* Fix ViewContext.FormContext not being set during BeginUmbracoForm

Client validation is broken without this if there are multiple forms with the same field names on a page.

* Tweaked comment
2023-03-13 14:37:51 +01:00
ChadandGitHub 7c30da9fbf Faster cache key generation (#13504)
* Reduce the number of string concatenations required to generate cache keys.
* Updated to match existing Nucache keys.

---------
2023-03-13 13:06:02 +00:00
1fb6afbc03 Add setting to disable domain warnings (#13954)
* Add appsetting and return if domain warning are disabled

* Fix unit tests

* Add default value

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-03-13 14:04:16 +01:00
70a34105e0 V11: obsolete legacy data types (#13953)
* Obsolete the grid

* Obsolete the legacy media picker

* Obsolete nested content

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-03-13 11:33:27 +01:00
Joe GlombekandMichael Latouche 066276a532 Add checkered background to file upload
(including SVGs added to the media library)
2023-03-11 02:13:29 +01:00
44077e15e3 Extract redirect URL from route values for member logout (#13933)
* Extract redirect URL from route values for member logout

* Update src/Umbraco.Web.Website/Controllers/UmbLoginStatusController.cs

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

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-03-10 10:55:28 +01:00
AaronandGitHub ca515c3ed7 Changed to cast double to long (#13935) 2023-03-09 16:54:29 +01:00
64bd310037 update block label not assigning fixes: #13833 (#13937)
Co-authored-by: Sean Thorne <sean.thorne@truedigital.co.uk>
Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
2023-03-09 15:34:38 +00:00
AaronandGitHub 888dccaec4 Reversed X-XSS (#13936) 2023-03-09 16:19:37 +01:00
AaronandJason Elkin 393845ce4d Solves tooltip issue for block column editor on remove block column editor option 2023-03-09 15:13:57 +00:00
Paul SealandGitHub d8f204ddf9 Fix the reference to the .targets file (#13847)
Updates the reference to the .targets file to use the correct folder name of `buildTransitive` instead of `build`
2023-03-09 13:33:53 +00:00
be72c8147d Faster full nucache table rebuild (#13501)
* SQL Server Truncate when full nucache SQL rebuild.

* Optimize truncate for SQL Lite

* Remove comment.

* Use current DB Types

* I added a couple of formatting changes.

---------

Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
2023-03-09 12:25:07 +00:00
CyberReiterandGitHub 0cfc1fb664 Fall back to object if PublishedPropertyType modelType is null (#13553)
* add null check

* return object when type is null
2023-03-08 11:14:22 +00:00
30abbb0c5d Fix install when adding custom default languages (#13904)
* Adding ids to language installation

---------

Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
2023-03-08 10:18:17 +00:00
Bjarke Berg 52ddcb8d1d Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-03-08 11:01:06 +01:00
Bjarke Berg 2c8ba19531 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-03-08 10:59:46 +01:00
Bjarke BergandGitHub e2a15b58ed Fallback to use ActivatorUtilities to create controller from type, if it is not registered in DI (#13910) 2023-03-07 11:21:57 +01:00
Nikolaj Brask-NielsenandGitHub 0789bb9eb1 Remove transitive project references
* refactor: Remove transitive project relations

* refactor: Remove transitive project relations
2023-03-02 16:43:08 +00:00
Miska HusgafvelandEmma L Garland 282b7ac3d5 Ensure cropperHelper.pixelsToCoordinates returns valid coordinates 2023-03-02 15:52:11 +00:00
Erik-Jan WestendorpandGitHub 5158d8119d Map BackOfficeNotification in ContentMapDefinitions (#13874)
* Map Notifications

* Empty line
2023-03-02 14:23:20 +01:00
Erik-Jan WestendorpandGitHub 9771e77243 IsNullOrWhiteSpace Extension method for HtmlEncodedString (#13747)
* Add IsNullOrWhiteSpace Extension method

IsNullOrWhiteSpace extension method for IHtmlEncodedString

* Move extension method

* Add a UnitTest for the IsNullOrWhiteSpace extension method

* Update unit test
2023-03-02 13:57:43 +03:00
Sebastiaan Janssen 2172765b01 Merge branch 'v11/dev' into contrib 2023-03-02 09:39:10 +01:00
Bjarke Berg ef7db1dec9 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-03-02 08:47:38 +01:00
Bjarke Berg eac6eb820b Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-03-02 08:46:58 +01:00
Menno MoutandMichael Latouche ca23784898 Added a CalculateMediaStartNodeIds method call when the startNode passed in as parameter is null. When this does return an array of startNodes the first one is being used. The question remains if this is desired behaviour. With this implementation the user has no real control over where the file is going to go. Atleast with this implementation the user can now see the file. 2023-03-02 04:56:14 +01:00
Andreas ZerbstandGitHub 922c79ae86 V11/bugfix/fixed flaky test (#13893)
* Moved deleteAllMedia to afterEach, the reason for that is that we delete all the media in each test.

* Added additional timeout and a WaitForTimeout(), the reason for the WaitForTimeout is because it can take a second for the modelsbuilder to update the view.

* Added more timeout for the isSuccessNotificationVisible. Updated the helper ensureNameNotExists so they actually delete the partialViews

* Updated the locators for deleting the UK language. Added an expect for checking if the UK language is visible in the UI

* Updated the position where the dragAndDrop drops to

* Changed the trace so we only save the trace on the first retry, it saves a lot of time when the tests are running, since we dont need to save the trace and then delete the trace after each successful test

* Updated locators. Added an expect so the test waits until the / is visible in the URL before going further into the test

* Changed back to retain on failure on the pipelines, the reason for that is if a test only fails once, then we wont see what the actual error was in the test when looking on the pipeline.

* Added an expect so we wait until the page is  loaded for packages

* Updated the dragAndDrop so they hopefully work.

* Changed values for dragAndDrop

* Updated the dragAndDrop values

* Bumped playwright version
2023-03-01 08:52:26 +01:00
mwillebrandsandJason Elkin 6ce30fb561 Fix for #13860
Undefined error when inserting an empty link in the RTE editor
2023-02-28 17:20:36 +00:00
niekvanderreestandGitHub 27e38e1606 Change GetMinNonAlphaNumericChars() to return 1 (#13876) 2023-02-28 14:47:53 +01:00
Bjarke BergandGitHub ea1ca14f1e Updated to use latest c# language version instead of csharp 8, when build views (#13894) 2023-02-28 09:57:17 +01:00
Andreas ZerbstandGitHub 4719f4eb5a V11/feature/block grid editor content tests rendering (#13885)
* Added tests for testing if the rendering is working as intended for the block grid editor

* Added Layout stylesheets for testing

* We are now using the page.toHaveScreenshot() which checks if the test looks the same as the pngs.

* Updated the toHaveScreenShot so they now take in a shorter name for the pngs

* Updated the page.goto so they new go the to baseUrl based on the umbracoConfig

* Added additional pngs for the Linux tests

* Updated the pngs for linux yet again
2023-02-28 08:16:31 +01:00
Andreas ZerbstandGitHub 610a519045 Added test for testing the content editor with a block grid editor (#13887) 2023-02-28 08:06:43 +01:00
Miska HusgafvelandMichael Latouche 44e8d0ac6d Make additionalRouteVals nullable in Umbraco.Extensions.HtmlHelperRenderExtensions.BeginUmbracoForm() - Fixes #13662 2023-02-27 01:31:59 +01:00
Menno MoutandGitHub 37db3ae3da Listview batch publishing on multi language site, publishes all variants #13755 - Fix (#13772)
* Modified PostPublishById to handle content that is culture variant. Added model and modified the javascript function that call the api endpoint.

* Added separate method for publishing with cultures. Added if else statment to js function.

* Moved check for all cultures being published to the top of PostPublishByIdAndCulture. Added parameter to ngDoc. Added Where Query.
2023-02-26 14:00:28 +01:00
Andreas ZerbstandGitHub 6128ad1bde V11/feature/blockgrid editor content tests advanced (#13877)
* Added test for the advanced section under the block grid editor in content

* Bumped versions

* Added fixture template and customView

* Updated naming of tests
2023-02-23 14:44:58 +01:00
Andreas ZerbstandGitHub e3f5bf8cdf Added test for the settings section (#13878) 2023-02-23 14:30:29 +01:00
Nikolaj GeisleandGitHub d91ed4f568 Obsolete ctor (#13875) 2023-02-23 10:54:20 +01:00
Andreas ZerbstandGitHub c81e9decb8 V11/feature/block grid editor content tests area (#13867)
* Added test for testing the area of the blockGridDataType

* Bumped version of playwright, builders and the helpers

* Added additional test timeout

* Added additional timeout since some test can be slow and timeout

* Added additional mediaLibrary to the path

* Changed so we now use slow which increases the test timeout by three times

* Changed to slow instead of setting timeout
2023-02-23 09:08:46 +01:00
Sebastiaan Janssen 8d714e5d3f Merge branch 'v11/dev' into contrib 2023-02-23 08:10:13 +01:00
Bjarke Berg 8cb9edb69d Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-02-23 07:17:56 +01:00
Bjarke Berg 7b818b2fce Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-02-23 07:17:21 +01:00
Bjarke Berg 4be6e5b71c Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-02-23 07:16:50 +01:00
2a3c0358b1 Add support for Inline Macro - To enable: Add a Macro Parameter called: enableInlineMacro with Umbraco.TrueFalse set to True (value:"1") (#13628)
- Custom Macro Parameter with true as default value can be created for those prefering that in their project

Co-authored-by: Jo Mehmet Sollihagen <jomehmet@solsol.no>
2023-02-22 15:21:53 +01:00
Bjarne FyrstenborgandGitHub 62fdbd159c Reset selected index/searcher (#13866) 2023-02-22 14:54:47 +01:00
Andreas Zerbstandnikolajlauridsen cf1cd51266 Removed path so we can generate templates 2023-02-22 08:49:15 +01:00
Bjarke Bergandnikolajlauridsen 0e65af701f Fixed pipeline after dotnet sdk 7.0.200 2023-02-22 08:49:10 +01:00
nikolajlauridsen 0014f0e6db Bump version 2023-02-22 08:38:16 +01:00
81b28df6ab Merge dev into contrib (#13871)
* Removed path so we can generate templates

* Remove old proj ref to core from cs proj (#13870)

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

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-02-21 13:49:03 +01:00
Sebastiaan Janssen 0d1db91be5 Merge branch 'v11/dev' into contrib 2023-02-21 13:23:04 +01:00
Smayke95andGitHub 42d143c6b2 Add Bosnian language (#13854)
* Add Bosnian language

* fix

* Fix issue with Marketplace
2023-02-21 12:42:01 +01:00
79a9d73a90 Remove old proj ref to core from cs proj (#13870)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-02-21 12:17:17 +01:00
Simone ChiarettaandGitHub 362832b594 Changed modifier for ContentPickerValueConverter (#13864)
Changed internal to public for ContentPickerValueConverter, which was the only property value converter defined as `internal`
Fixes issue umbraco#13858
2023-02-21 08:05:56 +01:00
dependabot[bot]andMichael Latouche d61c32c1e4 Bump @sideway/formula in /tests/Umbraco.Tests.AcceptanceTest
Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases)
- [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-16 23:17:10 +01:00
de27eb697e Fixes #13732 - IsBackOfficeRequest is extremely inefficient (#13743)
* Update UmbracoRequestPaths.cs

* Update UmbracoRequestPaths.cs

* remove redundant check

---------

Co-authored-by: Michael <michael@crossingpaths.be>
2023-02-16 23:09:26 +01:00
Bjarke Berg 622c3b437b Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-02-16 10:08:19 +01:00
Bjarke BergandGitHub c77c5cad3c Merge pull request #13840 from umbraco/v11/bugfix/build-pipeline
Removed path so we can generate templates
2023-02-16 09:28:59 +01:00
Andreas Zerbst 5c276c2d10 Removed path so we can generate templates 2023-02-16 09:18:14 +01:00
Sebastiaan Janssen b3235f1c0e Merge branch 'v11/dev' into contrib 2023-02-15 16:35:54 +01:00
Sebastiaan JanssenandGitHub 37b34aea11 Update up-for-grabs-response.yml 2023-02-15 14:29:28 +01:00
Sebastiaan JanssenandGitHub 09d15b5e30 Update pr-first-response.yml 2023-02-15 14:29:10 +01:00
Sebastiaan JanssenandGitHub 23cacf892f Update issues-first-response.yml 2023-02-15 14:28:42 +01:00
Bjarke Berg 96c94f707a Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2023-02-15 14:15:28 +01:00
Bjarke Berg 88a1c9eb57 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-02-15 14:10:43 +01:00
Bjarke Berg acbf937534 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-02-15 14:10:30 +01:00
Bjarke Berg 776f5ce1a0 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-02-15 14:06:39 +01:00
Bjarke Berg 0204da1123 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-02-15 13:58:22 +01:00
Bjarke Berg 3ffe7f6d5d Fixed pipeline after dotnet sdk 7.0.200 2023-02-15 13:57:58 +01:00
tristanjthompsonandMichael Latouche e9f5b562ad Update JITOptimizerValidator error message. 2023-02-15 12:32:52 +01:00
45036f54dd Sort domains (Culture and Hostnames) (#13797)
* Add sort order to IDomain, UmbracoDomain and DomainDto

* Add migration to create domain sort order column

* Add Sort method to domain service

* Set sort order when persisting new domain and order results

* Add multiple and block style support to umb-button-group

* Allow sorting domains in back-office, improve UI and rewrite PostSaveLanguageAndDomains for correctly sorting domains

* Ensure routing and cache keeps the domain sort order

* Update test to assert correct domain order

* Move migration to target 11.3 and cleanup plan

* Fix formatting/styling and make SelectDomains private

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

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-02-14 10:35:45 +01:00
Ronald BarendseandGitHub 7348171c01 Add DefaultLanguage fallback policy for published values (#13814)
* Add DefaultLanguage fallback

* Implement DefaultLanguage fallback

* Add DefaultLanguage fallback test
2023-02-13 14:50:41 +01:00
Nikolaj bbc8ade227 Bump version 2023-02-09 08:25:01 +01:00
Sebastiaan Janssen 665328f01c Merge branch 'v11/dev' into contrib 2023-02-08 13:02:17 +01:00
280fbdd870 Remove special characters in avatar [part 2] (#13796)
* Update regex

* Update src/Umbraco.Web.UI.Client/src/common/directives/components/umbavatar.directive.js

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

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2023-02-08 12:47:46 +01:00
Bjarke Berg 317891e8cf Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-02-08 12:28:32 +01:00
Bjarke Berg da4e9487e2 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-02-08 12:28:03 +01:00
Jacob OvergaardandGitHub f3bcfcd5d9 v11: npm updates for february (#13803)
* update ace-builds from 1.14.0 to 1.15.0

* update eslint from 8.32.0 to 8.33.0

* update jsdom from 21.0.0 to 21.1.0

* update nouislider from 15.6.1 to 15.7.0
2023-02-08 09:58:40 +01:00
Nikolaj GeisleandZeegaan 3d47cac9ac V10: fix content version cleanup dto migration (#13788)
* Add DoesPrimaryKeyExist method

* Add primary key name to dto

* Add extension method PrimaryKeyExists

* Dont use sql_master table

* Implement DoesPrimaryKeyExists

* Rename without plural s

* Refactor to get proper primary key name and not column name

* Use primary key name and not column name

* Dont filter tables in memory

* Remove .Where

* Don't select all, select only sql

* throw NotImplementedException by default

* USe virtual instead of abstract to avoid breaking change

* Reinstert primary key attribute

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-02-07 13:48:36 +01:00
Anders BrohusandMichael Latouche 559e56949f 2FA translations
Added and changed some translations about 2FA
2023-02-07 12:59:10 +01:00
Bjarke BergandGitHub e3135bd97e Updated nuget dependencies (#13787) 2023-02-06 14:58:48 +01:00
Jacob OvergaardandGitHub 80112d88f4 V11: Fix for media library type dialog (#13780)
* let the server determine the type rather than assuming it is an image

this is especially useful for SVGs that would otherwise be uploaded as images instead of the more appropriate Vector Graphics default type

* do not start processing of the queue if a dialog is shown

return early if the dialog is shown (if _requestChooseMediaTypeDialog() does not immediately return false) because that means the user will pick the media type

* clean up of the scope for performance

remove 'handleFile' since it is not being used and make the other callbacks one-way bound since we are not changing them

* add jsdoc to improve understanding of the dropzone directive
2023-02-06 14:39:57 +01:00
Sebastiaan Janssen 74e2e58935 Merge branch 'contrib' into v11/dev 2023-02-06 14:35:47 +01:00
66f483e88c New backoffice: Obsolete ReadOnlyUserGroup constructor. (#13676)
* Obsolete old ReadOnlyUserGroup constructor

* Update src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs

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

---------

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-02-06 14:32:27 +01:00
Sebastiaan Janssen 75f16b79fb Merge branch 'v11/dev' into contrib 2023-02-06 14:29:48 +01:00
2f5726384d Mini-list view search by id,name & key is fixed. (#13735)
* Mini-list view search by id,name & key is fixed.
Added  multiple conditions in the query to consider id or name or key from the filter param(search bar from minilistview)

* make it more simple ,now using || instead of clause conditions.

---------

Co-authored-by: Dhanesh Kumar <dhanesh.kumar@phases.dk>
Co-authored-by: Michael <michael@crossingpaths.be>
2023-02-06 12:57:36 +01:00
Erik-Jan WestendorpandGitHub 371679b2e5 Remove special characters in avatar (#13766)
* Remove special characters

* Remove some chars not all
2023-02-06 12:40:28 +01:00
Bjarke Berg 6d7b619d94 post merge 2023-02-06 10:18:15 +01:00
Bjarke Berg fe2d071fd5 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-02-06 10:16:49 +01:00
Jacob OvergaardandGitHub 36cbcc36de add check for editorState.getCurrent to find the current editor (relevant in infinite editors), and throw a warning if an editor completely misses the current node context (#13778)
disable drag&drop entirely if the property editor did not get a node through bindings or editorState
2023-02-03 10:20:23 +01:00
Andreas ZerbstandAndreas Zerbst 46742d125a Updated the ID of the locator in the test 'can set a minimum of required blocks in content with a block list editor' to match the correct ID. (#13769) 2023-02-01 15:19:23 +01:00
Andreas ZerbstandAndreas Zerbst eaf7994dca Updated the ID of the locator in the test 'can set a minimum of required blocks in content with a block list editor' to match the correct ID. (#13769) 2023-02-01 15:17:28 +01:00
Andreas ZerbstandAndreas Zerbst 8a5e553986 Updated the ID of the locator in the test 'can set a minimum of required blocks in content with a block list editor' to match the correct ID. (#13769) 2023-02-01 15:16:00 +01:00
Andreas ZerbstandGitHub b538318b5c V11/feature/block grid editor datatype tests (#13666)
* Added tests for the BlockGridEditorDataType

* Bumped versions

* Split the file into two, so we now have a file with the Blocks and one with the Configuration of the datatype

* Changed function variables to class variables.
Changed tests to use the ConstantHelpers
Changed naming
2023-02-01 15:11:18 +01:00
Sebastiaan Janssen 5e03f9bb4e Revert "IScopeProvider" is used from Umbraco.Cms.Infrastructure.Scoping"
This reverts commit 0907255931.
2023-02-01 14:01:29 +01:00
Andreas ZerbstandGitHub fca689b140 V11/feature/block grid editor document test (#13667)
* Added tests for BlockGridEditorInDocument

* Bumped version

* Updated naming
Removed unnecessary reload
2023-02-01 13:32:01 +01:00
Kenn JacobsenandGitHub 4453459f06 Obsolete language ID related properties and methods for V13 (#13753) 2023-02-01 09:37:43 +01:00
Jeroen BreuerandSebastiaan Janssen ff3d8c1c6c Make methods virtual so they can be redefined in derived classes. 2023-01-31 19:43:24 +01:00
dKumarmjandSebastiaan Janssen 0907255931 IScopeProvider" is used from Umbraco.Cms.Infrastructure.Scoping 2023-01-31 18:13:54 +01:00
Bjarke Berg e79198c990 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-31 12:58:48 +01:00
Bjarke Berg 11d393e419 Updated version number 2023-01-31 12:58:33 +01:00
Ealse BoumaandSebastiaan Janssen 5c0673930a Changed default initialized button permissions for listviews 2023-01-31 11:14:20 +01:00
Sebastiaan Janssen 61685a459b Merge branch 'v11/dev' into contrib 2023-01-31 10:17:54 +01:00
417f31fba5 Send email notification on password reset (#13757)
Co-authored-by: Aleksander <alf@umrabco.dk>
2023-01-31 09:04:26 +01:00
Warren BuckleyandGitHub d38fabea4a Fixes #13715 Simple LogViewer queries not returning results (#13748)
* Fixes #13715 issue with simple logviewer searches

* Update Logviewer test - to ensure MessageLike and simple equivalent returns same result count to help catch
2023-01-30 10:32:28 +01:00
Bjarke Berg 432326cc20 Updated the BPlusTree package to reflect the update in the underlying package. 2023-01-30 08:01:54 +01:00
Marc GoodsonandMichael Latouche 23b03f408e Add .woff2 to BrowsableFileExtensions 2023-01-29 20:27:47 +01:00
Bjarke Berg cec613c0cc Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-01-27 09:50:35 +01:00
Bjarke Berg e94328ad57 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-27 09:50:06 +01:00
Bjarke Berg 700a33ac73 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-27 09:49:47 +01:00
dependabot[bot]andJacob Overgaard d3b4bae1b5 Bump ua-parser-js from 0.7.31 to 0.7.33 in /src/Umbraco.Web.UI.Client
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-27 08:56:52 +01:00
Sebastiaan Janssen 33adbf41fa Update contributing docs with the correct branch name 2023-01-26 15:38:54 +01:00
Sebastiaan Janssen 3a7624c385 Merge branch 'v11/dev' into v11/contrib 2023-01-26 15:31:39 +01:00
c868c60ed2 V11: Fix decimal variants (#13741)
* fix sqlite with variants

* Create and register SqlSpecificMapper

* Delete obsolete file

* Add back inheritance

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-01-26 12:26:06 +01:00
Bjarke Berg d180247915 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-01-24 12:02:09 +01:00
Bjarke Berg be0138e526 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-24 11:56:32 +01:00
Bjarne FyrstenborgandGitHub 14af1aea9b Ensure to reset padding and border as well for textarea in richtext (#13012) 2023-01-24 09:18:54 +01:00
MoleandGitHub 17248ce494 V11: Add improved log message on compilation failure using InMemoryAuto (#13678)
* Add improved log message when in memory compilation fails.

* Move LogCompilationFailure into its own method

And hopefully make codescene happeh

* Reduce nesting

* Replace null check with linq
2023-01-23 08:19:15 +01:00
Jacob OvergaardandGitHub 7aee15d6d1 V11: Prevalues as toggles have problems in datatype settings view (#13709)
* format preValues with DataTypeHelper.createPreValuesProps before rendering so they have the 'alias' prop used for input-id to umb-toggle

* preValues are now formatted on fetch so we do not need to do it again
2023-01-20 08:13:37 +01:00
Jacob Overgaard a8acefcaba introduce lint option for gulp so we only lint when building and not watching, which makes dev, watch and fastdev even faster 2023-01-19 12:56:55 +01:00
Jacob OvergaardandGitHub b97dd46608 V11: fix issue where editing a macro was not possible (#13702)
* remove the onSetup for the macro button since we want to always be able to interact with the macro button (either insert or edit)

* let the onAction method find the currently selected macro by asking the active editor for its selection instead of relying on the NodeChanged event
2023-01-19 11:02:33 +01:00
Bjarke Berg 4c62fcfb98 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2023-01-19 09:52:41 +01:00
Bjarke Berg 8c22de0bad Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-19 09:50:54 +01:00
Bjarke Berg 1b88e0a7a1 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	version.json
2023-01-19 09:41:00 +01:00
Jacob OvergaardandGitHub f23ebaefa6 v11: javascript dependency updates (UUI, TinyMCE, jQuery, signalR, and more) (#13696)
* build(deps-dev): update development dependencies

* update the Umbraco UI library to 1.1.0

* update ace editor to 1.14.0

* update diff to 5.1.0

* update jquery to 3.6.3

* update tinymce to 6.3.1

* update underscore to 1.13.6

* update @microsoft/signalr to 7.0.2
2023-01-19 09:39:57 +01:00
Bjarke Berg 2dd38f8393 Merge remote-tracking branch 'origin/v11/contrib' into v11/dev 2023-01-19 09:32:04 +01:00
MoleandGitHub 46049bfd74 Obsolete things broken in migrations refactor (#13658)
* Obsolete chings changed in v13

* Fix tests

* Obsolete Execute and add ExecutePlan with default implementation.

This just calls the old implementation and creates an ExecutedMigrationPlan from the result

In V13 this has its own implementation.

* Mention notification in obsolete message
2023-01-19 09:27:33 +01:00
Jacob OvergaardandGitHub 0d4d3ce33c add workaround for line-height issues with tinymce (#13700)
based on this upstream issue: https://github.com/tinymce/tinymce/issues/6431
2023-01-19 09:26:00 +01:00
Jacob OvergaardandGitHub cfdc4a9573 add the s html element to allow list for TinyMCE (#13697)
Fixes #13637
2023-01-19 09:25:44 +01:00
8fdb5a55ea Updating german translation (#13684)
* updating german translations

* translating missing sections

* added missing closing tag

Co-authored-by: Michael <michael@crossingpaths.be>
2023-01-19 00:19:13 +01:00
Mike MaseyandMichael Latouche 3ebd15b67e fix: move list view selection options to after list in focus order 2023-01-15 22:42:48 +01:00
Bjarne FyrstenborgandMichael Latouche eb9f9c68dd Add separator before reload node in Media Types tree 2023-01-15 21:56:18 +01:00
ustadstarandMichael Latouche fd992f65bb Fix copy content with descendants not copying sort order (#13464) 2023-01-13 01:30:48 +01:00
Kenn JacobsenandGitHub 8463d906a7 Make sure the property editor layout is contained within its container (prevent Z-index bleed-through) (#13583) 2023-01-12 10:55:02 +01:00
Nikolaj 314f79bd07 Bump version 2023-01-11 15:39:26 +01:00
Nikolaj 1438b0a731 Merge branch 'release/11.1' into v11/dev 2023-01-11 15:38:45 +01:00
Nikolaj bad914842a Bump version 2023-01-11 10:25:31 +01:00
Andy ButlandandNikolaj a91c81ee56 Changed healthcheck collection configuration to use a concrete type to ensure configuration settings are bound. 2023-01-11 10:22:39 +01:00
Elitsa MarinovskaandGitHub 5e06f5a8a0 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
2023-01-09 14:16:16 +01:00
Bjarne FyrstenborgandGitHub 3e415b242f Hide colors from icon picker (#13079)
* Ensure border is set so it doesn't jump on selection

* Allow to hide color from icon picker

* Use CSS grid instead to fill icons and with minimum width

* Remove odd flex size

* Set minimum to 60px instead
2023-01-07 03:15:51 +01:00
Bjarke Berg 46798c42b5 Merge remote-tracking branch 'origin/v11/dev' into v11/contrib 2023-01-06 13:52:29 +01:00
Bjarke Berg 84d78e1393 Merge 2023-01-06 10:14:59 +01:00
Bjarke Berg 6d8a3c550f Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-06 08:44:50 +01:00
Erik-Jan WestendorpandMichael Latouche 045c755ccf Translate dictionary area 2023-01-06 02:48:26 +01:00
dependabot[bot]andJacob Overgaard 591c78ae0c Bump decode-uri-component in /src/Umbraco.Web.UI.Client
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 11:10:19 +01:00
dependabot[bot]andJacob Overgaard 3ddb6e6832 Bump json5 from 2.2.1 to 2.2.3 in /src/Umbraco.Web.UI.Client
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 11:09:10 +01:00
Bjarke Berg a1a4f288cd Merge remote-tracking branch 'origin/v11/dev' into v11/contrib 2023-01-05 10:29:30 +01:00
Mykola GorbatenkoandMichael Latouche b52a4363c4 added Ukrainian language 2023-01-05 03:32:52 +01:00
Vitor RodriguesandGitHub 7d9bb8f595 Exposed media file provider configuration method (#13294)
This is required for consumers that intend to use WithCustomMiddleware instead of WithMiddleware, as otherwise they are forced to re-implement this code
2023-01-04 10:23:16 +01:00
Elitsa MarinovskaandGitHub b4ca2a6636 Fixing a few nullable reference types for log viewer (#13634) 2023-01-04 09:24:43 +01:00
Kenn JacobsenandGitHub d1fd1f16fd Move resources and implementations for System.Text.Json for reuse across projects (#13626)
* Moved resources and implementations for System.Text.Json for reuse across projects.

* Move MvcBuilderExtensions as well
2023-01-03 15:34:23 +01:00
CyberReiterandMichael Latouche b7a26360e5 minor improvements to indexing performance 2023-01-02 01:26:25 +01:00
Robert FosterandGitHub e7a986b1c3 fix for #13623 by hiding Member Edit Action Menu on Infinite editing … (#13624)
* fix for #13623 by hiding Member Edit Action Menu on Infinite editing for consistency

* added missing attribute to umb-editor-header for Member editing
2022-12-31 03:51:33 +01:00
MehmetandGitHub 59c5226d68 Rename title marketplace to packages (#13625) 2022-12-30 13:29:51 +01:00
dc46b649f7 fixes data-element attribute on media section (#13621)
* fixes data-element attribute on media section

* Revert "fixes data-element attribute on media section"

This reverts commit 2a35c9fbed.

* use property alias on members umb-property

Co-authored-by: Mario Lopez <mario@luminary.com>
2022-12-28 08:50:37 +01:00
Calvin DavisandMichael Latouche 4fbb0805e8 Add margin-right to block card name and subname 2022-12-26 02:55:14 +01:00
Nikolaj 2b72df09bb Merge branch 'release/11.1' into v11/dev 2022-12-21 13:54:29 +01:00
f37c02ea79 V10: Dont disable invited users (#13600)
* Dont allow disable user when invited

* Use data instead of selection

* return succesfully disabled users

* Disable disable button when invited

* Add integration tests

* Remove unused usings

* Update src/Umbraco.Web.BackOffice/Controllers/UsersController.cs

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

* Create DisabledUsersModel

* use data.disabledUsers

* Return OK if no users to be saved

* User disabledUsersModel

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2022-12-21 10:07:11 +01:00
Bjarke Berg a1ef0903c9 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2022-12-20 10:20:44 +01:00
Bjarke Berg 03e00cbed2 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-12-20 10:19:36 +01:00
Bjarke Berg 9c087f584d Fixed build warnings in ManagementApi 2022-12-20 08:53:37 +01:00
Ronald BarendseandBjarke Berg 832e44cb01 Also fix GetBackOfficeUrl in UrlHelperExtensions 2022-12-20 08:31:37 +01:00
Ronald BarendseandBjarke Berg 58da7f754b Rename fixed extension method to GetUmbracoBackOfficeUrl and obsolete old one 2022-12-20 08:31:37 +01:00
Ronald BarendseandBjarke Berg 751c1883ce Fix GetBackOfficeUrl extension method 2022-12-20 08:31:37 +01:00
Bjarke BergandGitHub 1332ba51e8 Merge pull request #13599 from umbraco/v11/bugfix/getbackofficeurl
Add `GetUmbracoBackOfficeUrl` extension methods
2022-12-20 08:30:45 +01:00
Bjarke Berg e375ab4b1b Added new ContentAndWebRootFileProviderFactory and use that for IManifestFileProviderFactory, so manifests can be found in /app_plugins folder too (#13597)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13565
2022-12-20 08:10:47 +01:00
Bjarke BergandGitHub 6430c61ee9 Added new ContentAndWebRootFileProviderFactory and use that for IManifestFileProviderFactory, so manifests can be found in /app_plugins folder too (#13597)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13565
2022-12-20 07:00:07 +01:00
Elitsa MarinovskaandGitHub fef793326f New Backoffice: Health check controller (#13543)
* Adding health check controllers - getAll & getGroupByName

* Adding HealthCheckGroup mapper

* Adding viewModels

* Adding a factory for building a health check group with result view model

* Registering the mapper and factory

* Updating OpenApi.json

* Remove unnecessary checks - we instantiate the target before calling the Map()

* Adding ProducesResponseType for GetAll()

* Fixing usings

* Making checks required for a health check group

* Adding OK() around result to be explicit

* Adding default values to skip and take

* Adding Umbraco.Code comments

* Removing ? from HealthCheckGroupWithResultViewModel return type

* Move the grouping creation to the factory

* Adding Actions[] for each health check + mapping

* Defaulting ValueRequired to false

* Refactoring routes - from health-check to health-check-group

* Move to HealthCheckGroup folder

* Fix OpenApi.json

* Changing class name and making Key of HealthCheckActionViewModel non-nullable

* Fixing namespace

* Migrating ExecuteAction endpoint

* Add execute-action endpoint to OpenApi.json

* Use Task.FromResult() around the action result

* Fixing namespaces and swagger group name

* Fixing naming of the key in the health check action

* Fix tag names in OpenApi.json
2022-12-19 13:50:18 +01:00
Ronald Barendse 532636cdbe Also fix GetBackOfficeUrl in UrlHelperExtensions 2022-12-19 12:04:35 +01:00
Ronald Barendse 900dd22277 Rename fixed extension method to GetUmbracoBackOfficeUrl and obsolete old one 2022-12-19 11:52:48 +01:00
Ronald Barendse b457734f18 Fix GetBackOfficeUrl extension method 2022-12-19 11:31:18 +01:00
Bjarne FyrstenborgandMichael Latouche 05a511a16c Only show rollback button if allowed action 2022-12-18 01:26:04 +01:00
Kenn Jacobsenandnikolajlauridsen d173a99fc8 Support space (and more) in tag groups (#13589) 2022-12-16 14:24:51 +01:00
nikolajlauridsen 6835436ed5 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-12-16 14:24:17 +01:00
Kenn Jacobsenandnikolajlauridsen a5a80fdd41 Multi URL picker improvements for V11 (#13586)
* Use bulk lookup to find URLs for multi URL picker items

* Make sure URLs and anchors are loaded correctly when no culture is supplied
2022-12-16 13:07:40 +01:00
Kenn JacobsenandGitHub aee1d70f64 Multi URL picker improvements for V11 (#13586)
* Use bulk lookup to find URLs for multi URL picker items

* Make sure URLs and anchors are loaded correctly when no culture is supplied
2022-12-16 13:06:27 +01:00
Kenn Jacobsenandnikolajlauridsen a897e3bdd3 Improved support for TinyMCE custom style formats (#13582) 2022-12-16 12:42:50 +01:00
Kenn JacobsenandGitHub 7b0f678c38 Improved support for TinyMCE custom style formats (#13582) 2022-12-16 12:41:19 +01:00
Ronald BarendseandElitsa Marinovska 48f4d8b7d1 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
(cherry picked from commit 544cb30602)
2022-12-16 11:25:00 +01:00
544cb30602 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-12-16 11:17:56 +01:00
Nikolaj adfc38503c Upgrade BPlusTree dependency 2022-12-15 14:06:59 +01:00
Nikolaj e86b90faff Merge branch 'v11/dev' into v12/dev 2022-12-15 14:03:22 +01:00
Nikolaj 0234c5b637 Roll back BPlusTree dependency 2022-12-15 13:56:57 +01:00
Bjarke Berg ace43452e4 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-12-15 10:36:23 +01:00
Bjarke Berg 6f4b60c76c Updated Nuget packages 2022-12-15 10:36:13 +01:00
MoleandGitHub 0b04ae76da New backoffice: Redirect Url Management controller (#13572)
* Add status endpoint

* Refactor GetStatus to use a factory for the viewmodel

* Move controllers to correct namespace

* Add response type to GetStatus

* Create query endpoint

* Create GetAll endpoint

* Add by key

* Add delete by key

* Rename enabled controller

* Add SetEnabled endpoint

* Update OpenApi.json

* Replace query endpoint with a optional filter parameter

* Use enum to enabled and disable url tracking

* Update OpenApi.json

* Add bad request response type to GetAll endpoint
2022-12-15 10:04:44 +01:00
Nikolaj 2bab96fb85 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2022-12-15 09:56:28 +01:00
Nikolaj 1c2b5d34fd Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.controller.js
2022-12-15 09:32:03 +01:00
Bjarke Berg aec88e8418 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2022-12-14 09:11:30 +01:00
Bjarke Berg cec87e400f post merge fix 2022-12-14 09:09:20 +01:00
Bjarke Berg fd974a416c Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Routing/InstallAreaRoutesTests.cs
2022-12-14 08:51:45 +01:00
c4b83972bc Map AdditionalData (#13567)
* Map AdditionalData

Signed-off-by: Zeegaan <nge@umbraco.dk>

* Re-implement private setter

* Remove obsolete MapAll condition

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-12-13 15:04:39 +01:00
Bjarke BergandGitHub 76c99772a0 Merge pull request #13571 from umbraco/v11/feature/loggingsettingsextensions
Change `GetAbsoluteLoggingPath` to extension method
2022-12-13 10:28:27 +01:00
Sebastiaan Janssen d5e1c7398f Disable healthChecks test for now as it has different results on the build server versus local machine 2022-12-13 09:13:36 +01:00
Ronald Barendse a49151f552 Change GetAbsoluteLoggingPath to extension method 2022-12-13 09:11:59 +01:00
Sebastiaan Janssen ca8f84f254 Simplify healthcheck button selector 2022-12-12 18:33:50 +01:00
Sebastiaan Janssen 2e4db50781 Fix wrong expectation in the security health checks 2022-12-12 16:58:56 +01:00
Sebastiaan Janssen b366b26f19 Fix failing integration test (runtime mode was added to system info) 2022-12-12 15:48:36 +01:00
Kenn JacobsenandGitHub e397ac9011 REST-ify dictionary and language controllers (#13531)
* Update signatures to always return ActionResult<> or IActionResult

* Make a few endpoints more RESTish

* Update OpenAPI json
2022-12-12 15:03:36 +01:00
1fd4ed1de7 V12: Named json options (#13537)
* Introduce named JSON options for specific input/output JSON formatting

* Handle empty objects

* Remove obsolete attributes

* Update src/Umbraco.Cms.Api.Management/DependencyInjection/MvcBuilderExtensions.cs

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

* Add constant for Backoffice NamedJsonOptions

Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-12-12 14:15:54 +01:00
Sebastiaan Janssen 5c993ea3c6 Merge branch 'v11/dev' into v11/contrib 2022-12-12 13:59:03 +01:00
TiffanyandMichael Latouche 105670dcc1 Tree Roots are H1 2022-12-10 19:03:55 +01:00
Matthew WiseandMichael Latouche ec56778c9f standarising ActionLetter and ActionName for IAction 2022-12-10 01:59:45 +01:00
Kenn JacobsenandGitHub 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
Bjarne FyrstenborgandMichael Latouche 2d2d8df82e Show published in tracked references 2022-12-09 01:00:07 +01:00
sofietoftandNikolaj 311c11074f Updated docs links to point to new platform (#13426)
* Updated docs links to point to new platform

* Update settingsdashboardintro.html

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-12-08 14:50:04 +01:00
Jacob OvergaardandGitHub 63e4adca92 Tree picker support for selecting containers (#13507)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13463
2022-12-07 15:21:15 +01:00
Bjarke Berg f3396a04fc Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/Controllers/Security/BackOfficeController.cs
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
2022-12-07 11:42:39 +01:00
Bjarke Berg b491b8c7a3 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
#	src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
2022-12-07 10:57:32 +01:00
Bjarke BergandGitHub 388daf88c2 Merge pull request #13533 from umbraco/v11/feature/merge_v10.4_into_v11.1
V11/feature/merge v10.4 into v11.1
2022-12-07 10:55:59 +01:00
Bjarke BergandGitHub 519b3295ee Merge pull request #13532 from umbraco/revert-13528-v11/feature/merge_v10.4_into_v11.1
Revert "Merge v10.4 into v11.1"
2022-12-07 10:55:32 +01:00
Bjarke BergandGitHub 685193df77 Revert "Merge v10.4 into v11.1 (#13528)"
This reverts commit 443e8a8272.
2022-12-07 10:53:09 +01:00
+17 443e8a8272 Merge v10.4 into v11.1 (#13528)
* Bump version

* Add PrivateAssets="all" to mangement api project reference (#13249)

* Bump version

* Use the actual save function for saving the copy (#13066)

* Use the actual save function for saving the copy

* PR feedback

(cherry picked from commit 3802097a32)

* Unbreak breaking change in #13066 (#13288)

(cherry picked from commit e4741b0c64)

* Bump version to 10.3.2

* Parse lockId as invariant (#13284)

Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit 272e922020)

* Allow for configuration of additional languages to install and ensure one is set as default. (#13290)

* Allow for configuration of additional languages to install and ensure one is set as default.

* Amended install default language method to handle invalid ISO codes and ensure the first specified language is always made the default.

* Removed unnecessary using.

* Apply suggestions from code review

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

* Clean up.

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

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

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Updated Smidge (#13331)

* Fix casing in fileSystemBasePath (#13306)

* Add guard statement (#13340)

* Move block grid single area rendering to its own dedicated view (#13359)

* Block Grid Editor Improvements (#13282)

* remove console log

* Updated references for Forms and Deploy in JSON schema project. (#13411)

* Enable single block mode (#13216)

* Enable single block mode

* Fixes tests, and adds test for single block mode output type

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

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

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

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

* Fix breaking change

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

* Block Grid Editor: Removal of the forced placement feature (#13400)

* removal of the forceLeft/forceRight code

* removal of forced placement in css

* bring back removed code

* V10: AllowedUploadFiles appsetting not working (#13408)

* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

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

* Feature: Media Picker drag and drop upload directly on property editor (#13393)

* prototype drag and drop upload

* Add upload image endpoint

* Add MediaPickerThreeController.cs

* Revert "Add upload image endpoint"

This reverts commit 4bb5865480.

* Update IIOHelper dependency

* show preview when uploading a new media item

* open uploaded media in media entry editor

* map data from uploaded media entry to support cropper

* add crop data to uploaded media item

* remove media library buttons for media entries not created in the media library

* Implement temp images save & add to media picker 3

* Implement ITemporaryImageService

* Remove save logic from MediaPicker3PropertyEditor

* Dont use a TempImageDto

* Add GetByAlias endpoint

* Add additonal xml doc

* Refactor to take array of aliases

* Add FromQuery attribute

* Formatting

* add resource to get media types by alias

* validate file size and file type based on server variables

* Update OpenApi.json
Add media picker three to BackOfficeServerVariables

* rename endpoint to upload media

* Use baseurl Method

* Dont upload in rte folder

* pass params correctly to end point

* queue files before uploading

* handle invalid files

* progress bar design adjustments

* only create data url for images

* disable edit and name buttons when uploading

* fix missing error messages for invalid files

* add temp location to media entry

* Add startNode to TemporaryImageService.cs

* Refactor get by alias

* Rename to GetAllFiltered

* use getAllFiltered method

* remove autoselect option

* fix missing alias when selecting media type

* fix file filter

* don't overwrite invalid entries from dropping new files

* add disallowed files to filter

* remove console.log

* move media uploader logic to reusable function

* fix missing tmp location

* attach media type alias to the mediaEntry

* support readonly mode

* show discard changes when files has been dropped

* add disabled prop to button group

* emit events when upload queue starts and ends

* pass node to media picker property editor

* add service to keep track of all uploads in progress

* add upload in progress to uploadTracker when the queue starts and ends

* disabled buttons when any upload is in progress

* return a subscription to align with eventsService

* Fix up cases where StartNodeId was null

* scope css

* Show filename in dialog for selecting media type

* reuse translation from media library dropzone

* Don't check for only images

* Remove composer

* Add mediaTypeAlias to TemporaryImageService

* Rename ITemporaryImageService to ITemporaryMediaService

* prefix client side only props with $ so we don't send unnecessary data to the server

* use prefixed dataURL in media entry editor

* render icon for non images

* fix auto select media type

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

* V10: merge v8 blobstorage file deletion fix (#13415)

* Implement fix from v8 https://github.com/umbraco/Umbraco-CMS/pull/11998

* Clean-up

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

* Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client

Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update block grid panel name (#13325)

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client

Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client

Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* updated package-lock

* Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Block Grid Editor sorting directive (#13391)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Block Grid Editor adjust while sorting (#13442)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* change let to const

* Revert "change let to const"

This reverts commit fe19f8c5ed.

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Block Grid Editor - make prevalue overlay medium sized (#13443)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* block grid editor visual adjustments (#13446)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

* more white borders on UI

* move Catalogue appearance to Advanced

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Display media trashed state on custom view for image demo block (#13448)

* Block Grid Editor translations and Area size keyboard navigation (#13450)

* use custom prop for calculated width (#13451)

* Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client

Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Cherry pick #13373 to v10/dev

* remove the hidding of catelouge appearance as its not located under advance (#13456)

* Fix preview issue for new (empty) variants (#13455)

* Fix save and preview for new (unsaved) variants

* Rework & simplify

* Rollback improvements (#13452)

* Rollback improvements - hide draft version, allow rolling back to last published version

* UX improvements to rollback, revert some overly complex logic in favor of better UX

* Ensure title update when changing rollback version

* Clean up

* Fix rollback playwright text

* Cherry pick #13404 to v10

* Delete references using custom relation types (#13389)

undefined

* V11: Fix ordering by published in list of content (#13474)

* Update sort statement to use published field for invariant content

* Order by published if invariant

* Add support for tags in block editors and nested content (#13412)

* feat: add tags extension points and remove hardcoded tags handling

* feat: allow tags editor in nested content and block editors

* Update src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs

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

* Update src/Umbraco.Web.BackOffice/Controllers/ContentControllerBase.cs

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

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

* Ensure that all automatic relation types are updated (#13470)

* Make sure contexbar fits within the available space (#13467)

* Make sure contexbar fits within the available space

* Ensuring context bar moves above, no matter size of it.

* Fixing apperance of connection-fixers

* do not set layout gaps (#13496)

* V10/feature/fixing flaky acceptance test (#13473)

* Updated Forms dependency for JSON schema to the latest version. (#13505)

* Accessibility - Fix Packages - Modal - Empty buttons (#13114)

* Changing the way we create the temp file for SQLite file (#13439)

* Fix concurrency issue in UmbracoMapper (#13524)

* Add logging to UmbracoMapper

* Add NullLogger to tests

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

* Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)

* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* V11/feature/flaky test work (#13513) (#13527)

* Removed all the DeleteAllContent since I delete the doctypes in the before and after each functions which also deletes the content.

* fixed the test so it selects the specific button!

* I was dumb and forgot to remove the out commented code

* Added additional timeout so the pipeline has more time

* Removed language in settings because it was a duplicate of languages / languages

* Fixed the tests so they now check if each individual language that was created actually exists instead of checking for how many languages there are which could be flaky if another test touching the languages failed

* Bumped version

* Added a better locator for the buttons and increased timeouts

Signed-off-by: Zeegaan <nge@umbraco.dk>

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)

* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

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

* Rollback project imports

* Remove duplicated lines in translations

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Søren Kottal <sk@ecreo.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Watt <bkclerke@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: niekvanderreest <niekvanderreest@hotmail.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Rasmus John Pedersen <mail@rjp.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Jan Skovgaard <1932158+BatJan@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Jonny Muir <jonnymoo@hotmail.com>
Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Justin Neville <67802060+justin-nevitech@users.noreply.github.com>
2022-12-07 08:51:00 +01:00
Bjarke Berg 2b6205a88c Remove duplicated lines in translations 2022-12-07 07:22:59 +01:00
MoleandGitHub 73515560b7 New backoffice: Token storage (#13519)
* Enable reference tokens

* Enable token validation

* Add Data protection
2022-12-07 06:48:53 +01:00
ustadstarandMichael Latouche f7e73fbff5 Fix check for existing userStatesFilter 2022-12-07 00:38:30 +01:00
Bjarke Berg e83e2dedb4 Rollback project imports 2022-12-06 13:32:06 +01:00
Bjarke Berg 962c1a1a5b Merge branch 'v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Branding/logo.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/templates.spec.ts
2022-12-06 12:53:37 +01:00
Justin NevilleandBjarke Berg e2b8cc7060 Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)
* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 12:40:47 +01:00
d08f21d638 Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)
* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 12:39:43 +01:00
Andreas ZerbstandGitHub 2da4b725b1 V11/feature/flaky test work (#13513)
* Removed all the DeleteAllContent since I delete the doctypes in the before and after each functions which also deletes the content.

* fixed the test so it selects the specific button!

* I was dumb and forgot to remove the out commented code

* Added additional timeout so the pipeline has more time

* Removed language in settings because it was a duplicate of languages / languages

* Fixed the tests so they now check if each individual language that was created actually exists instead of checking for how many languages there are which could be flaky if another test touching the languages failed

* Bumped version

* Added a better locator for the buttons and increased timeouts
2022-12-06 10:34:03 +01:00
4e823982c7 Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)
* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 08:19:44 +01:00
5e03236e70 Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)
* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 08:17:58 +01:00
Kenn JacobsenandGitHub bc94b2e16c Rename management API from Umbraco.Cms.ManagementApi to Umbraco.Cms.Api.Management (#13512) 2022-12-02 11:33:02 +01:00
Jason ElkinandGitHub 96918a9f1f Improve system information/telemetry (#13159)
* Differentiate between IIS and IIS Express in system information telemetry

* Add runtime mode to system information telemetry
2022-12-02 09:03:23 +01:00
Corné HoskamandGitHub 9099bf44ac Added various Block Grid translations (NL) - Pt 2. (#13508)
* Added various translations

* Added another translation

* Change request

* Added various other area translations

* Resolve conflict

* Forgot one!

* Update nl.xml
2022-12-01 14:26:58 +01:00
0b95d5e1e5 Forward merge v11/dev to v12/dev (#13509)
* update marketplace url to its final, live url

* Added various Block Grid translations (EN & NL) (#13488)

* Added various translations

* Added another translation

* Change request

* Revert breaking changes adding IContextCache to deploy connectors (#13489)

* Remove breaking changes in Deploy connector interfaces

* Add extension methods for calling the new interface methods in a backwards-compatible way

* Create and pack empty file to add TFM dependency (#13475)

* Change login image to new SVG. (#13493)

* Only add global usings when ImplicitUsings is enabled (#13491)

* bump to rc6

* V11: Allow changing logging directory from configuration (#13485)

* Allow changing logging directory from configuration

* Clean up

* Missing return statement

* Apply suggestions from code review

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

* Update src/Umbraco.Core/Constants-SystemDirectories.cs

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

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

* Move login.svg file

* Make sure contexbar fits within the available space (#13467)

* Make sure contexbar fits within the available space

* Ensuring context bar moves above, no matter size of it.

* Fixing apperance of connection-fixers

* Info panes not loading prerequisites (#13486)

* load relations immediately on init and remove call to non-existing function `appTabChange` on destroy

* load relations immediately on init and remove now not-used eventsService

* do not set layout gaps (#13496)

* Nuget updates (#13478)

* Updated nuget packages

* Remove npoco update

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

* Nuget updates (#13478)

* Updated nuget packages

* Remove npoco update

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

* Bump version to final

* V11/cherry pick flaky test (#13506)

* V10/feature/fixing flaky acceptance test (#13473)

* Bumped version

* Handle external authentication providers (#13487)

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Corné Hoskam <choskam@hotmail.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2022-12-01 12:50:28 +01:00
Kenn JacobsenandGitHub 2143d8c3fe Handle external authentication providers (#13487) 2022-12-01 10:38:24 +01:00
Andreas ZerbstandGitHub 2ce205953c V11/cherry pick flaky test (#13506)
* V10/feature/fixing flaky acceptance test (#13473)

* Bumped version
2022-12-01 08:55:33 +01:00
Nikolaj 934bb8be7a Merge tag 'release-11.0.0' into v11/dev
# Conflicts:
#	version.json
2022-12-01 08:29:47 +01:00
Justin NevilleandSebastiaan Janssen 8bf6a9246f Added aria label to time period on log dashboard 2022-11-30 16:20:31 +01:00
Justin NevilleandSebastiaan Janssen 88ff05a836 Allow empty valuesets to be indexed so the back-offce does not hang when rebuilding empty indexes 2022-11-30 16:19:17 +01:00
Markus JohanssonandSebastiaan Janssen d2ab80534a LogViewe: Adding support for destructed properties 2022-11-30 16:17:27 +01:00
Matthew CareandSebastiaan Janssen 67c60d8a19 Update to latest framework version
Update reference to old framework version in web site projects
2022-11-30 16:16:08 +01:00
Erik-Jan WestendorpandSebastiaan Janssen 4f129baebd Use constants instead of hardcoded strings 2022-11-30 16:13:47 +01:00
Lotte PitcherandGitHub da9eae1252 Remove reference to installing a local package via backoffice (#13330) 2022-11-30 16:08:54 +01:00
Lotte PitcherandGitHub af4333b8e4 Fixing some comments errors to reduce CodeQL warnings (#13327) 2022-11-30 16:01:36 +01:00
CyberReiterandSebastiaan Janssen 02dcf98e3d make use of spans in UriExtensions to make them faster 2022-11-30 15:56:47 +01:00
Vitor RodriguesandSebastiaan Janssen 7ad1e638e6 Re-use any existing ReloadableLogger
It's possible that consumers have already set up a bootstrap logger themselves before Umbraco had a chance too, if that's the case we just reload it.
2022-11-30 15:51:36 +01:00
Vitor RodriguesandSebastiaan Janssen d4c921264d Added missing content-type header to BootFailedMiddleware response
When Umbraco is configured with X-Content-Type-Options nosniff as is recommended (there's even a health check for it), any boot failure would simply show the html source code in the browser instead of properly rendering the html, as the content-type wasn't being set.
2022-11-30 15:48:46 +01:00
Marc GoodsonandGitHub 2461b7d805 Adjust the wording of some of the helper text around the new Block Grid editor (#13484) 2022-11-30 15:36:23 +01:00
Kristian Tolleshaug MørchandSebastiaan Janssen 69c725b3ec Ensure format processor is before quality processor. 2022-11-30 13:50:06 +01:00
Vlael LayugandMichael Latouche f7b42a50cc add default culture when there's only 1 language configured 2022-11-30 08:50:30 +01:00
nikolajlauridsen d713b383c9 Bump version to final 2022-11-29 16:40:47 +01:00
Bjarke Bergandnikolajlauridsen 18fd0c9ed7 Nuget updates (#13478)
* Updated nuget packages

* Remove npoco update

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-11-29 14:17:07 +01:00
6c13c87f15 Nuget updates (#13478)
* Updated nuget packages

* Remove npoco update

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-11-29 14:16:49 +01:00
Niels LyngsøandGitHub acbaaecbcc do not set layout gaps (#13496) 2022-11-29 13:35:07 +01:00
Callum WhyteandGitHub 5ef43cb4f0 Rename StaticServiceProvider namespace Umbraco.Cms.Core.DependencyInjection (#13239) 2022-11-29 12:22:57 +01:00
Bjarne FyrstenborgandGitHub 30a7bca0ef UserController should use getLocalDate from dateHelper (#13469)
* Use `getLocalDate` from dateHelper

* Remove duplicate import

* Keep function getLocalDate but use dateHelper

* Mark function as deprecated
2022-11-29 11:56:12 +01:00
Bjarke Berg abd490f460 Merge remote-tracking branch 'origin/release/11.0' into release/11.0 2022-11-29 10:36:13 +01:00
MoleandGitHub 1875568e0b Merge pull request #13494 from umbraco/v12/fix/merge-with-v11-dev
Merge v11/dev to v12/dev
2022-11-29 10:31:12 +01:00
Jacob OvergaardandGitHub b5a3dcb81e Info panes not loading prerequisites (#13486)
* load relations immediately on init and remove call to non-existing function `appTabChange` on destroy

* load relations immediately on init and remove now not-used eventsService
2022-11-29 10:07:52 +01:00
Niels Lyngsøandnikolajlauridsen b9990f23db Make sure contexbar fits within the available space (#13467)
* Make sure contexbar fits within the available space

* Ensuring context bar moves above, no matter size of it.

* Fixing apperance of connection-fixers
2022-11-29 09:59:49 +01:00
Bjarke Berg 9bed0cde9a Move login.svg file 2022-11-29 09:30:11 +01:00
Bjarke Berg a76d68bd37 Merge remote-tracking branch 'origin/release/11.0' into v11/dev
# Conflicts:
#	version.json
2022-11-29 08:19:27 +01:00
kjac 7329113885 Fix merge 2022-11-29 07:29:23 +01:00
bfe9579a0c V11: Allow changing logging directory from configuration (#13485)
* Allow changing logging directory from configuration

* Clean up

* Missing return statement

* Apply suggestions from code review

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

* Update src/Umbraco.Core/Constants-SystemDirectories.cs

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

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-29 07:27:59 +01:00
kjac d8c62080e6 Merge branch 'v11/dev' into v12/fix/merge-with-v11-dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2022-11-29 07:26:14 +01:00
Roy BerrisandGitHub 1ed24e78c8 Notification documentation (#13207) 2022-11-28 23:26:59 +01:00
CyberReiterandSebastiaan Janssen f99378c5d3 Use ToArray instead of ToList 2022-11-28 23:18:54 +01:00
Erik-Jan WestendorpandGitHub 65dd52ad05 Add AddManifestFilter extension method to UmbracoBuilder.CollectionBuilders.cs (#13161) 2022-11-28 23:14:24 +01:00
Lars-Erik AabechandSebastiaan Janssen 4d23e8a6bd Ensure culture is always set in LocalizeText 2022-11-28 23:11:28 +01:00
bkclerkeandSebastiaan Janssen 1009238f32 add aria-labelledby attribute to tags input 2022-11-28 23:04:13 +01:00
Jan SkovgaardandGitHub 97fa4d76dc Accessibility: Fix - Missing table description: A data table is present with no description associated to it (#13117) 2022-11-28 22:54:54 +01:00
Asbjørn Riis-KnudsenandGitHub 50d361c4e6 Skip populating the PropertyTypeGroup alias column if it is already populated (#13109) 2022-11-28 22:44:59 +01:00
patrickdemooij9andGitHub 475cea40a1 Use span in StripFileExtension to speed up and use less memory (#13101) 2022-11-28 22:12:30 +01:00
Anders BjernerandSebastiaan Janssen 33668a5d95 Added "loading" parameter to "umbEditorHeader" directive 2022-11-28 21:46:49 +01:00
Bjarne FyrstenborgandGitHub a7368542d8 Add input id to args in toggleValue event (#13108) 2022-11-28 21:33:59 +01:00
Karl ButlerandGitHub 2d560e9766 Accessibility Fixes for Users and Packages pages (#13087) 2022-11-28 21:17:04 +01:00
JesseandGitHub e87701c482 added fix for ncNodeName filter in list view (#13086) 2022-11-28 20:38:12 +01:00
Bjarke Berg 65f66c2560 Merge remote-tracking branch 'origin/release/11.0' into release/11.0 2022-11-28 19:58:10 +01:00
Bjarke Berg 082864f529 bump to rc6 2022-11-28 19:58:02 +01:00
Ronald BarendseandGitHub 8c483e8d3b Only add global usings when ImplicitUsings is enabled (#13491) 2022-11-28 19:57:36 +01:00
Niels LyngsøandBjarke Berg ed67cd887f Change login image to new SVG. (#13493) 2022-11-28 19:56:04 +01:00
Niels LyngsøandGitHub 188fa237cd Change login image to new SVG. (#13493) 2022-11-28 19:55:15 +01:00
Ronald BarendseandGitHub a3361606e0 Create and pack empty file to add TFM dependency (#13475) 2022-11-28 19:48:29 +01:00
Ronald BarendseandGitHub e45ed3d7f1 Revert breaking changes adding IContextCache to deploy connectors (#13489)
* Remove breaking changes in Deploy connector interfaces

* Add extension methods for calling the new interface methods in a backwards-compatible way
2022-11-28 19:16:19 +01:00
bakersbakebreadandSebastiaan Janssen 3377a7c96b add setDirty() logic to remove actions on mediaPicker3 property editor 2022-11-28 15:50:41 +01:00
Corné HoskamandNikolaj 493e93cc89 Added various Block Grid translations (EN & NL) (#13488)
* Added various translations

* Added another translation

* Change request
2022-11-28 14:58:10 +01:00
Corné HoskamandGitHub a4e67bf444 Added various Block Grid translations (EN & NL) (#13488)
* Added various translations

* Added another translation

* Change request
2022-11-28 14:54:03 +01:00
Nikolaj 7342fde17f Revert "Add status endpoint"
This reverts commit b594ad8ccf.
2022-11-28 14:42:22 +01:00
Nikolaj b594ad8ccf Add status endpoint 2022-11-28 14:41:15 +01:00
Sebastiaan Janssen 8c2329f2b2 Merge branch 'v11/dev' into v11/contrib
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-configuration-area-entry.html
2022-11-28 13:50:44 +01:00
Elitsa MarinovskaandGitHub af6b8fc5cb Enabling an Umbraco admin user to disable 2FA for a member (#13369)
* Fix Invalid authentication code bug

* Add translation keys for 2fa

* Display toggle for 2FA on member

* Add TwoFactorEnabled prop when saving member

* Handle disabling of 2FA

* Fix tests

* Changing obsolete msg
2022-11-28 13:42:38 +01:00
MoleandGitHub 06924ed0f4 Ensure that all automatic relation types are updated (#13470) 2022-11-28 12:49:14 +01:00
Jacob Overgaard 1a0983f0c7 update marketplace url to its final, live url 2022-11-28 11:15:48 +01:00
MoleandGitHub 37b33641c3 V11: Fix ordering by published in list of content (#13474)
* Update sort statement to use published field for invariant content

* Order by published if invariant
2022-11-25 11:37:46 +01:00
Sean ThorneandMichael Latouche 88ce31197e add health-check basic tests 2022-11-25 09:40:23 +01:00
Owain JonesandMichael Latouche 079b2b7452 Updated welsh translations file 2022-11-25 02:16:37 +01:00
Paul SealandGitHub d86d29807d created an add current domain button to the cultures and hostnames sc… (#13436)
* created an add current domain button to the cultures and hostnames screen

* removed unwanted space
2022-11-25 02:07:03 +01:00
Bjarne FyrstenborgandGitHub a500ef9497 Delete references using custom relation types (#13389)
undefined
2022-11-23 15:43:51 +01:00
MoleandGitHub aeb52ed94e Merge pull request #13404 from sean-p-m/temp-13402
13402 - Update PreviewAuthenticationMiddleware to support chunked aut…
2022-11-23 11:36:15 +01:00
Jacob OvergaardandGitHub 02275ed772 Add sensible eslint rules with newest eslint version (#13457) 2022-11-23 11:26:20 +01:00
MoleandGitHub 525a204c40 Merge pull request #13459 from umbraco/v11/merge_release_into_dev
Merge release into dev
2022-11-22 16:08:59 +01:00
Warren BuckleyandGitHub b392ac78b3 Merge pull request #13458 from umbraco/v11/codespaces/updated-sqlite-feature-location
Codespaces: Updated SQLite DevContainer feature after rename
2022-11-22 14:59:03 +00:00
f83c946c96 Updated docs links to point to new platform (#13426)
* Updated docs links to point to new platform

* Update settingsdashboardintro.html

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-11-22 15:37:15 +01:00
nikolajlauridsen d188ff9730 Merge branch 'release/11.0' into v11/merge_release_into_dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
#	src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbraco-blockgridlayout-flexbox.css
#	version.json
2022-11-22 15:30:45 +01:00
Warren Buckley 03253afabe The repo & package for the SQLite DevContainer feature has moved after I renamed the repo 2022-11-22 14:11:24 +00:00
Kenn JacobsenandGitHub cbd5d45bbf Split search/index API into two separate APIs (#13447)
* Split searcher and indexer API into two separate ones

* Fixed bad merge + fixed namespaces

* Update OpenAPI json scheme
2022-11-22 13:43:50 +01:00
Bjarne Fyrstenborgandnikolajlauridsen dc1b10f324 Adjust sorting of block grid editor groups to y-axis only (#13225)
fixes https://github.com/umbraco/Umbraco-CMS/issues/13180
2022-11-22 12:53:52 +01:00
Ronald BarendseandGitHub 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
Bjarne FyrstenborgandGitHub d4c5f5017f Adjust sorting of block grid editor groups to y-axis only (#13225)
fixes https://github.com/umbraco/Umbraco-CMS/issues/13180
2022-11-22 10:57:31 +01:00
Niels Lyngsøandnikolajlauridsen 85842bde9f remove the hidding of catelouge appearance as its not located under advance (#13456) 2022-11-22 10:55:14 +01:00
nikolajlauridsen 22caf2319d Bump version 2022-11-22 09:51:34 +01:00
niekvanderreestandnikolajlauridsen 82cd8330ea Cherry pick #13373 to v10/dev 2022-11-22 09:48:15 +01:00
dependabot[bot]andnikolajlauridsen 36a505ee78 Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-22 09:48:03 +01:00
Niels Lyngsøandnikolajlauridsen bde2f7c0c3 use custom prop for calculated width (#13451) 2022-11-22 09:44:09 +01:00
Niels Lyngsøandnikolajlauridsen 0def36ac31 Block Grid Editor translations and Area size keyboard navigation (#13450) 2022-11-22 09:44:01 +01:00
Niels Lyngsøandnikolajlauridsen a0f348862f Display media trashed state on custom view for image demo block (#13448) 2022-11-22 09:43:45 +01:00
3b9fc38078 block grid editor visual adjustments (#13446)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

* more white borders on UI

* move Catalogue appearance to Advanced

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:43:21 +01:00
195cf4f9ec Block Grid Editor - make prevalue overlay medium sized (#13443)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:42:53 +01:00
f2798a6790 Block Grid Editor adjust while sorting (#13442)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* change let to const

* Revert "change let to const"

This reverts commit fe19f8c5ed.

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:29:54 +01:00
72bdebf419 v11: Umbraco Marketplace replaces packages repo (#13371)
* add lang keys for marketplace

* remove old 'repo' page and deprecate related services

* add new view for Umbraco Marketplace

* optimise margin/padding for other tabs

* mark Our Repository constants as obsolete

* improve css path to iframe slightly with more aliases and classnames

* remove style qs

* update URL of Marketplace

* add ng-controller with utitlities for future PostMessage API

* rename marketplace loaded function

* remove iframe postmessage logic for time being

* add handling of dynamic querystring params

* assume url does not change

* Added support for additional parameters for marketplace

* Update src/JsonSchema/AppSettings.cs

Fix styling issue

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

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

Fix styling issue

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

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

Make comment more descriptive

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

* Update src/Umbraco.Core/Constants-Marketplace.cs

Fix styling issue

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

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-22 09:28:15 +01:00
1196a4d07b Block Grid Editor sorting directive (#13391)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:27:13 +01:00
Anders Bjernerandnikolajlauridsen 65479706a9 NullOrWhiteSpaceAsNull should be nullable 2022-11-22 09:26:42 +01:00
niekvanderreestandnikolajlauridsen b3555eb374 Cherry pick #13373 to v10/dev 2022-11-22 09:24:06 +01:00
dependabot[bot]andJacob Overgaard 9791c4964f Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-22 09:11:06 +01:00
dependabot[bot]andJacob Overgaard 0f4b2300ab Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-22 09:10:08 +01:00
Warren BuckleyandGitHub a2e61b7899 Merge pull request #13453 from umbraco/v11/codespace-SQLite-as-container-feature
Codespaces: Adds SQLite to DevContainer via Features
2022-11-22 07:59:43 +00:00
Warren Buckley 16a1cda67c Uses the SQLite DevContainer Feature I wrote as GitHub won't write one 2022-11-21 22:42:41 +00:00
Kenn JacobsenandGitHub 48733e6132 Support explicit operation IDs (#13449) 2022-11-21 19:51:42 +01:00
Jan SkovgaardandGitHub 2288d98481 Block Grid Editor: Replace "TODO" text in titles (#13433) 2022-11-21 16:52:51 +01:00
4e98df799f v11: Umbraco Marketplace replaces packages repo (#13371)
* add lang keys for marketplace

* remove old 'repo' page and deprecate related services

* add new view for Umbraco Marketplace

* optimise margin/padding for other tabs

* mark Our Repository constants as obsolete

* improve css path to iframe slightly with more aliases and classnames

* remove style qs

* update URL of Marketplace

* add ng-controller with utitlities for future PostMessage API

* rename marketplace loaded function

* remove iframe postmessage logic for time being

* add handling of dynamic querystring params

* assume url does not change

* Added support for additional parameters for marketplace

* Update src/JsonSchema/AppSettings.cs

Fix styling issue

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

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

Fix styling issue

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

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

Make comment more descriptive

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

* Update src/Umbraco.Core/Constants-Marketplace.cs

Fix styling issue

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

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-18 15:06:24 +01:00
d089825537 Feature: Media Picker drag and drop upload directly on property editor (#13393)
* prototype drag and drop upload

* Add upload image endpoint

* Add MediaPickerThreeController.cs

* Revert "Add upload image endpoint"

This reverts commit 4bb5865480.

* Update IIOHelper dependency

* show preview when uploading a new media item

* open uploaded media in media entry editor

* map data from uploaded media entry to support cropper

* add crop data to uploaded media item

* remove media library buttons for media entries not created in the media library

* Implement temp images save & add to media picker 3

* Implement ITemporaryImageService

* Remove save logic from MediaPicker3PropertyEditor

* Dont use a TempImageDto

* Add GetByAlias endpoint

* Add additonal xml doc

* Refactor to take array of aliases

* Add FromQuery attribute

* Formatting

* add resource to get media types by alias

* validate file size and file type based on server variables

* Update OpenApi.json
Add media picker three to BackOfficeServerVariables

* rename endpoint to upload media

* Use baseurl Method

* Dont upload in rte folder

* pass params correctly to end point

* queue files before uploading

* handle invalid files

* progress bar design adjustments

* only create data url for images

* disable edit and name buttons when uploading

* fix missing error messages for invalid files

* add temp location to media entry

* Add startNode to TemporaryImageService.cs

* Refactor get by alias

* Rename to GetAllFiltered

* use getAllFiltered method

* remove autoselect option

* fix missing alias when selecting media type

* fix file filter

* don't overwrite invalid entries from dropping new files

* add disallowed files to filter

* remove console.log

* move media uploader logic to reusable function

* fix missing tmp location

* attach media type alias to the mediaEntry

* support readonly mode

* show discard changes when files has been dropped

* add disabled prop to button group

* emit events when upload queue starts and ends

* pass node to media picker property editor

* add service to keep track of all uploads in progress

* add upload in progress to uploadTracker when the queue starts and ends

* disabled buttons when any upload is in progress

* return a subscription to align with eventsService

* Fix up cases where StartNodeId was null

* scope css

* Show filename in dialog for selecting media type

* reuse translation from media library dropzone

* Don't check for only images

* Remove composer

* Add mediaTypeAlias to TemporaryImageService

* Rename ITemporaryImageService to ITemporaryMediaService

* prefix client side only props with $ so we don't send unnecessary data to the server

* use prefixed dataURL in media entry editor

* render icon for non images

* fix auto select media type

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-18 11:47:42 +01:00
Nikolaj GeisleGitHubZeegaanMoleRonald Barendsedependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Blake WattJacob Overgaard
fb48ecb57f V11: merge dev to contrib (#13438)
* V11: add test flakyness reporting (#13386)

* update json-models-builders

* Add reporting to all before each loops

* Add commitId to env for pipelines

* Test reports correctly

* Bumb testhelper version

* Update playwright-testhelpers version

* Bumb playwright test-helper version

* Bumb playwright-testhelpers version

* Add AgentOs to yaml env

* Bumb playwright-testhelper version

* Try different AgentOS

* Revert "Try different AgentOS"

This reverts commit fc90620aef.

* Revert logo test

* Add missing semicolons

* Update package-lock.json

* Add reports to Blocklist tests

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

* V10: AllowedUploadFiles appsetting not working (#13408)

* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

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

* V11: Add  compatibility suppressions (#13425)

* Add suprressions

* Revert "Add suprressions"

This reverts commit 1c924ee967.

* Update CompatibilitySuppressions.xml

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

* Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client

Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update block grid panel name (#13325)

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client

Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client

Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Management API: SearchController improvements (#13420)

* remove typo of double PagedViewModel in response

* add providerProperties with custom formatter

* use a more descriptive variable name

* use a more descriptive variable name for property types

* generate new schema

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

* Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Watt <bkclerke@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-18 09:00:43 +01:00
dependabot[bot]andNikolaj 695b5bd57a Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:22:14 +01:00
dependabot[bot]andNikolaj f7a314cd6b Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:21:14 +01:00
dependabot[bot]andNikolaj 44d1c2d722 Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:21:09 +01:00
dependabot[bot]andNikolaj 5e40b3f0d6 Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:21:03 +01:00
dependabot[bot]andJacob Overgaard 7281c6ba26 Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:20:35 +01:00
dependabot[bot]andJacob Overgaard 98da07cfb4 Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:20:08 +01:00
267656d793 Management API: SearchController improvements (#13420)
* remove typo of double PagedViewModel in response

* add providerProperties with custom formatter

* use a more descriptive variable name

* use a more descriptive variable name for property types

* generate new schema

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 14:46:42 +01:00
dependabot[bot]andJacob Overgaard a4098ce0b1 Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:18:38 +01:00
dependabot[bot]andJacob Overgaard 8048a11944 Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:18:30 +01:00
dependabot[bot]andJacob Overgaard ba8d2e87d5 Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:18:27 +01:00
dependabot[bot]andJacob Overgaard d1f10f486d Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:16:53 +01:00
dependabot[bot]andJacob Overgaard 55b7897d86 Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:16:07 +01:00
dependabot[bot]andJacob Overgaard cf6042ce37 Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:15:39 +01:00
Blake WattandJacob Overgaard 3b08f4a964 update block grid panel name (#13325)
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-17 14:11:25 +01:00
7239a78ad1 update block grid panel name (#13325)
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-17 14:10:37 +01:00
dependabot[bot]andJacob Overgaard 9ec7b1ce49 Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 13:59:38 +01:00
dependabot[bot]andJacob Overgaard 0415ed8267 Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 13:59:11 +01:00
MoleandRonald Barendse f18209f616 V11: Add compatibility suppressions (#13425)
* Add suprressions

* Revert "Add suprressions"

This reverts commit 1c924ee967.

* Update CompatibilitySuppressions.xml

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-17 13:56:09 +01:00
0042343e0b V11: Add compatibility suppressions (#13425)
* Add suprressions

* Revert "Add suprressions"

This reverts commit 1c924ee967.

* Update CompatibilitySuppressions.xml

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-17 13:54:14 +01:00
Warren BuckleyandGitHub 76078b29dc Merge pull request #13428 from umbraco/v11/codespaces-updated-readme
Codespaces: Updated readme
2022-11-17 10:38:58 +00:00
Warren Buckley 74b7ee142c Updated readme 2022-11-17 10:35:18 +00:00
Anders BjernerandMichael Latouche 5ffc2b1ccb NullOrWhiteSpaceAsNull should be nullable 2022-11-17 11:13:49 +01:00
5ce7cd39b9 V10: AllowedUploadFiles appsetting not working (#13408)
* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 09:55:54 +01:00
d545c1fa1e V10: AllowedUploadFiles appsetting not working (#13408)
* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 09:55:27 +01:00
22bcc9b054 V11: add test flakyness reporting (#13386)
* update json-models-builders

* Add reporting to all before each loops

* Add commitId to env for pipelines

* Test reports correctly

* Bumb testhelper version

* Update playwright-testhelpers version

* Bumb playwright test-helper version

* Bumb playwright-testhelpers version

* Add AgentOs to yaml env

* Bumb playwright-testhelper version

* Try different AgentOS

* Revert "Try different AgentOS"

This reverts commit fc90620aef.

* Revert logo test

* Add missing semicolons

* Update package-lock.json

* Add reports to Blocklist tests

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 09:27:47 +01:00
Sebastiaan Janssen 60765b976c Merge branch 'v11/dev' into v11/contrib
# Conflicts:
#	.gitignore
#	src/Umbraco.Cms.ManagementApi/ManagementApiComposer.cs
#	src/Umbraco.Cms.ManagementApi/OpenApi.json
2022-11-17 09:26:44 +01:00
Niels LyngsøandNikolaj dc2358f4f0 Block Grid Editor: Removal of the forced placement feature (#13400)
* removal of the forceLeft/forceRight code

* removal of forced placement in css

* bring back removed code
2022-11-17 08:42:18 +01:00
Niels LyngsøandNikolaj 9b13a260e9 Block Grid Editor: Removal of the forced placement feature (#13400)
* removal of the forceLeft/forceRight code

* removal of forced placement in css

* bring back removed code
2022-11-17 08:41:21 +01:00
Jacob OvergaardandNikolaj 8a04f9fd99 v11: Fix for TinyMCE dropdowns (#13417)
* Set higher z-index for TinyMCE overlays as they were set below that of our property editor overlays

Fixes #13414

* replace !important with more specificity
2022-11-17 08:39:47 +01:00
Warren BuckleyandGitHub 137b4eba68 Merge pull request #13421 from umbraco/v11/codespace-fwd-port-smtp4dev
Codespaces: List port 5000 for Smtp4Dev
2022-11-16 16:34:59 +00:00
Warren Buckley dbc8c2680e List port 5000 for Smtp4Dev 2022-11-16 16:21:05 +00:00
Jacob OvergaardandGitHub f2de42f38e v11: Fix for TinyMCE dropdowns (#13417)
* Set higher z-index for TinyMCE overlays as they were set below that of our property editor overlays

Fixes #13414

* replace !important with more specificity
2022-11-16 11:48:18 +01:00
Warren BuckleyandGitHub 079d2f91b9 Merge pull request #13416 from umbraco/v11/codespaces-auto-open-codespace-readme
CodeSpaces: Scaffold out a file for a specific Codespace readme to auto open
2022-11-15 16:58:12 +00:00
Warren Buckley d3905b4c5c Scaffold out a file for a specific Codespace readme 2022-11-15 16:16:08 +00:00
7af8a407d3 Management API operation IDs (#13374)
* add a custom operationId generator to swagger operations based on the name of the action

* mark 'total' and 'items' as required in all paged models seeing as they should be there always non-nullable

* fix action typo collect -> rebuild to avoid duplicates

* fix operations for server status + version

* add factory to format custom operation ids

* Revert "fix operations for server status + version"

This reverts commit 066a59e1c2.

* Throw exception if no relative path and remove template placeholders completely

* Revert "Throw exception if no relative path and remove template placeholders completely"

This reverts commit 40af0721d6.

* Move source generated regex statements to its own file (#13410)

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-11-15 15:43:12 +01:00
Warren BuckleyandGitHub be8b083746 Merge pull request #13409 from umbraco/v11/codespace-sqlite-extension
Codespaces: Adds SQLite extension & ensures SQLite thats needed for it
2022-11-15 14:01:51 +00:00
Warren Buckley 2f976b41b4 Adds SQLite extension & ensures SQLite thats needed for it 2022-11-15 13:33:26 +00:00
Warren BuckleyandGitHub c7e78bcb72 Merge pull request #13407 from umbraco/v11/codespace-remove-build-before-launch
Codespaces: Removes the explicit build before attaching debugger launch task
2022-11-15 11:52:23 +00:00
Warren Buckley 704dda9575 Removes the explicit build before attaching debugger launch task 2022-11-15 11:23:53 +00:00
Warren BuckleyandGitHub d4949ae613 Merge pull request #13405 from umbraco/v11/codespaces-prebuild-dev-cert
Codespaces: dotnet devcert in the docker was not working so moved to updateContentCommand
2022-11-15 10:47:53 +00:00
Warren BuckleyandGitHub f0a34bd2a4 Merge branch 'v11/contrib' into v11/codespaces-prebuild-dev-cert 2022-11-15 10:19:39 +00:00
Warren BuckleyandGitHub aaf76ec5b8 Merge pull request #13401 from umbraco/v11/feature/codespaces-port-forward-config
Enable CodeSpaces PortForwarding Config
2022-11-15 10:14:35 +00:00
Warren Buckley 1d78a06509 The devcert in the docker was not working so moved to updateContentCommand 2022-11-15 10:14:29 +00:00
Sean Maloney c365c64bea 13402 - Update PreviewAuthenticationMiddleware to support chunked authentication cookies 2022-11-15 10:12:10 +00:00
Warren Buckley b32b0371ae Open Browser config is not working for some unknown reason 2022-11-15 09:47:10 +00:00
Warren Buckley 0cad30a8fa Adds SMTP4Dev and opens browser to HTTPs Umbraco 2022-11-15 08:55:39 +00:00
Warren Buckley 5d3b2e2e8a Enable CodeSpaces PortForwarding Config as SMTP4Dev did not auto appear in new prebuilds 2022-11-15 08:43:21 +00:00
Jacob OvergaardandNikolaj 6bc537713c v11: Rich text editor - remove distraction-free mode and optimise inline mode (#13394)
* combine 'inline' and 'distraction-free' modes with the quickbars plugin

* remove 'distraction-free' and map to 'inline'

* remove container overrides for 'distraction-free'
2022-11-15 09:13:14 +01:00
Warren BuckleyandGitHub 35355ce828 Merge pull request #13398 from umbraco/v11/feature/codespace-prebuilds-take-two
Trying Codespace prebuilds to use updateContentCommand that the docs refer to
2022-11-14 15:14:52 +00:00
Warren Buckley a4f8a51c57 Trying Codespace prebuilds to use updateContentCommand that the docs refer to 2022-11-14 15:11:15 +00:00
Jacob OvergaardandGitHub 3a8024c0c6 v11: Rich text editor - remove distraction-free mode and optimise inline mode (#13394)
* combine 'inline' and 'distraction-free' modes with the quickbars plugin

* remove 'distraction-free' and map to 'inline'

* remove container overrides for 'distraction-free'
2022-11-14 16:01:01 +01:00
Warren BuckleyandGitHub f5ff3e87d2 Merge pull request #13396 from umbraco/warrenbuckley-patch-1
Adds Open in GitHub Codespaces to main readme
2022-11-14 14:37:02 +00:00
Warren BuckleyandGitHub cf96aefb86 Adds Open in GitHub Codespaces to main readme
Adds Open in GitHub Codespaces to main readme next to other badges we have at the top of the readme
2022-11-14 14:36:26 +00:00
Warren BuckleyandGitHub dd895b1736 Merge pull request #13395 from umbraco/v11/feature/codespaces-prebuild-dotnetbuild
Adds dotnet build command for onCreateCommand to use in Prebuilds of CodeSpaces
2022-11-14 14:31:56 +00:00
Warren Buckley 3c709cfa24 Adds dotnet build command for onCreateCommand to use in Prebuilds of CodeSpaces 2022-11-14 14:10:52 +00:00
Nikolaj d03e0443b1 Merge branch 'release/11.0' into v11/dev
# Conflicts:
#	version.json
2022-11-14 14:41:44 +01:00
Nikolaj 0356aade30 Bump version 2022-11-14 12:44:26 +01:00
Nikolai Emil DammandNikolaj c2047d1d6e Remove nullability from AdditionalData on ContentItemDisplay (#13380)
@Zeegaan We have a use case where we need to set a value in the AdditionalData dictionary in a NotificationHandler, but as it can be null, it requires reflection to make sure that is not the case. As such, it would be nice if the following change could be implemented to ensure it is never null.
2022-11-14 12:42:43 +01:00
Bjarke BergandNikolaj 13308c3610 Obsolete old migrations and exif code (#13382)
* Obsoleted and deleted internal migrations + Enabled breaking changes checks agains v11.0.0-rc1

* Obsoleted and deleted internal exif stuff

* Added CompatibilitySuppressions.xml

* Change GenerateCompatibilitySuppressionFile
2022-11-14 12:40:22 +01:00
Bjarke BergandGitHub 616d092577 Obsolete old migrations and exif code (#13382)
* Obsoleted and deleted internal migrations + Enabled breaking changes checks agains v11.0.0-rc1

* Obsoleted and deleted internal exif stuff

* Added CompatibilitySuppressions.xml

* Change GenerateCompatibilitySuppressionFile
2022-11-14 12:40:06 +01:00
Warren BuckleyandGitHub 888488e7e4 Merge pull request #13392 from umbraco/v11/feature/codespace-gh-cli-ssh-support
Adds the SSH feature to allow the GitHub CLI SSH command to work
2022-11-14 11:34:27 +00:00
Mole 233c9df1d6 V11: InMemory - only add models assembly as runtime view reference if it exists (#13390)
* Only add models assembly as runtime view reference if it exists

* Add in memory metadata reference properly

compilations are readonly
2022-11-14 12:19:35 +01:00
Niels LyngsøandNikolaj e321982f44 remove console log 2022-11-14 12:19:31 +01:00
Niels LyngsøandNikolaj 27ec62016d Block Grid Editor Improvements (#13282) 2022-11-14 12:19:24 +01:00
Niels LyngsøandNikolaj 0e1095061e remove console log 2022-11-14 12:17:12 +01:00
Niels LyngsøandNikolaj 1bd03374dc Block Grid Editor Improvements (#13282) 2022-11-14 12:17:03 +01:00
MoleandGitHub a9e605d532 V11: InMemory - only add models assembly as runtime view reference if it exists (#13390)
* Only add models assembly as runtime view reference if it exists

* Add in memory metadata reference properly

compilations are readonly
2022-11-14 11:37:55 +01:00
Warren Buckley bd4553d8a4 Adds the SSH feature to allow the GitHub CLI SSH command to work 2022-11-14 10:01:34 +00:00
Matthew CareandGitHub 77859719f2 Batch media upload (#12947)
* Allow simultaneous uploads

Upload files in batches for faster uploading

* Fix concurrency issue

Many requests to add files coming at the same time can cause duplicate folders to be created.
In some cases, SQL exceptions can throw, and cause the application to hang.
Add Semaphore to process files on a single thread.

* Replace Semaphore with a Scope Provider

As suggested in the PR comments, replaced Semaphore with ICoreScopeProvider

* Revert "Replace Semaphore with a Scope Provider"

This reverts commit 228e1010c6.

* Add comment to make configurable

Out of scope of the PR, but this should be configurable in appsettings

* Apply PR 13345

Apply PR 13345 to resolve "freezing" issue caused by unhandled errors

* Account for currently processing items

If you drag files into the dropzone whilst other files are uploading then the "total" count is incorrect.
2022-11-14 07:49:18 +01:00
Andreas ZerbstandGitHub bee6adfe27 V11: Add new blocklist acceptance tests (#13299)
* Created test for block list editor

* Added a couple of test for the block list editor

* Changed parts of builder

* Split the test into two files instead of one

* Updated and added test for blockListEditor

* Updated version

* Fixed so it now targets the correct selector

* Removed unnecessary login in the afterEach

* Fixed up the test so they are now using constants and the correct helpers

* Bumped version

* Updated the package-lock

* Added local function to battle code reuse!

* Updated the path of the image for the test 'can edit a block list editor'

* Placed an expect before the button so it waits to click the button till it's visible

* Yet another fix for the imagePath and a missing "
2022-11-14 07:01:33 +01:00
Warren BuckleyandGitHub efa069f1ed Merge pull request #13387 from umbraco/v11/codespaces
Adds in .NET 7 SDK to GitHub CodeSpaces
2022-11-11 19:38:17 +00:00
Warren Buckley 4d1a1ba413 Adds in .NET SDK using the Feature approach in devcontainer.json until NET7 image is live 2022-11-11 19:01:54 +00:00
Nikolai Emil DammandGitHub ad0582a5aa Remove nullability from AdditionalData on ContentItemDisplay (#13380)
@Zeegaan We have a use case where we need to set a value in the AdditionalData dictionary in a NotificationHandler, but as it can be null, it requires reflection to make sure that is not the case. As such, it would be nice if the following change could be implemented to ensure it is never null.
2022-11-10 14:13:10 +01:00
Kenn JacobsenandNikolaj 69c6eae7a2 Move block grid single area rendering to its own dedicated view (#13359) 2022-11-09 09:52:46 +01:00
Kenn JacobsenandNikolaj d11ed8acff Move block grid single area rendering to its own dedicated view (#13359) 2022-11-09 09:51:11 +01:00
Bjarke BergandNikolaj 84240d90b6 Updated to aspnetcore 7.0.0 (#13372) 2022-11-09 09:33:22 +01:00
Bjarke BergandGitHub 73afd29b55 Updated to aspnetcore 7.0.0 (#13372) 2022-11-09 09:30:07 +01:00
c1e9775f29 Merge new backoffice changes to release branch (#13368)
* New backoffice: Cleanup management API routes (#13296)

* Rename ModelsBuilderDashboard folder to ModelsBuilder

* Fix modelsbuilder paths and related naming

* Rename analytics route to telemetry

* Fix controller bases - routes and tags

* Fix items route

* Fix more controllerbase routes

* Fix route

* Fix OpenApi file

* Merging DictionaryItem and Dictionary

* Fix TrackedReferences naming

* Update OpenApi file

* Rename Analytics* related types to Telemetry*

* New Backoffice: Return AnalyticsLevelViewModel from Telemetry/ (#13298)

* Return TelemetryLevelViewModel instead of TelemetryLevel

* Fix schema

* Change telemetry/current to telemetry/level

(cherry picked from commit f2b8494c669cbbf04b623753abbf1be211973aa9)

* Add contants for tree and recycle-bin subpaths

(cherry picked from commit 4449f56bc00832ea6d357a3854b454791c80e0e2)

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

* OpenId Connect authentication for new management API (#13318)

* 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>

* Use Swashbuckle instead of NSwag (#13350)

* 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

* Replace NSwag with Swashbuckle and clean up unnecessary client secret workaround

* 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

* A little niceness + export new OpenApi.json and fix path in contract unit test

* Redo after merge with v11/dev + filter out unwanted mime types

* Remove CreatedResult and NotFoundObjectResult where possible

* Custom schema IDs - no more "ViewModel" postfix and make generic lists look less clunky too

* A little more explanation for generic schema ID generation

* Force Swashbuckle to use enum string names

* Update OpenApi.json to match new enum string values

* Add clarifying comment about weird looking construct

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-08 12:48:46 +01:00
MoleandGitHub 54131605be V12: Replace ntext with nvarchar(max) in database (#13351)
* Update UnPublishedContentPropertyCacheCompressionOptions to also accept Nvarchar

* Update DTOs to use nvarchar(max)

* Add Migration

* Simplify migration a bit

* Refactor column migration for reuse

* Add remaning column migrations

* Support non-nullable column

* Make it idempotent

* Skip SQLite

* Revert "Update UnPublishedContentPropertyCacheCompressionOptions to also accept Nvarchar"

This reverts commit d432d165de.

* Obsolete NTEXT

* Ignore case when checking column type
2022-11-08 12:26:40 +01:00
Nathan Woulfeandnikolajlauridsen 65803e2645 add workflow to schema (#13349)
* add workflow to schema

* add licenses to CMSDefinition - intentionally only adding to schema, not registered as options
2022-11-08 11:07:30 +01:00
+1 64e7933d57 V11: Merge dev to contrib (#13363)
* Bump version

* Add IContextCache to deploy connectors (#13287)

* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Add IContextCache to deploy connectors (#13287)

* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Parse lockId as invariant (#13284)

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

* Fix Sqlite database locking issue (#13246)

* Add locking for creating scope

* Lock the repository instead

* Add scope in action instead of locking in service

* Fix up post-merge

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

* Bump version to next minor

* Fix for UseExceptionHandler no longer working since v10.3 RC (#13218)

* Fix for UseExceptionHandler no longer working since v10.3 RC

* Update the management api path to match the new one

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

* New backoffice: Cleanup management API routes (#13296)

* Rename ModelsBuilderDashboard folder to ModelsBuilder

* Fix modelsbuilder paths and related naming

* Rename analytics route to telemetry

* Fix controller bases - routes and tags

* Fix items route

* Fix more controllerbase routes

* Fix route

* Fix OpenApi file

* Merging DictionaryItem and Dictionary

* Fix TrackedReferences naming

* Update OpenApi file

* Rename Analytics* related types to Telemetry*

* New Backoffice: Return AnalyticsLevelViewModel from Telemetry/ (#13298)

* Return TelemetryLevelViewModel instead of TelemetryLevel

* Fix schema

* Change telemetry/current to telemetry/level

(cherry picked from commit f2b8494c669cbbf04b623753abbf1be211973aa9)

* Add contants for tree and recycle-bin subpaths

(cherry picked from commit 4449f56bc00832ea6d357a3854b454791c80e0e2)

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

* Updated Smidge, Npoco and MailKit (#13310)

* Updated Smidge, Npoco and MailKit

* Added missing command (after breaking interface in npoco)

* OpenId Connect authentication for new management API (#13318)

* 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>

* V11: Using IFileProvider to access assets added from packages (#13141)

* Creating a FileProviderFactory for getting the package.manifest and grid.editors.config.js files through a file provider

* Collecting the package.manifest-s from different sources

* Searching different sources for grid.editors.config.js

* Using an IFileProvider to collect all tours

* Refactoring IconService.cs

* Typo

* Optimizations when looping through the file system

* Moving WebRootFileProviderFactory to Umbraco.Web.Common proj

* Removes double registering

* pluginLangFileSources includes the localPluginFileSources

* Comments

* Remove linq from foreach

* Change workflow for grid.editors.config.js so we check first physical file, then RCL, then Embedded

* Clean up

* Check if config dir exists

* Discover nested package.manifest files

* Fix IFileInfo.PhysicalPath check

* Revert 712810e1fd as that way files in content root are preferred over those in web root

* Adding comments

* Refactoring

* Remove PhysicalPath check

* Fix registration of WebRootFileProviderFactory

* Use Swashbuckle instead of NSwag (#13350)

* 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

* Replace NSwag with Swashbuckle and clean up unnecessary client secret workaround

* 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

* A little niceness + export new OpenApi.json and fix path in contract unit test

* Redo after merge with v11/dev + filter out unwanted mime types

* Remove CreatedResult and NotFoundObjectResult where possible

* Custom schema IDs - no more "ViewModel" postfix and make generic lists look less clunky too

* A little more explanation for generic schema ID generation

* Force Swashbuckle to use enum string names

* Update OpenApi.json to match new enum string values

* Add clarifying comment about weird looking construct

* add workflow to schema (#13349)

* add workflow to schema

* add licenses to CMSDefinition - intentionally only adding to schema, not registered as options

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Justin Neville <67802060+justin-nevitech@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-11-08 08:21:55 +01:00
Nathan WoulfeandGitHub 8074c3fb62 add workflow to schema (#13349)
* add workflow to schema

* add licenses to CMSDefinition - intentionally only adding to schema, not registered as options
2022-11-07 16:01:11 +01:00
Kenn JacobsenandGitHub 2a5c70a28b Use Swashbuckle instead of NSwag (#13350)
* 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

* Replace NSwag with Swashbuckle and clean up unnecessary client secret workaround

* 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

* A little niceness + export new OpenApi.json and fix path in contract unit test

* Redo after merge with v11/dev + filter out unwanted mime types

* Remove CreatedResult and NotFoundObjectResult where possible

* Custom schema IDs - no more "ViewModel" postfix and make generic lists look less clunky too

* A little more explanation for generic schema ID generation

* Force Swashbuckle to use enum string names

* Update OpenApi.json to match new enum string values

* Add clarifying comment about weird looking construct
2022-11-04 14:46:35 +01:00
nikolajlauridsen 0ed3121eaa Bump version 2022-11-03 09:38:33 +01:00
Elitsa Marinovskaandnikolajlauridsen f4eac20eaf V11: Using IFileProvider to access assets added from packages (#13141)
* Creating a FileProviderFactory for getting the package.manifest and grid.editors.config.js files through a file provider

* Collecting the package.manifest-s from different sources

* Searching different sources for grid.editors.config.js

* Using an IFileProvider to collect all tours

* Refactoring IconService.cs

* Typo

* Optimizations when looping through the file system

* Moving WebRootFileProviderFactory to Umbraco.Web.Common proj

* Removes double registering

* pluginLangFileSources includes the localPluginFileSources

* Comments

* Remove linq from foreach

* Change workflow for grid.editors.config.js so we check first physical file, then RCL, then Embedded

* Clean up

* Check if config dir exists

* Discover nested package.manifest files

* Fix IFileInfo.PhysicalPath check

* Revert 712810e1fd as that way files in content root are preferred over those in web root

* Adding comments

* Refactoring

* Remove PhysicalPath check

* Fix registration of WebRootFileProviderFactory
2022-11-03 09:17:42 +01:00
Elitsa MarinovskaandGitHub 897cf4ca19 V11: Using IFileProvider to access assets added from packages (#13141)
* Creating a FileProviderFactory for getting the package.manifest and grid.editors.config.js files through a file provider

* Collecting the package.manifest-s from different sources

* Searching different sources for grid.editors.config.js

* Using an IFileProvider to collect all tours

* Refactoring IconService.cs

* Typo

* Optimizations when looping through the file system

* Moving WebRootFileProviderFactory to Umbraco.Web.Common proj

* Removes double registering

* pluginLangFileSources includes the localPluginFileSources

* Comments

* Remove linq from foreach

* Change workflow for grid.editors.config.js so we check first physical file, then RCL, then Embedded

* Clean up

* Check if config dir exists

* Discover nested package.manifest files

* Fix IFileInfo.PhysicalPath check

* Revert 712810e1fd as that way files in content root are preferred over those in web root

* Adding comments

* Refactoring

* Remove PhysicalPath check

* Fix registration of WebRootFileProviderFactory
2022-11-02 15:26:07 +01:00
Nikolaj GeisleandNikolaj 8243a66dee Add guard statement (#13340) 2022-11-02 13:12:55 +01:00
dc9d4155a3 OpenId Connect authentication for new management API (#13318)
* 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>
2022-11-01 11:15:31 +01:00
MoleandGitHub 174874eb11 Fix casing in fileSystemBasePath (#13306) 2022-11-01 08:41:50 +01:00
Bjarke BergandNikolaj 68676db082 Updated Smidge, Npoco and MailKit (#13310)
* Updated Smidge, Npoco and MailKit

* Added missing command (after breaking interface in npoco)
2022-10-31 08:28:59 +01:00
Bjarke BergandGitHub 746ab4bb23 Updated Smidge, Npoco and MailKit (#13310)
* Updated Smidge, Npoco and MailKit

* Added missing command (after breaking interface in npoco)
2022-10-31 08:25:06 +01:00
Jason ElkinandMichael Latouche 6cb53fd703 Swap HSTS healthcheck status on localhost 2022-10-30 00:51:36 +02:00
TiffanyandMichael Latouche 96da638236 Added h2 for the package details heading 2022-10-29 01:13:39 +02:00
SimonJansson2andMichael Latouche 2071224d1f Adding swedish backoffice translations 2022-10-27 09:32:53 +02:00
6ff4d27d47 New backoffice: Cleanup management API routes (#13296)
* Rename ModelsBuilderDashboard folder to ModelsBuilder

* Fix modelsbuilder paths and related naming

* Rename analytics route to telemetry

* Fix controller bases - routes and tags

* Fix items route

* Fix more controllerbase routes

* Fix route

* Fix OpenApi file

* Merging DictionaryItem and Dictionary

* Fix TrackedReferences naming

* Update OpenApi file

* Rename Analytics* related types to Telemetry*

* New Backoffice: Return AnalyticsLevelViewModel from Telemetry/ (#13298)

* Return TelemetryLevelViewModel instead of TelemetryLevel

* Fix schema

* Change telemetry/current to telemetry/level

(cherry picked from commit f2b8494c669cbbf04b623753abbf1be211973aa9)

* Add contants for tree and recycle-bin subpaths

(cherry picked from commit 4449f56bc00832ea6d357a3854b454791c80e0e2)

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-10-27 08:46:21 +02:00
Justin NevilleandNikolaj 86d9e51039 Fix for UseExceptionHandler no longer working since v10.3 RC (#13218)
* Fix for UseExceptionHandler no longer working since v10.3 RC

* Update the management api path to match the new one

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2022-10-26 13:57:37 +02:00
f5aba340e4 Fix for UseExceptionHandler no longer working since v10.3 RC (#13218)
* Fix for UseExceptionHandler no longer working since v10.3 RC

* Update the management api path to match the new one

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2022-10-26 13:56:09 +02:00
Nikolaj 054f5db6bb Bump version to next minor 2022-10-26 10:17:40 +02:00
Nikolaj 276be1ac8e Merge branch 'release/11.0' into v11/dev 2022-10-26 10:16:02 +02:00
bacc81d01a Fix Sqlite database locking issue (#13246)
* Add locking for creating scope

* Lock the repository instead

* Add scope in action instead of locking in service

* Fix up post-merge

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-26 08:47:04 +02:00
2cb926cada Parse lockId as invariant (#13284)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-26 08:45:51 +02:00
10d03f0b58 Add IContextCache to deploy connectors (#13287)
* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>
2022-10-26 08:42:55 +02:00
1560e84f14 Add IContextCache to deploy connectors (#13287)
* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>
2022-10-25 18:40:11 +02:00
Sebastiaan Janssen 2f57e84aba Merge branch 'v11/dev' into v11/contrib 2022-10-25 16:42:18 +02:00
MoleandGitHub fc187596e3 V11: Use SqLiteException instead of SqlException in SqliteDistributedLockingMechanism & fix E2E tests (#13293) 2022-10-25 16:40:36 +02:00
BatJanandSebastiaan Janssen 8fe699f26b Change prevalue order 2022-10-25 15:47:45 +02:00
Matthew WiseandSebastiaan Janssen 5040bbc1b2 Added asserts to TagsCanBecomeInvariantByPropertyTypeAndBackToVariant 2022-10-25 15:44:50 +02:00
Matthew WiseandSebastiaan Janssen 036580248b Remove xml docs warnings using .editorconfig 2022-10-25 15:41:48 +02:00
Rachel BreezeandSebastiaan Janssen d32b93349d A11Y added missing iframe title to installer and preview controller. 2022-10-25 15:40:14 +02:00
CyberReiterandSebastiaan Janssen ce60e72452 adding some german translations 2022-10-25 15:38:30 +02:00
MoleandGitHub dc9085bd1d Remove references to build.ps1 in build docs (#13252) 2022-10-25 14:52:10 +02:00
Sebastiaan Janssen 46414f2c64 Merge branch 'v11/dev' into v11/contrib 2022-10-25 14:27:14 +02:00
Sebastiaan Janssen 9e3178034e Merge branch 'v10/dev' into v11/dev 2022-10-25 14:26:01 +02:00
CarlandGitHub 2ab0fa514d Added constants for getTreeItem in 2 stes of tests (#13276) 2022-10-24 07:49:36 +02:00
4367e45b73 Const adding for content tests (#13271)
* Constant replacing string

SaveNode const created to replace string for saveNew action

* Hardcoded string for content replaced for const

* Const created for default alias

* Refactoring dupe constants

* Using constanthelper to refactor further

* Dupe consts for strings amalgamated

Cleaning up the few strings I have missed and duplicate constants with different name

Co-authored-by: emma burstow <emaburst@gmail.com>
2022-10-24 07:45:06 +02:00
CarlandGitHub 220600319c Feature/git ignore to exclude test results from git (#13275)
* Additional info for running individual tests

* Ignore playwright test results from git

* Update README.md

These changes belong in a different PR #13274
2022-10-24 07:41:37 +02:00
CarlandGitHub aada595d60 Additional info for running individual tests (#13274) 2022-10-24 07:40:14 +02:00
Carole Rennie LoganandSebastiaan Janssen cdb42799dd updating to reference v11/contrib, not 10 2022-10-22 13:07:59 +02:00
Carole Rennie LoganandGitHub e780beadd7 update to link to youtube tutorials (#13266) 2022-10-22 13:06:17 +02:00
TiffanyandSebastiaan Janssen 5209840597 Fixed user invited badge color 2022-10-22 12:37:07 +02:00
emma-hqandGitHub 5fe165421c Adding discord server info (#13264)
* Adding discord server info

Discord server added to the Join our community section

* Update .github/README.md
2022-10-21 22:13:59 +01:00
Michael LatoucheandJoe Glombek 92ac072559 Update datepicker.controller.js
Don't set dirty if date actually not changed
2022-10-21 21:14:29 +01:00
6cad4013e4 Renames Installer form from "myForm" to "installerForm" (#12806)
Co-authored-by: Joe Glombek <joe@glombek.com>
2022-10-21 20:21:21 +01:00
Sebastiaan JanssenandMichael Latouche 7d9ee69fbc Changed Logo button behavior to be more consistent with the rest of the header 2022-10-21 18:16:58 +02:00
Anders BjernerandMichael Latouche 4922144528 Added shortcut="esc" to RTE HTML editor close button 2022-10-21 16:58:26 +02:00
Nikolaj 96ea387a6c Bump version 2022-10-21 10:31:39 +02:00
Mole 38712dce16 Add PrivateAssets="all" to mangement api project reference (#13249) 2022-10-21 09:17:38 +02:00
MoleandGitHub e57e910ca6 Merge pull request #13244 from umbraco/v11/merge_dev_into_release
Merge v11/dev into release/11.0.0
2022-10-20 11:43:12 +02:00
nikolajlauridsen 40200d077e Merge branch 'v11/dev' into v11/merge_dev_into_release 2022-10-20 10:18:09 +02:00
MoleandGitHub 7ddea288f9 Merge pull request #13243 from umbraco/v11/merge_v10
V11/merge v10
2022-10-20 10:16:47 +02:00
b3f11b9c16 New backoffice: Change management API base path (#13232)
* Change management api base path to  /umbraco/management/api/

* Update OpenApi schema

* Fixing some more paths

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-10-20 09:50:54 +02:00
nikolajlauridsen 8bdfcad469 Fix comment in Umbracoplan 2022-10-20 09:44:23 +02:00
nikolajlauridsen fec7b680ce Merge remote-tracking branch 'origin/v10/dev' into v11/merge_v10
# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts
2022-10-20 09:37:14 +02:00
Nikolaj d9286fd4f8 Re-add push to nuget step 2022-10-19 14:32:05 +02:00
Nikolaj 5315f4df1b Remove broken duplicate nuget push command 2022-10-19 14:09:01 +02:00
Nikolaj 1c5e7956f9 Fix publish to MyGet 2022-10-19 12:51:26 +02:00
Nikolaj a73eced29c Add UseDotNet to Integration Tests SQL Server 2022-10-19 10:46:32 +02:00
df19d4fc6d Fixes: Consistency for Nullable reference types in LINQ extensions methods #12692 (#12703)
* Ensure Name and Children can never return null.

* Name should be empty not null

* Ensure Name and Children type queries never return null

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2022-10-19 10:32:09 +02:00
+1 27e129a6b4 V11: Merge v10 (#13235)
* Fix broken selectable state for list view items (#13148)

* Add sync rendering extensions for block grid and async ones for block list (#13168)

* Re-add IsPackable to Umbraco.Tests.Integration

* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

(cherry picked from commit 4a412bb432)

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Pass the node property to umb-property & umb-property-editor (#13151)

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

* V10: 13099 fix validation error (#13170)

* Add validation error message to Viewpicker

* Add help-inline class to make validation-text red

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

* move clear:both; to the flexbox example (#13194)

* remove pointer-events from Image, to make drag n' drop work on firefox. (#13193)

* area permission min-max inputs width increase (#13195)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add documentation for default block grid partial views in the rendering extension methods (#13184)

* Add data-element to umb property so we can find it (#13199)

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

* Add data-element to umb property so we can find it (#13199)

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

* V10/bugfix/create simple package test (#13162)

* Fixed assert to hopefully find the package each time so it isnt flaky anymore

* Updated so it retries 5 times instead of 2

* Dont submit html-report

* Dont have output defined in npm run

* Copy over playwright trace.zip files before publishing

* Updated assert so it looks after the package in the table

* updated so we get the first fail as the trace file

* Bumped version for testhelpers

* Updated so the test checks if the package actually exists. Added a wait that checks if the created packages button is visible

* Updated package lock

* Fixed so it now calls the correct testhelper

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

* Merge BjarneF fix into 10.3 (#13220)

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* make Area fit within block row (#13221)

* 10.3.0-RC: Change grid area input to number + change generic label (#13203)

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* move below center, to make room (#13222)

* highlight areas in dragging-mode for modern browsers (#13224)

* Collect new .xml language files from different sources (#13212)

* Collecting new language files from different sources

* Apply suggestions from review

* Adding TODO for merging the language files locations to one when packages are not concerned

* Collect new .xml language files from different sources (#13212)

* Collecting new language files from different sources

* Apply suggestions from review

* Adding TODO for merging the language files locations to one when packages are not concerned

* Resync editors if content model changed (#13230)

* Disable BlockGridEditor (#13229)

* Disable BlockGridEditor

* Fix typeloader test

* Update src/Umbraco.Core/Models/Blocks/BlockGridItem.cs

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

* Apply suggestions from code review

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

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

* V10.4: Re-enable block grid editor (#13231)

* Revert "Disable BlockGridEditor (#13229)"

This reverts commit 4e9aa8dac2.

* Re-do xml comments fix

* Fix nullable reference error

* Fix acceptance test package.json and package-lock.json

* Re-add wait-on

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Matt Darby <matt@darby.digital>
2022-10-19 10:24:43 +02:00
Andreas ZerbstandGitHub b69afe81f3 Merge pull request #13228 from umbraco/v11/bugfix/Add-proper-assert-for-relationtype-test
Added proper save assert instead of checking on the route
2022-10-18 12:38:16 +02:00
Zeegaan 21e6cf36e7 Added proper save assert instead of checking on the route 2022-10-18 11:18:05 +02:00
2903d58ab3 V10: 13125 don't return "null" (#13163)
* Add null check

* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add data-element to umb property so we can find it (#13199)

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

* V10/bugfix/create simple package test (#13162)

* Fixed assert to hopefully find the package each time so it isnt flaky anymore

* Updated so it retries 5 times instead of 2

* Dont submit html-report

* Dont have output defined in npm run

* Copy over playwright trace.zip files before publishing

* Updated assert so it looks after the package in the table

* updated so we get the first fail as the trace file

* Bumped version for testhelpers

* Updated so the test checks if the package actually exists. Added a wait that checks if the created packages button is visible

* Updated package lock

* Fixed so it now calls the correct testhelper

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

* Update src/Umbraco.Core/PropertyEditors/DataValueEditor.cs

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

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-10-18 10:56:09 +02:00
Andreas ZerbstandGitHub b1cbc92e8c Merge pull request #13209 from umbraco/v11/bugfix/fix-more-unstable-acceptance-tests
V11: fix more unstable acceptance tests
2022-10-18 09:00:52 +02:00
Nikolaj GeisleandGitHub b84dcf87dd Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts 2022-10-18 08:19:23 +02:00
Kenn JacobsenandGitHub 000324aaba Make Examine API more REST-ish (#13198)
* Make Examine API more REST-ish

* Undo bad renaming

* Move search endpoint under "searchers" route

* Update schema to match new API definition

* Update OpenAPI schema after merge

* Remove "examine" prefixes and change API route from "examine" to "search"

* Update OpenAPI json schema
2022-10-17 17:15:06 +02:00
Nikolaj Geisle d090b89848 Merge remote-tracking branch 'origin/v11/dev' into v11/bugfix/fix-more-unstable-acceptance-tests 2022-10-17 15:52:49 +02:00
Bjarke Berg e006f7cd7d Fixed issue when no models mode was specified in app settings 2022-10-17 15:43:17 +02:00
Nikolaj Geisle 9b6902d9ba Bumb playwright-testhelper version 2022-10-17 15:42:00 +02:00
Nikolaj Geisle c42e6d616c Reset maximum timeout to 30s 2022-10-17 15:27:26 +02:00
Nikolaj Geisle 3a196382f9 Update maximum test time-out 2022-10-17 14:53:41 +02:00
Nikolaj Geisle 8440f57de8 Bumb testhelpers package 2022-10-17 14:29:03 +02:00
Nikolaj Geisle 166791f3da Merge remote-tracking branch 'origin/v11/dev' into v11/bugfix/fix-more-unstable-acceptance-tests 2022-10-17 14:03:09 +02:00
Nikolaj Geisle 2ff3f270ab Remove whitespace from response 2022-10-17 13:01:54 +02:00
Nikolaj Geisle d8b7733ee7 Bumb testhelpers version 2022-10-17 12:17:31 +02:00
Nikolaj Geisle 4a28001740 Update test-helpers version 2022-10-17 12:13:55 +02:00
Nikolaj Geisle a28c2f2f9a Dont remove whitespace 2022-10-17 11:10:05 +02:00
Nikolaj Geisle a50b0de0bb Update playwright-testhelpers version 2022-10-17 10:37:40 +02:00
Bjarke Berg f0866d3ea0 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-10-17 08:21:26 +02:00
Bjarke Berg 773262c8ce Updated templates to say .net 7 2022-10-17 08:21:16 +02:00
Nikolaj Geisle 13b6eb3a48 Assert that the item is loaded before trying to click rollback 2022-10-14 23:58:47 +02:00
MoleandGitHub f7a26f5b58 Only replace the MS services when the site is actually set to InMemoryAuto (#13201) 2022-10-14 20:04:19 +02:00
Nikolaj Geisle fbfeef1b9a Merge branch 'v11/dev' into v11/bugfix/fix-more-unstable-acceptance-tests 2022-10-14 19:21:51 +02:00
Bjarke Berg b4166028bf Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-10-14 15:09:04 +02:00
Bjarke Berg 1ea9009feb Added code to avoid unneccessary breaking changes 2022-10-14 15:08:56 +02:00
Ronald Barendse 3dc103e8a6 Add wait-on dev dependency 2022-10-14 11:10:29 +02:00
Nikolaj Geisle 31b76c3705 Close success notification 2022-10-14 10:28:21 +02:00
Nikolaj Geisle 4d4999b078 Add proper expect to download button 2022-10-14 09:51:45 +02:00
Nikolaj Geisle a20a44c0c2 Update testhelpers version 2022-10-14 09:51:33 +02:00
Nikolaj Geisle 6f12eb158a Dont commit playwright.config.ts 2022-10-14 09:09:49 +02:00
Nikolaj Geisle d7ca610f6d Update tests to close success notifications 2022-10-14 09:06:12 +02:00
Nikolaj Geisle e6b0b65ddd Close success notifications after they pop up 2022-10-14 08:48:20 +02:00
Kenn JacobsenandGitHub 9ce83e8f55 Fix pipeline errors for V11 (#13208)
* Correct exec parameter list for json schema generation during build

* Update OpenAPI schema
2022-10-14 08:37:14 +02:00
8e3e4d7ba6 V11: fix failing acceptance tests (#13204)
* Fix macro in RTE test

* Update test-helper version

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-13 19:29:00 +02:00
ea84b863af V11: v10 to v11 (#13205)
* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add data-element to umb property so we can find it (#13199)

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

* V10/bugfix/create simple package test (#13162)

* Fixed assert to hopefully find the package each time so it isnt flaky anymore

* Updated so it retries 5 times instead of 2

* Dont submit html-report

* Dont have output defined in npm run

* Copy over playwright trace.zip files before publishing

* Updated assert so it looks after the package in the table

* updated so we get the first fail as the trace file

* Bumped version for testhelpers

* Updated so the test checks if the package actually exists. Added a wait that checks if the created packages button is visible

* Updated package lock

* Fixed so it now calls the correct testhelper

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

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2022-10-13 15:29:38 +02:00
f4280fff0e V11: merge v10 to v11 (#13200)
* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add data-element to umb property so we can find it (#13199)

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

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-13 11:08:32 +02:00
Nikolaj GeisleandGitHub 442342e388 Make parameters nullable (#13185) 2022-10-13 09:21:27 +02:00
Bjarke Berg ed9a26be3a Post merge fix 2022-10-12 11:20:46 +02:00
Ronald Barendse 3599dd4178 Remove duplicate package references 2022-10-12 11:14:35 +02:00
Bjarke Berg 4712e9e08e Added CompatibilitySuppressions.xml 2022-10-12 11:06:26 +02:00
Bjarke Berg 8ebeb32469 Merge remote-tracking branch 'origin/v11/dev' into v11/dev
# Conflicts:
#	.gitignore
2022-10-12 10:48:40 +02:00
Bjarke Berg 5bd796d73f Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	build/azure-pipelines.yml
#	tests/Umbraco.Tests.AcceptanceTest/misc/umbraco-linux.docker
2022-10-12 10:47:49 +02:00
Ronald Barendse 30e016afb3 Fix ManagementApi dependency and update JSON schema file names 2022-10-12 10:47:10 +02:00
Bjarke Berg 909a14b53a Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-10-12 10:45:49 +02:00
Bjarke Berg 5bbd669776 Updated nuget packages to latest version. Incl asp.net core to 7rc2 2022-10-12 10:45:42 +02:00
Ronald Barendse d73ab7c9ca Add compatibility suppressions 2022-10-11 23:54:20 +02:00
Ronald BarendseandGitHub 535d07486f Re-add --no-build to dotnet pack
Should be fixed in .NET SDK 7: https://github.com/dotnet/aspnetcore/issues/43062
2022-10-11 23:42:32 +02:00
94774113f6 V11: Fix InMemoryAuto modelsbuilder mode (#13107)
* POC of a solution that works

* Add razor reference manager

* Ensure the compilation options are correct

* Move InMemory classes to its own namespace

These are all internal, so it should be fine.

* Throw proper exceptions when compilation fails

* Add CheckSumValidator

* Clear the ViewCompiler cache when models changed

This means we no longer need the RefreshingRazorViewEngine \o/

* Remove unused constructor injection

* Make UmbracoAssemblyLoadContext non internal

* Add WIP

* Clear the RazorViewEngine cache when generating new models

This uses reflection, which isn't super nice, however, the alternative is to clone'n'own the entire RazorViewEngine, which is arguably worse

* Fix circular dependency

* Remove ModelsChanged event

This is no longer necessary

* Fix precompiled views path

We need to normalize these paths to ensure they matches with the keys in _precompiledViews

* Clean

* Fix content tests

* Add logging

* Update the comment in UmbracoBuilderDependencyInjectionExtensions to reflect changes

* Remove RefreshingRazorViewEngine as its no longer needed

* Remove unused ViewEngine hack from DI

* Fix langversion

This is required since dotnet 7 is still in preview

* Add modelsbuilder tests

* Add more tests

* fixed comment

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-10-07 10:42:32 +02:00
Bjarke Berg b2ed235870 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-10-07 10:04:11 +02:00
Bjarke Berg e6074968fe Updated dependencies 2022-10-05 21:26:05 +02:00
Bjarke Berg 9df07de52e Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	version.json
2022-10-05 21:18:36 +02:00
Bjarke BergandGitHub 018e1e9265 Merge pull request #13129 from umbraco/v11/merge/merge-v10-to-v11
merge v10 into v11
2022-10-05 21:17:55 +02:00
Bjarke Berg 4e48c975b7 Fix contract 2022-10-05 20:55:20 +02:00
Bjarke Berg 90e5f8538d Merge remote-tracking branch 'origin/v11/merge/merge-v10-to-v11' into v11/merge/merge-v10-to-v11 2022-10-05 16:05:06 +02:00
Bjarke Berg 44e768de4d fix pack issue 2022-10-05 16:04:26 +02:00
Nikolaj Geisle 23f2e73d72 Remove unused dependencies 2022-10-05 15:51:38 +02:00
Nikolaj Geisle 0e7baa1626 Update langversion 2022-10-05 15:51:28 +02: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
Bjarke BergandGitHub 46da0b07a8 Ship two json schema files.. One that reference others, and a CMS one (#13123)
* Ship two json schema files.. One that reference others, and a CMS one

* git ignore

* Build schema files sepearately
2022-10-05 12:42:21 +02:00
+12 6dc874147f v11: Merge v10/feature/project-cleanup into v11/dev (#13112)
* New backoffice/add system text json configuration attribute (#12998)

* Add SystemTextJsonConfigurationAttribute

* Fix up formatting

* Rename classes for clearer purpose

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

* UmbracoPath should no longer be configurable (#13032)

* UmbracoPath should no longer be configurable

* Remove UmbracoPath configuration from all tests

* Only contain style instead of full layout (#13033)

* Only contain style instead of full layout (#13033)

* Fix CodeQL duplicate "permissions"  node and reformat

* add an extra check to ensure the pips exist before adding a class to them

* improve pip classList add/remove with no intermediary variable

* Only contain style instead of full layout (#13033)

* Ensure consistent margin on headings in tree root (#12992)

* Ensure consistent margin on headings in tree root (#12992)

(cherry picked from commit 88bfef9e0d)

* Bump version to 10.2.1

* Translate "User permissions for languages" feature to dutch (#12971)

* Translate 'sectionsHelp' to Dutch

* Translate 'selectLanguages' to Dutch

* Transkate 'allowAccessToAllLanguages' to Dutch

* Translate "User permissions for languages" feature to español (#12975)

* Translate 'selectLanguages' to Español

* Translate 'languagesHelp' to español

* Translate 'allowAccessToAllLanguages' to spanish

* Updated project references for Forms and Deploy in the JsonSchema project. (#13047)

* Updated project references for Forms and Deploy in the JsonSchema project. (#13047)

* UmbracoPath has been removed from the official schema store, remove temporary workaround from our schema generator as well (#13043)

* add an extra check to ensure the pips exist before adding a class to them

* improve pip classList add/remove with no intermediary variable

* pass in parameters needed to member service (#13020)

* Missing methods from IMemberService (#13022)

* Add back methods to interface

* Add default implementations to avoid breaking changes

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

* New endpoint for web profiling dashboard (#13038)

* Endpoint for web profiling dashboard

* Add profiling API contract

* New Backoffice: Published cache controller (#13034)

* Add published cache controller (endpoints for the Published Status dashboard)

* Update OpenAPI contract for published cache endpoints

* Fix OpenApi spec

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

* Bug fix for datepicker with offset time (#12847)

* https://github.com/umbraco/Umbraco-CMS/issues/12844

* remove "X" from ng-attr

Doing the test I killed the ng-if attr. But forgot it was there doing the commit

Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>

* Make sure swagger tags and operations are sorted alphabetically (#13055)

* Add spellcheck false to password inputs (#13059)

* Add null check for variants in Grid Layout (#13060)

This fixes a regression from 10.2.0 where the `variants` property was removed.

* Add null check for variants in Grid Layout (#13060)

This fixes a regression from 10.2.0 where the `variants` property was removed.

* Fixes #12972 for validating legacy member passwords (#12973)

* Fixes #12972 for validating legacy member passwords

* Removed unused variable

* removed unused variable

* Fix issue toggling boolean between true/false after Save without refreshing

* New backoffice: examine management controller (#12981)

* Add ExamineManagementControllerBase

* Add ExamineIndexModelFactory

* Add IndexesExamineManagementController

* Add proper attributes

* Implement ExamineIndexViewModel.cs

* formatting

* Add comment about it working in .NET 7

* Add SearchersExamineManagementController.cs

* Update comments about why it might throw errors

* Add SearchResultViewModel

* Add SearchExamineManagementController

* Add ExamineSearcherValidationService

* Rename ExamineSearcherValidationService.cs to ExamineSearcherFinderService.cs

* Rename interface aswell

* Add SearchExamineManagementController

* Refactor ExamineSearcherFinderService

* Add HasIndexRebuiltExamineManagementController.cs

* Fix up formatting

* Async actions

* Add RebuildIndexExamineManagementController.cs

* Rename IExamineIndexModelFactory to IExamineIndexViewModelFactory

* Refactor HasIndexRebuilt endpoint to Index endpoint

* Remove unused usings

* Fix up DetailsExplanation

* Create dedicated SearchersViewModel

* Rename action

* Rename RebuildIndex to Rebuild

* Dont have changes in ExamineIndexModel

* Make values strongly typed instead of generic lists of strings

* Rename to non-plural

* Rename to non-plural

* Rename controller

* Introduce ITemporaryIndexingService

* Introduce ITemporaryIndexingService

* Add SearcherName to view model

* Move to new ExamineManagementControllerBase.cs

* Refactor ExamineManagerService

* Use init instead of setters

* Make properties explicitly on models

* Add DI

* Apply suggestions from code review

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

* Rename to IndexExamineManagementController

* Return ViewModel instead of exception

* Make view models non-nullable

* Add examine management extension point

* Rename to IndexingRebuilderService

* Move rebuild logic to service

* Fix up usages in IIndexingRebuilderService

* Fix up DI

* Fix OpenApi contract

* Implement CanRebuild on IIndexingRebuilderService.cs

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Update build script

* Add BuildProjectReferences=false to dotnet pack

* Internalize Umbraco.Cms.ManagementApi references

* Make Searchers endpoint return ActionResult (#13068)

* New backoffice - trees design (#12963)

* Refactor: Add default versioned back office route attribute

* Tree controller bases and first draft implementations for document, media and doctype

* Move tree item view models to appropriate location

* Fix missing parent

* Refactor user entity access for testability

* A bit of clean-up + handle user start nodes for items endpoint

* Implement foldersOnly for folder tree

* Items endpoint for document type tree

* Strongly typed action results

* Content + media recycle bin

* Correct return type for swagger

* Member type tree

* Rename user start node handling to make a little more sense

* Revert to faked admin start nodes in document tree

* Media type tree

* Data type tree

* Relation type tree

* Remove unused dependency from member type tree

* Correct documentation for member type tree endpoint response types

* Use icon constants

* Add templates tree

* Member group tree

* Document blueprint tree

* Partial views, scripts and stylesheets trees

* Static files tree

* Clarify "folders only" state

* Comments and improved readability

* Rename TreeControllerBase and TreeItemViewModel

* Move recycle bin controller base to its own namespace

* Moved tree base controllers to their own namespace

* Common base class for tree view models

* Remove ProblemDetails response type declaration from all actions

* Add OpenApiTag

* Various review comments

* Dictionary item tree

* Renamed all tree controllers to follow action/feature naming convention

* Handle client culture state for document tree

* Support "ignore user start nodes" for content and media + refactor how tree states work to make things more explicit

* Fix or postpone a few TODOs

* Make entity service able to paginate trashed children

* Handle sorting explicitly

* Re-apply VersionedApiBackOfficeRoute to install and upgrade controllers after merge

* Use PagedViewModel instead of PagedResult for all trees

* Explain the usage of UmbracoObjectTypes.Unknown

* Introduce and apply GetMany pattern for dictionary items

* Add a note about relation type caching

* Fix broken test build + add unit tests for new localization service methods

* Use new management API controller base

* Entity repository should build document entities for document blueprints when getting paged entities (same as it does when getting specific entities)

* Use Media type for Media recycle bin

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

* Move shared relation service to concrete implementations

* Use inclusive language

* Add 401 response type documentation to applicable trees

* Refactor entity load for folder tree controller base + ensure that folders are only included in the first result page

* Add (in-memory) pagination to dictionary tree

* Make file system controller honor paging parameters

* Support pagination in relation type tree

* Clarify method name a bit for detecting tree root path requests

* Update Open API schema to match new trees

* Move from page number and page size to skip/take (with temporary workaround for lack of property skip/take pagination in current DB implementation)

* Update OpenAPI schema to match skip/take

* Update OpenAPI schema

* Don't return paginated view models from "items" endpoints

* Update OpenApi schema

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

* Use pattern matching to check if items is not `JArray`

* Bump Smidge up to v4.1.1

* Removing X-XSS-Protection healthcheck

* Redirect to a return URL if one is present on the querystring when logging into the back office

* Fix issue 13023 - Cannot read properties of undefined (reading 'allowedActions')

* Implement playwright acceptance tests instead of cypress (#13069)

* fix up dependencies in package.json

* Change configs to playwright

* update types

* remove cypress

* add playwright

* Fix up imports

* Move up test files

* Fix up scripts

* Update user import

* Remove allowEditInvariantFromNonDefault=True.spec.ts

* Update docker container

* Run playwright on pipelines

* Install playwright

* change urls

* change to run playwright

* Update reporter

* create .env file when installing

* update pipelines

* Remove @in yml

* Update Yaml script to use New-Item

* Pipe object to Value

* Update yaml to use "" not {}

* Update localhost to proper port

* Push package-lock.json

* include dotenv in package.json

* Add back umbraco.config.ts

* Dont change launchSettings.json

* Fix up pipelines

* Change working directory

* Add logging

* Actually name the file

* Remove .env from path

* Add working directory

* Add working directory to script

* check env content

* Update more working dir

* Try making newline in YAML

* add quotes

* Try multiline infront of script

* Move top statement

* use https

* Update to localhost 44331

* ignore https in config

* Change linux to https

* add timeouts for tests

* Fix up url for linux

* Update docker to use port 44331 -> 5000

* increase timeout

* Update yaml

* Remove Cypress references and fix URL/port mapping

* Update umbraco-linux.docker

* Generate ASP.NET HTTPS development certificate

* Enable HTTPS development certificate in Docker

* Dont run failing tests

* Update HTTPS development certificate generation

* Copy nuget.config to correct location in Docker file

* do not run flaky test

* update outputdir

* Remove flaky tests

* Update to dot reporter

* Update to json-models-builders package

* Check if results folder exists

* Remove logging

* Use bash to find folder

* Dont use junit to report

* only publish if folder exists

* Add 5 retries for CI

* search correct folder

* Remove unused json file

* Use line reporter

* Remove umbraco.config.ts

* Remove more flaky test

* Add waits so we dont bombard SQLite

* Add page as parameter

* add page as parameter

* Remove flaky macro test

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>

* Fix comment of view property in `ConfigurationFieldAttribute` (#13077)

* Fix comment of view property in `ConfigurationFieldAttribute`

* Update description of key property as well

* Use char instead of string for DetectJson (#13019)

* Use char instead of string for DetectJson

* Use faster method

* Change DetectIsJon method

* Update acceptance test readme & scripts (#13078)

* Update readme to reflect the change to playwright

* Update test scripts

* update README

* update pipelines to run new script

* update package.json scripts

* dont include demo test in package.json

* Add creation of blueprint test

* Implement create test script

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

* Refactor event handler away from keyup to ng-change

* Don't use legacy icon for action delete

* Added nullability attribute to IsNullOrWhitespace

* Fixes umbraco/Umbraco-CMS.Accessibility.Issues #63 and #61

* Revert "Removing X-XSS-Protection healthcheck" (#13096)

This reverts commit 696475ebf2.

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

* New backoffice: New Api controllers (#12983)

* Create migrate Language controller to Umbraco.Cms:ManagementApi

* Add proper language mapping

* Update mapping to handle if language name is null

* Uncomment code

* Add new language view model

* Add LanguageViewModelMapping

* Add mapper registration

* Fix up AddMappers extension method

* Implement mapping IEnumerable of languages

* Change action signatures to ViewModel instead of model

* Seperate logic from controller into service

* Move LanguageService.cs

* Register service

* Fix up mapping

* Add null check to mapping instead of controller

* Map to ILanguage instead of implementation

* Fix up null check

* Implement ProblemDetailsBuilder.cs

* Rename duplicate method

* Use builder in actions

* Implement new Paged models

* Create language controller base

* Use pagedModel for GetAllLanguages

* Create GetAllLanguagesPaged method

* Split language controller into single APIs

* Fix up controllers with API versions

* Map Total property

* Fix up route and naming for GetLanguageController.cs

* Fix up naming for language controllers

* New folder structure

* Add culture controllers

* Map CultureInfos to paged CultureViewModel

* Remove wierd include in csproj

* Refactor controller to return pagedViewModel instead of dictionary

* Fix up mapping to map single and enumerable

* Register mapping

* Add apiversion to controller

* Add inheritdoc

* Create DictionaryControllerBase.cs

* Add delete controller

* Only use HttpDelete for deletes

* Check also if language exists in service

* Split Save action into Create & Update actions

* Update Http attributes on Create and update controllers

* Proper routing for delete controller

* Add api version

* Make action async

* Implement CreateDictionaryController

* Create DictionaryViewModel.cs

* Use viewmodel instead of values

* Create get by int DictionaryController

* Add view models

* Rename controller

* Rename DictionaryViewModel to DictionaryItemViewModel

* use created instead of ID

* Apply DataContract/Datamember to view model

* change to guid instead of Guid

* Use proper responses instead of return models when creating/updating

* Implement new IDictionaryService

* Implement new MoveController

* Use new service in mapper

* Remove unused method

* Add DictionaryViewModelMapDefinition

* Create MoveOrCopyViewModel

* Proper Http action

* Create UpdateDictionary controller

* Map IDictionaryItem to DictionaryViewModel

* Add JsonPatching

* Add UpdateDictionaryController.cs

* Map DictionaryTranslationsDisplays properly

* ParentId should be nullable

* Add new DictionaryTranslationViewModel.cs

* Remove translationViewModel

* Add Id and Key to DictionaryTranslationDisplay.cs

* Implement IDictionaryFactory.cs

* Create DictionaryViewModels and do not use IEntity

* Map to new view models instead of displays

* Register the factiories in the service container

* Remove newtonsoft

* Add serializing to and from PatchDocs

* Use JsonPatchViewModel instead of object type

* Add JsonPatch.Net to csproj

* Implement JsonPatchService.cs

* Register JsonPatchService

* Make model non-nullable

* Update controllers to use new attributes

* Rename MoveViewModel.cs

* Remove NameIsDirty as that is legacy from how we used to handle updating

* Add GetAllDictionaryController

* Add todo to DictionaryControllerBase

* Add ExportDictionaryController

* Add ImportDictionaryController

* Remove unused umbraco mapper

* Add upload dictionary controller

* Create Dictionary import view models

* Update UploadDictionaryController with view models

* Remove unused using

* Implement pagedviewmodel for GetAllDictionaryController.cs

* Add dictionary overview viewmodels

* Add mapping for DictionaryOverViewModel

* Update Dictionary controller to use new viewmodel

* Fix up attributes for UploadDictionaryController

* Make actions async

* Make controller bases abstract

* Fix after merge

* New backoffice: Analytics controller (#12957)

* Add AnalyticsControllerBase

* Add AnalyticsViewModel

* Add GetAnalyticsController

* Update ViewModel to use System.Text.Json

* Add SetAnalyticsController

* Add AnalyticsLevelViewModel

* Add GetAllAnalyticsController

* Add viewmodel factory

* Register factory for DI

* Use factory for creation of ViewModel

* Fix up AnalyticsLevelViewModel.cs

* Use analyticsLevelViewModel

* Add Enum validation to controller

* Add OpenApi attributes

* Add routing to GetAllAnalyticsController

* Rename IPagedViewModelFactory

* use new renamed PagedViewModelFactory

* Make actions async

* Make controller base abstract

* Fix up after merge

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

* New backoffice: Help controller (#12958)

* Add HelpControllerBase

* Add HelpPageViewModel

* Add GetHelpController

* Add viewmodel factory

* Register factory for DI

* Use PagedViewModelFactory for controller

* Update baseurl to be nullable

* Rename IPagedViewModelFactory

* Use new renamed IPagedViewModelFactory

* Dont use httpclient as field

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

* New backoffice: Relation controller (#12961)

* Add relation controller base

* Add commen about auth

* Add GetRelationController

* Use mapping to viewmodel

* Add RelationViewModel

* Add RelationViewModelsMapDefinition.cs

* Add viewmodel factory

* Register factory for DI

* Rename IPagedViewModelFactory

* Add RelationViewModelFactory

* Remove unused service

* Add GetByChildRelationController

* Add relationViewModelFactory to DI

* Add MappingBuilderExtensions

* Add relationViewModelsMapDefinition to DI

* Use PagedViewModel for child relations

* Add CreateMultiple

* Update GetRelationController to use factory instead of direct mapping

* Update GetByChildRelationController to use relationViewModelFactory

* Fix up after merge

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

* New backoffice: Tracked references controller (#12966)

* Add TrackedReferencesControllerBase.cs

* Add GetTrackedReferencesController

* Add relation model

* Add ITrackedReferencesRepository.cs

* Rename relation to RelationModel

* Add RelationMapDefinition.cs

* Add TrackedReferencesSkipTakeRepository

* Rename RelationModelMapDefinition

* Add new services to DI

* Rename RelationModel to RelationItemModel

* Implement TrackedReferencesSkipTakeService

* Formatting

* Add RelationItemViewModel.cs

* Add mapdefition

* Update TrackedReferencesController to use new PagedViewModel

* Add service to DI

* imlement proper routing

* Add async to GetTrackedReferencesController.cs

* Rename action to get

* Add DescendantTrackedReferencesController

* make filterMustBeIsDependency nullable

* Use count instead of capacity

* Rename controller

* Add MultipleTrackedReferencesController.cs

* Refactor TrackedReferencesService to not return pagedViewModel

* Remove TODO untill consensus on convention

* Formatting

* Delete old duplicate controller

* Fix up naming

* Fix up naming and fixed todo

* Fix up mapdefinition registrations

* Rename controllers

* Fix naming

* Fix nullable tree

* Fix up relation controller & action names

* Fix naming

* Fix up multiple to not be post

* Apply suggestions from code review

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

* Remove [ApiVersion] from each individual controller and added to base instead

* Added missing semi-colon

* Update all "non-async async" endpoints to return Task.FromResult

* Fixed up LanguageViewModels namespace

* Return proper status code

* Update xml documentation

* Rename GetAllCultureController

* Change return type attribute to proper Model

* Change return type attribute to correct model

* Add clarifying comment

* Change return type attribute to proper model

* Rename ById to by key

* Update DictionaryOverviewViewModel to use Key instead of ID

* Implement factory method to create viewModel instead of using services in mapper

* Fix up DictionaryItemViewModel to use Parent GUID instead of ID

* Update return type attribute to correct model

* Update key to actual GUID instead of string

* Update route to not include "delete"

* Remove redundant IActionResult specification

* Update responseType attribute to correct models

* Update OpenApiTag for DictionaryControllerBase

* Update ResponseType attribute to correct models

* update variable name to not be "XD"

* Update ResponseType attribute to correct model

* Update route to not include "update" as it is redundant

* Update produces responsetype attributes to correct models

* Use IJsonSerializer abstraction instead of JsonConvert directly

* Remove unused field

* Change ResponseType attribute to correct model

* change TrackedReferencesSkipTakeService to return pagedModels directly

* Remove duplicate DI

* change to better variable names

* Move RelationItemModel to core

* Remove empty folder

* Remove ITrackedReferencesSkipTakeService and add it to TrackedReferencesService

* remove TrackedReferencesSkipTakeRepository and add to TrackedReferencesRepository.cs

* Fix up TrackedReferencesService to not use SkipTake repository

* Remove AddRepositories from ManagementApiComposer

* Transition to ManagementApiBaseController

* Fixes ResponseType attribute to correct model

* Add loading files to service instead of having logic in controller

* Add todo comment

* Fix up routing for delete language

* Use problem details builder

* Add SystemTextJsonSerializer

* Add SystemTextJsonSerializer

* Remove unused usings

* Remove obsolete MoveDictionaryController

* Remove CreateDate and UpdateDate from DictionaryViewModel

* Change response type to correct model

* Remove PagedViewModelFactory.cs

* Add obsolete message

* Fix installer view models

A setter is required for the modelbinder to be able to do its work

* Update src/Umbraco.Cms.ManagementApi/Controllers/Analytics/SetAnalyticsController.cs

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

* Update ResponseType to correct Model

* Update comment

* Add FileUploadService

* Add DictionaryFactory.cs to handle creation of viewmodel

* Remove unused DI

* Rename actions & controllers to reflect eachother

* Update OpenApi.json

* Add dictionary to openapi

* Update in proper alphabetical order

* Add trackedReferences to openapi

* Fix open api doc

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

* Backport project cleanup from #12907

* Remove empty Directory.Build.props

* Fix GenerateAppsettingsSchema target

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

* Re-add missing JsonPatch.Net dependency

* Fix merge issues (redundant TargetFramework property and appsettings-schema.json generation)

* Fix and improve OpenAPI test assertion

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Erik-Jan Westendorp <erikjanwestendorp@outlook.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sean <29239704+Bakersbakebread@users.noreply.github.com>
Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk>
Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Busra Sengul <aysebusrasengul@gmail.com>
Co-authored-by: Justin Neville <justin@nevitech.co.uk>
Co-authored-by: Jeavon Leopold <jeavon@crumpled-dog.com>
Co-authored-by: Austin Gilbert <AGilbert@rbaconsulting.com>
Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com>
Co-authored-by: bakersbakebread <hello@seanthorne.co.uk>
Co-authored-by: Karl Butler <kbutler@carbonsix.digital>
2022-10-05 12:14:43 +02:00
Ronald BarendseandGitHub c9f6d6059d Add GitVersionBaseDirectory and fix typo 2022-10-03 16:10:22 +02:00
Andy ButlandandGitHub 7963b76d57 Adds additional deploy selector. (#13094) 2022-10-03 13:14:18 +02:00
Ronald BarendseandGitHub 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
Bjarke Berg d206df0cac Updated dependencies and cleaned up 2022-09-23 14:56:23 +02:00
510d8bf252 V11: Update the rich text editor TinyMCE to v6 (#13013)
* update 'tinymce' from v4 to v6

* add/remove plugin & file changes

* remove unsupported plugins

* update changes to tinymce api

* bump tinymce to 6.2.0

* reinstate fastdev task

* update rte prevalues

* fix styling of tinymce inline mode

* document new files

* update builtin allowed elements, plugins and styles

* update upload_image_handler to new format

* set correct startup plugins and config

* remove old config for "Paste from Word" which is no longer supported

* update naming in default toolbar

* replace fire() with dispatch()

* support resizing of other elements besides objects, e.g. tables

* replace fire() with dispatch()

* change classes for fullscreen styling

* handle special parsing of AngularJS json response

* remove deprecated tinymce options

* use EditorOptions API to get settings

* send in correct toolbar config

* update icons to use tinymce's new icon pack

* remove unused functions

* configure custom styles

* update docs

* add initial toolbars to grid rte

* change htmlId selector to support html id's with numbers

* remove pintoolbar as it is not compatible with tiny 6

* register custom option maxImageSize through the OptionsManager

* remove custom option

* Revert "register custom option maxImageSize through the OptionsManager"

This reverts commit 342354d6cd.

* register custom option maxImageSize and fetch through EditorOptions

* add rounding to forced image size

* remove fullscreen plugin as it is not available in prod build anyway and it does not work

* update API for uploadImages() function

* update string extensions IsFullPath to support more filepaths with new built-in Path.IsPathFullyQualified

* resolve TODO to switch to Path.IsPathFullyQualified supported from .NET Standard 2.1

* ensure that files are copied from the TEMP folder in the web root

* add dragstart event to drag-events series

* optimise isMediaPickerEnabled function with newer array function 'includes'

* add TEMP folder to gitignore (fx fileuploads)

* update selector for "Insert Macro" button in rte test

* remove old documentation

* Use content root instead of web root for uploaded images

* test IsFullPath without tricky UNC paths that are not useful

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-09-20 15:20:20 +02:00
Sebastiaan Janssen 084153157b Fix merge conflict 2022-09-20 13:30:26 +02:00
Sebastiaan Janssen 42c32e76f2 Merge branch 'v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/ManagementApiComposer.cs
2022-09-20 10:56:01 +02:00
Bjarke BergandSebastiaan Janssen d139f4acc0 Updated dependencies and fixed new NRT issues
(cherry picked from commit 803c044b60)
(cherry picked from commit b2b2903a6e)
2022-09-20 10:48:29 +02:00
Sebastiaan Janssen 40035aa629 Merge branch 'v10/dev' into v11/dev 2022-09-20 09:13:22 +02:00
Sebastiaan Janssen db5d05d641 Revert files that shouldn't change back in v11 2022-09-19 16:37:24 +02:00
Sebastiaan Janssen 85147fb5e8 Merge branch 'v10/dev' into v11/dev 2022-09-19 16:25:44 +02:00
Bjarke Berg 1ddfcba686 Updated more dependencies 2022-09-19 12:50:56 +02:00
2052 changed files with 43379 additions and 50709 deletions
-4
View File
@@ -22,7 +22,3 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
# https://docs.npmjs.com/cli/v6/using-npm/config#unsafe-perm
# Default: false if running as root, true otherwise (we are ROOT)
#RUN npm -g config set user vscode && npm -g config set unsafe-perm
# Generate and trust a local developer certificate for Kestrel
# This is needed for Kestrel to bind on https
RUN dotnet dev-certs https --trust
+52 -2
View File
@@ -6,6 +6,7 @@
"service": "app",
"workspaceFolder": "/workspace",
// Set *default* container specific settings.json values on container create.
"settings": {
"omnisharp.defaultLaunchSolution": "umbraco.sln",
@@ -13,13 +14,62 @@
"omnisharp.enableRoslynAnalyzers": true
},
"features": {
// Workaround until the image is updated to include the latest version of .NET Core - .NET7
// https://github.com/devcontainers/templates/issues/38#issuecomment-1310803259
"ghcr.io/devcontainers/features/dotnet:1": {
"version": "7"
},
// Adds SSH support to the container
// Allowing the Github CLI `gh codespace ssh` to work
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
// Adds SQLite feature from apt install
// Also adds the SQLite VSCode extension
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp"
],
// This is used in the prebuilds - so dotnet build (nuget restore and node stuff) is done
"updateContentCommand": "dotnet build umbraco.sln && dotnet dev-certs https --trust",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [9000, 5000, 25]
// Use 'forwardPorts' to make a list of ports inside the container available locallAdd "forwardPorts": [9000, 5000, 25],
// Port needed to help discover SMTP4Dev
"forwardPorts": [
5000
],
"portsAttributes": {
"5000": {
"label": "SMTP4Dev",
"protocol": "http",
"onAutoForward": "notify"
},
"9000": {
"label": "Umbraco HTTP",
"protocol": "http",
"onAutoForward": "notify"
},
"44331": {
"label": "Umbraco HTTPS",
"protocol": "https",
"onAutoForward": "notify"
}
},
"customizations": {
"codespaces": {
"openFiles": [
".github/codespaces-readme.md"
]
}
}
// [Optional] To reuse of your local HTTPS dev cert:
//
+1
View File
@@ -248,6 +248,7 @@ csharp_preserve_single_line_blocks = true
##########################################
[*.{cs,csx,cake,vb,vbx}]
dotnet_diagnostic.CS1591.severity = suggestion
##########################################
# Styles
+18 -149
View File
@@ -1,4 +1,4 @@
# Umbraco CMS Build
# Umbraco CMS Build
## Are you sure?
@@ -27,7 +27,7 @@ If you want to run a build without debugging, see [Building from source](#buildi
In order to build the Umbraco source code locally with Visual Studio Code, first make sure you have the following installed.
* [Visual Studio Code](https://code.visualstudio.com/)
* [dotnet SDK v6.0.2+](https://dotnet.microsoft.com/en-us/download)
* [dotnet SDK v7+](https://dotnet.microsoft.com/en-us/download)
* [Node.js v14+](https://nodejs.org/en/download/)
* npm v7+ (installed with Node.js)
* [Git command line](https://git-scm.com/download/)
@@ -72,7 +72,7 @@ When the page eventually loads in your web browser, you can follow the installer
In order to build the Umbraco source code locally with Visual Studio, first make sure you have the following installed.
* [Visual Studio 2019 v16.8+ with .NET 6.0.2+](https://visualstudio.microsoft.com/vs/) ([the community edition is free](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) for you to use to contribute to Open Source projects)
* [Visual Studio 2022 v17+ with .NET 7+](https://visualstudio.microsoft.com/vs/) ([the community edition is free](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) for you to use to contribute to Open Source projects)
* [Node.js v14+](https://nodejs.org/en/download/)
* npm v7+ (installed with Node.js)
* [Git command line](https://git-scm.com/download/)
@@ -99,111 +99,33 @@ When the page eventually loads in your web browser, you can follow the installer
Did you read ["Are you sure"](#are-you-sure)?
### Quick!
Do note that this is only required if you want to test out your custom changes in a separate site (not the one in the Umbraco.Web.UI), if you just want to test your changes you can run the included test site using: `dotnet run` from `src/Umbraco.Web.UI/`
To build Umbraco, fire up PowerShell and move to Umbraco's repository root (the directory that contains `src`, `build`, `LICENSE.md`...). There, trigger the build with the following command:
You may want to build a set of NuGet packages with your changes, this can be done using the dotnet pack command.
build/build.ps1
First enter the root of the project in a command line environment, and then use the following command to build the NuGet packages:
If you only see a build.bat-file, you're probably on the wrong branch. If you switch to the correct branch (v8/contrib) the file will appear and you can build it.
`dotnet pack -c Release -o Build.Out`
You might run into [Powershell quirks](#powershell-quirks).
This will restore and build the project using the release configuration, and put all the outputted files in a folder called `Build.Out`
If it runs without errors; Hooray! Now you can continue with [the next step](CONTRIBUTING.md#how-do-i-begin) and open the solution and build it.
You can then add these as a local NuGet feed using the following command:
`dotnet nuget add source <Path to Build.Out folder> -n MyLocalFeed`
### Build Infrastructure
The Umbraco Build infrastructure relies on a PowerShell object. The object can be retrieved with:
$ubuild = build/build.ps1 -get
The object exposes various properties and methods that can be used to fine-grain build Umbraco. Some, but not all, of them are detailed below.
#### Properties
The object exposes the following properties:
* `SolutionRoot`: the absolute path to the solution root
* `VisualStudio`: a Visual Studio object (see below)
* `NuGet`: the absolute path to the NuGet executable
* `Zip`: the absolute path to the 7Zip executable
* `VsWhere`: the absolute path to the VsWhere executable
* `NodePath`: the absolute path to the Node install
* `NpmPath`: the absolute path to the Npm install
The Visual Studio object is `null` when Visual Studio has not been detected (eg on VSTS). When not null, the object exposes the following properties:
* `Path`: Visual Studio installation path (eg some place under `Program Files`)
* `Major`: Visual Studio major version (eg `15` for VS 2017)
* `Minor`: Visual Studio minor version
* `MsBuild`: the absolute path to the MsBuild executable
#### GetUmbracoVersion
Gets an object representing the current Umbraco version. Example:
$v = $ubuild.GetUmbracoVersion()
Write-Host $v.Semver
The object exposes the following properties:
* `Semver`: the semver object representing the version
* `Release`: the main part of the version (eg `7.6.33`)
* `Comment`: the pre release part of the version (eg `alpha02`)
* `Build`: the build number part of the version (eg `1234`)
#### SetUmbracoVersion
Modifies Umbraco files with the new version.
>This entirely replaces the legacy `UmbracoVersion.txt` file. Do *not* edit version infos in files.
The version must be a valid semver version. It can include a *pre release* part (eg `alpha02`) and/or a *build number* (eg `1234`). Examples:
$ubuild.SetUmbracoVersion("7.6.33")
$ubuild.SetUmbracoVersion("7.6.33-alpha.2")
$ubuild.SetUmbracoVersion("7.6.33+1234")
$ubuild.SetUmbracoVersion("7.6.33-beta.5+5678")
#### Build
Builds Umbraco. Temporary files are generated in `build.tmp` while the actual artifacts (zip files, NuGet packages...) are produced in `build.out`. Example:
$ubuild.Build()
Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build.
**Note: web.config**
Building Umbraco requires a clean `web.config` file in the `Umbraco.Web.UI` project. If a `web.config` file already exists, the `pre-build` task (see below) will save it as `web.config.temp-build` and replace it with a clean copy of `web.Template.config`. The original file is replaced once it is safe to do so, by the `pre-packages` task.
#### Build-UmbracoDocs
Builds umbraco documentation. Temporary files are generated in `build.tmp` while the actual artifacts (docs...) are produced in `build.out`. Example:
Build-UmbracoDocs
Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build.
#### Verify-NuGet
Verifies that projects all require the same version of their dependencies, and that NuSpec files require versions that are consistent with projects. Example:
Verify-NuGet
This will add a local nuget feed with the name "MyLocalFeed" and you'll now be able to use your custom built NuGet packages.
### Cleaning up
Once the solution has been used to run a site, one may want to "reset" the solution in order to run a fresh new site again.
At the very minimum, you want
The easiest way to do this by deleting the following files and folders:
* src/Umbraco.Web.UI/appsettings.json
* src/Umbraco.Web.UI/umbraco/Data
git clean -Xdf src/Umbraco.Web.UI/App_Data
rm src/Umbraco.Web.UI/web.config
You only have to remove the connection strings from the appsettings, but removing the data folder ensures that the sqlite database gets deleted too.
Then, a simple 'Rebuild All' in Visual Studio will recreate a fresh `web.config` but should be quite fast (since it does not really need to rebuild anything).
The `clean` Git command force (`-f`) removes (`-X`, note the capital X) all files and directories (`-d`) that are ignored by Git.
Next time you run a build the `appsettings.json` file will be re-created in its default state.
This will leave media files and views around, but in most cases, it will be enough.
@@ -219,65 +141,12 @@ For git documentation see:
## Azure DevOps
Umbraco uses Azure DevOps for continuous integration, nightly builds and release builds. The Umbraco CMS project on DevOps [is available for anonymous users](https://umbraco.visualstudio.com/Umbraco%20Cms).
Umbraco uses Azure DevOps for continuous integration, nightly builds and release builds. The Umbraco CMS project on DevOps [is available for anonymous users](https://umbraco.visualstudio.com/Umbraco%20Cms)..
DevOps uses the `Build-Umbraco` command several times, each time passing a different *target* parameter. The supported targets are:
* `pre-build`: prepares the build
* `compile-belle`: compiles Belle
* `compile-umbraco`: compiles Umbraco
* `pre-tests`: prepares the tests
* `compile-tests`: compiles the tests
* `pre-packages`: prepares the packages
* `pkg-zip`: creates the zip files
* `pre-nuget`: prepares NuGet packages
* `pkg-nuget`: creates NuGet packages
All these targets are executed when `Build-Umbraco` is invoked without a parameter (or with the `all` parameter). On VSTS, compilations (of Umbraco and tests) are performed by dedicated DevOps tasks. Similarly, creating the NuGet packages is also performed by dedicated DevOps tasks.
Finally, the produced artifacts are published in two containers that can be downloaded from DevOps: `zips` contains the zip files while `nuget` contains the NuGet packages.
>During a DevOps build, some environment `UMBRACO_*` variables are exported by the `pre-build` target and can be reused in other targets *and* in DevOps tasks. The `UMBRACO_TMP` environment variable is used in `Umbraco.Tests` to disable some tests that have issues with DevOps at the moment.
The produced artifacts are published in a container that can be downloaded from DevOps called "nupkg" which contains all the NuGet packages that got built.
## Quirks
### PowerShell Quirks
There is a good chance that running `build.ps1` ends up in error, with messages such as
>The file ...\build.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies.
PowerShell has *Execution Policies* that may prevent the script from running. You can check the current policies with:
PS> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine RemoteSigned
Policies can be `Restricted`, `AllSigned`, `RemoteSigned`, `Unrestricted` and `Bypass`. Scopes can be `MachinePolicy`, `UserPolicy`, `Process`, `CurrentUser`, `LocalMachine`. You need the current policy to be `RemoteSigned`&mdash;as long as it is `Undefined`, the script cannot run. You can change the current user policy with:
PS> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Alternatively, you can do it at machine level, from within an elevated PowerShell session:
PS> Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned
And *then* the script should run. It *might* however still complain about executing scripts, with messages such as:
>Security warning - Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run ...\build.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):
This is usually caused by the scripts being *blocked*. And that usually happens when the source code has been downloaded as a Zip file. When Windows downloads Zip files, they are marked as *blocked* (technically, they have a Zone.Identifier alternate data stream, with a value of "3" to indicate that they were downloaded from the Internet). And when such a Zip file is un-zipped, each and every single file is also marked as blocked.
The best solution is to unblock the Zip file before un-zipping: right-click the files, open *Properties*, and there should be a *Unblock* checkbox at the bottom of the dialog. If, however, the Zip file has already been un-zipped, it is possible to recursively unblock all files from PowerShell with:
PS> Get-ChildItem -Recurse *.* | Unblock-File
### Git Quirks
Git might have issues dealing with long file paths during build. You may want/need to enable `core.longpaths` support (see [this page](https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path) for details).
+39 -15
View File
@@ -19,6 +19,7 @@ We also encourage community members to feel free to comment on others' pull requ
* [What can I contribute?](#what-can-i-contribute)
+ [Making larger changes](#making-larger-changes)
+ [Pull request or package?](#pull-request-or-package)
+ [Unwanted changes](#unwanted-changes)
+ [Ownership and copyright](#ownership-and-copyright)
- [Finding your first issue: Up for grabs](#finding-your-first-issue-up-for-grabs)
- [Making your changes](#making-your-changes)
@@ -69,6 +70,25 @@ If you're unsure about whether your changes belong in the core Umbraco CMS or if
If it doesnt fit in CMS right now, we will likely encourage you to make it into a package instead. A package is a great way to check out popularity of a feature, learn how people use it, validate good usability and fix bugs. Eventually, a package could "graduate" to be included in the CMS.
#### Unwanted changes
While most changes are welcome, there are certain types of changes that are discouraged and might get your pull request refused.
Of course this will depend heavily on the specific change, but please take the following examples in mind.
- **Breaking changes (code and/or behavioral) 💥** - sometimes it can be a bit hard to know if a change is breaking or not. Fortunately, if it relates to code, the build will fail and warn you.
- **Large refactors 🤯** - the larger the refactor, the larger the probability of introducing new bugs/issues.
- **Changes to obsolete code and/or property editors ✍️**
- **Adding new config options 🦾** - while having more flexibility is (most of the times) better, having too many options can also become overwhelming/confusing, especially if there are other (good/simple) ways to achieve it.
- **Whitespace changes 🫥** - while some of our files might not follow the formatting/whitespace rules (mostly old ones), changing several of them in one go would cause major merge conflicts with open pull requests or other work in progress. Do feel free to fix these when you are working on another issue/feature and end up "touching" those files!
- **Adding new extension/helper methods ✋** - keep in mind that more code also means more to maintain, so if a helper is only meaningful for a few, it might not be worth adding it to the core.
While these are only a few examples, it is important to ask yourself these questions before making a pull request:
- How many will benefit from this change?
- Are there other ways to achieve this? And if so, how do they compare?
- How maintainable is the change?
- What would be the effort to test it properly?
- Do the benefits outweigh the risks?
#### Ownership and copyright
It is your responsibility to make sure that you're allowed to share the code you're providing us. For example, you should have permission from your employer or customer to share code.
@@ -103,7 +123,7 @@ Great question! The short version goes like this:
1. **Switch to the correct branch**
Switch to the `v10/contrib` branch
Switch to the `contrib` branch
1. **Build**
@@ -111,7 +131,7 @@ Great question! The short version goes like this:
1. **Branch**
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `v10/contrib`, create a new branch first.
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `contrib`, create a new branch first.
1. **Change**
@@ -121,7 +141,7 @@ Great question! The short version goes like this:
Done? Yay! 🎉
Remember to commit to your new `temp` branch, and don't commit to `v10/contrib`. Then you can push the changes up to your fork on GitHub.
Remember to commit to your new `temp` branch, and don't commit to `contrib`. Then you can push the changes up to your fork on GitHub.
#### Keeping your Umbraco fork in sync with the main repository
[sync fork]: #keeping-your-umbraco-fork-in-sync-with-the-main-repository
@@ -138,10 +158,10 @@ Then when you want to get the changes from the main repository:
```
git fetch upstream
git rebase upstream/v10/contrib
git rebase upstream/contrib
```
In this command we're syncing with the `v10/contrib` branch, but you can of course choose another one if needed.
In this command we're syncing with the `contrib` branch, but you can of course choose another one if needed.
[More information on how this works can be found on the thoughtbot blog.][sync fork ext]
@@ -169,7 +189,7 @@ We recommend you to [sync with our repository][sync fork] before you submit your
GitHub will have picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.
![Create a pull request](img/createpullrequest.png)
We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to something, usually `v10/contrib`. If you are working on v9, this is the branch you should be targeting.
We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to `contrib`. This is the branch you should be targeting.
Please note: we are no longer accepting features for v8 and below but will continue to merge security fixes as and when they arise.
@@ -208,11 +228,13 @@ There will be times that we really like your proposed changes and well finish
The Core Contributors team consists of one member of Umbraco HQ, [Sebastiaan][Sebastiaan], who gets assistance from the following community members who have committed to volunteering their free time:
- [Nathan Woulfe][Nathan Woulfe]
- [Joe Glombek][Joe Glombek]
- [Laura Weatherhead][Laura Weatherhead]
- [Busra Sengul][Busra Sengul]
- [Emma Garland][Emma Garland]
- [George Bidder][George Bidder]
- [Jason Elkin][Jason Elkin]
- [Laura Neto][Laura Neto]
- [Michael Latouche][Michael Latouche]
- [Owain Williams][Owain Williams]
- [Sebastiaan][Sebastiaan]
These wonderful people aim to provide you with a reply to your PR, review and test out your changes and on occasions, they might ask more questions. If they are happy with your work, they'll let Umbraco HQ know by approving the PR. HQ will have final sign-off and will check the work again before it is merged.
@@ -227,12 +249,14 @@ These wonderful people aim to provide you with a reply to your PR, review and te
<!-- External -->
[Nathan Woulfe]: https://github.com/nathanwoulfe "Nathan's GitHub profile"
[Joe Glombek]: https://github.com/glombek "Joe's GitHub profile"
[Laura Weatherhead]: https://github.com/lssweatherhead "Laura's GitHub profile"
[Busra Sengul]: https://github.com/busrasengul "Busra's GitHub profile"
[Emma Garland]: https://github.com/emmagarland "Emma's GitHub profile"
[George Bidder]: https://github.com/georgebid "George's GitHub profile"
[Jason Elkin]: https://github.com/jasonelkin "Jason's GitHub profile"
[Kyle Eck]: https://github.com/teckspeed "Kyle's GitHub profile"
[Laura Neto]: https://github.com/lauraneto "Laura's GitHub profile"
[Michael Latouche]: https://github.com/mikecp "Michael's GitHub profile"
[Owain Williams]: https://github.com/OwainWilliams "Owain's GitHub profile"
[Sebastiaan]: https://github.com/nul800sebastiaan "Senastiaan's GitHub profile"
[Sebastiaan]: https://github.com/nul800sebastiaan "Sebastiaan's GitHub profile"
[ Umbrabot ]: https://github.com/umbrabot
[git flow]: https://jeffkreeftmeijer.com/git-flow/ "An explanation of git flow"
[sync fork ext]: http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated "Details on keeping a git fork updated"
+11 -2
View File
@@ -1,4 +1,12 @@
# [Umbraco CMS](https://umbraco.com) &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md) [![Build status](https://umbraco.visualstudio.com/Umbraco%20Cms/_apis/build/status/Cms%208%20Continuous?branchName=v8/contrib)](https://umbraco.visualstudio.com/Umbraco%20Cms/_build?definitionId=75) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) [![Twitter](https://img.shields.io/twitter/follow/umbraco.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=umbraco) [![Discord](https://img.shields.io/discord/869656431308189746)](https://discord.gg/umbraco)
# [Umbraco CMS](https://umbraco.com)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![Follow Umbraco on Twitter](https://img.shields.io/badge/Follow-blue?logo=twitter&logoColor=fff)](https://twitter.com/intent/follow?screen_name=umbraco)
[![Chat about Umbraco on Discord](https://img.shields.io/discord/869656431308189746?logo=discord&logoColor=fff)](https://discord.gg/umbraco)
[![Read what's going on in the Umbraco Discord chat now](https://img.shields.io/badge/read-discord-blue)](https://discord-chats.umbraco.com)
[![Build status](https://img.shields.io/azure-devops/build/umbraco/Umbraco%2520Cms/301?logo=azurepipelines&label=Azure%20Pipelines)](https://umbraco.visualstudio.com/Umbraco%20Cms/_build?definitionId=301)
[![Open in GitHub Codespaces](https://img.shields.io/badge/Open%20in%20GitHub%20Codespaces-525252?logo=github)](https://github.com/codespaces/new?hide_repo_select=true&ref=contrib&repo=10601208&machine=basicLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestEurope)
Umbraco is the friendliest, most flexible and fastest growing ASP.NET CMS, and used by more than 500,000 websites worldwide. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.
@@ -31,7 +39,8 @@ The documentation for Umbraco CMS can be found [on Our Umbraco](https://docs.umb
Our friendly community is available 24/7 at the community hub, we call ["Our Umbraco"](https://our.umbraco.com/). Our Umbraco features forums for questions and answers, documentation, downloadable plugins for Umbraco, and a rich collection of community resources.
Besides "Our", we all support each other also via Twitter: [Umbraco HQ](https://twitter.com/umbraco), [Release Updates](https://twitter.com/umbracoproject), [#umbraco](https://twitter.com/hashtag/umbraco)
Besides "Our", we all support each other in our [Community Discord Server](https://discord.gg/umbraco) and on Twitter: [Umbraco HQ](https://twitter.com/umbraco), [Release Updates](https://twitter.com/umbracoproject), [#umbraco](https://twitter.com/hashtag/umbraco)
## Contributing
+21
View File
@@ -0,0 +1,21 @@
# GitHub CodeSpaces
Umbraco source code can be edited inside the browser with VSCode and CodeSpaces.
This development environment comes with all the tools you need to build Umbraco source code.
## Debugging and Running
From VSCode browse to the Run and Debug section and then click the green button. This will build the Umbraco source code and attach a debugger and launch the site.
## Default Umbraco credentials
Username: test@umbraco.com
Password: password1234
## Test Email Server
A SMTP4Dev instance for testing email is available on port 5000.
## SQLite Database
The SQLite extension is preinstalled and allows you to open, query, edit the data inside the Umbraco SQLite database for ease of use.
@@ -1,58 +0,0 @@
name: Add issues to review project
on:
issues:
types:
- opened
permissions:
contents: read
jobs:
get-user-type:
runs-on: ubuntu-latest
outputs:
ignored: ${{ steps.set-output.outputs.ignored }}
steps:
- name: Install dependencies
run: |
npm install node-fetch@2
- uses: actions/github-script@v5
name: "Determing HQ user or not"
id: set-output
with:
script: |
const fetch = require('node-fetch');
const response = await fetch('https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/users/IsIgnoredUser', {
method: 'post',
body: JSON.stringify('${{ github.event.issue.user.login }}'),
headers: {
'Authorization': 'Bearer ${{ secrets.OUR_BOT_API_TOKEN }}',
'Content-Type': 'application/json'
}
});
var isIgnoredUser = true;
try {
if(response.status === 200) {
const data = await response.text();
isIgnoredUser = data === "true";
} else {
console.log("Returned data not indicate success:", response.status);
}
} catch(error) {
console.log(error);
};
core.setOutput("ignored", isIgnoredUser);
console.log("Ignored is", isIgnoredUser);
add-to-project:
permissions:
repository-projects: write # for actions/add-to-project
if: needs.get-user-type.outputs.ignored == 'false'
runs-on: ubuntu-latest
needs: [get-user-type]
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/${{ github.repository_owner }}/projects/21
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
+2 -2
View File
@@ -15,8 +15,8 @@ permissions:
contents: read
env:
dotnetVersion: 6.x
dotnetIncludePreviewVersions: false
dotnetVersion: 7.x
dotnetIncludePreviewVersions: true
solution: umbraco.sln
buildConfiguration: SkipTests
DOTNET_NOLOGO: true
@@ -18,8 +18,6 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const fetch = require('node-fetch')
const response = await fetch('https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/comments/PostComment', {
method: 'post',
body: JSON.stringify({
@@ -20,7 +20,6 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const fetch = require('node-fetch');
const response = await fetch('https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/comments/PostComment', {
method: 'post',
body: JSON.stringify({
+7 -1
View File
@@ -101,6 +101,12 @@ preserve.belle
/tests/Umbraco.Tests.UnitTests/[Uu]mbraco/[Dd]ata/TEMP/
# Ignore auto-generated schema
/src/Umbraco.Cms/appsettings-schema.json
/src/Umbraco.Cms.Targets/tasks/
/src/Umbraco.Cms.Targets/appsettings-schema.*.json
/src/Umbraco.Web.UI/appsettings-schema.json
/src/Umbraco.Web.UI/appsettings-schema.*.json
/tests/Umbraco.Tests.Integration/appsettings-schema.json
/tests/Umbraco.Tests.Integration/appsettings-schema.*.json
/src/Umbraco.Cms/appsettings-schema.json
playwright-report
trace.zip
-1
View File
@@ -8,7 +8,6 @@
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Dotnet build",
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
+7 -5
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Company>Umbraco HQ</Company>
<Authors>Umbraco</Authors>
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
@@ -28,18 +29,19 @@
<!-- Package Validation -->
<PropertyGroup>
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>10.0.0</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion>12.0.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.113" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.Code" Version="2.0.0" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup>
+30 -57
View File
@@ -43,9 +43,9 @@ parameters:
default: ' '
variables:
nodeVersion: 14.18.1
dotnetVersion: 6.x
dotnetIncludePreviewVersions: false
nodeVersion: 18.16.x
dotnetVersion: 7.x
dotnetIncludePreviewVersions: true
solution: umbraco.sln
buildConfiguration: Release
UMBRACO__CMS__GLOBAL__ID: 00000000-0000-0000-0000-000000000042
@@ -92,7 +92,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- task: DotNetCoreCLI@2
displayName: Run dotnet restore
@@ -100,44 +99,12 @@ stages:
command: restore
projects: $(solution)
- task: DotNetCoreCLI@2
displayName: Run dotnet build
name: build
displayName: Run dotnet build and generate NuGet packages
inputs:
command: build
projects: $(solution)
arguments: '--configuration $(buildConfiguration) --no-restore -p:ContinuousIntegrationBuild=true'
- script: |
version="$(Build.BuildNumber)"
echo "varsion: $version"
major="$(echo $version | cut -d '.' -f 1)"
echo "major version: $major"
echo "##vso[task.setvariable variable=majorVersion;isOutput=true]$major"
displayName: Set major version
name: determineMajorVersion
- task: PowerShell@2
displayName: Prepare nupkg
inputs:
targetType: inline
script: |
$umbracoVersion = "$(Build.BuildNumber)" -replace "\+",".g"
$templatePaths = Get-ChildItem 'templates/**/.template.config/template.json'
foreach ($templatePath in $templatePaths) {
$a = Get-Content $templatePath -Raw | ConvertFrom-Json
if ($a.symbols -and $a.symbols.UmbracoVersion) {
$a.symbols.UmbracoVersion.defaultValue = $umbracoVersion
$a | ConvertTo-Json -Depth 32 | Set-Content $templatePath
}
}
dotnet pack $(solution) --configuration $(buildConfiguration) -p:BuildProjectReferences=false --output $(Build.ArtifactStagingDirectory)/nupkg
- script: |
sha="$(Build.SourceVersion)"
sha=${sha:0:7}
buildnumber="$(Build.BuildNumber)_$(Build.BuildId)_$sha"
echo "##vso[build.updatebuildnumber]$buildnumber"
displayName: Update build number
arguments: '--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg'
- task: PublishPipelineArtifact@1
displayName: Publish nupkg
inputs:
@@ -150,11 +117,11 @@ stages:
artifactName: build_output
- stage: Build_Docs
condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), ${{parameters.buildApiDocs}}))
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.buildApiDocs}}))
displayName: Prepare API Documentation
dependsOn: Build
variables:
umbracoMajorVersion: $[ stageDependencies.Build.A.outputs['determineMajorVersion.majorVersion'] ]
umbracoMajorVersion: $[ stageDependencies.Build.A.outputs['build.NBGV_VersionMajor'] ]
jobs:
# C# API Reference
- job:
@@ -208,9 +175,9 @@ stages:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
displayName: Use Node.js 10.15.0
displayName: Use Node.js 10.15.x
inputs:
versionSpec: 10.15.0 # Won't work with higher versions
versionSpec: 10.15.x # Won't work with higher versions
- script: |
npm ci --no-fund --no-audit --prefer-offline
npx gulp docs
@@ -266,7 +233,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- task: DotNetCoreCLI@2
displayName: Run dotnet test
@@ -279,6 +245,8 @@ stages:
- stage: Integration
displayName: Integration Tests
dependsOn: Build
variables:
releaseTestFilter: eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True')
jobs:
# Integration Tests (SQLite)
- job:
@@ -303,7 +271,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- task: DotNetCoreCLI@2
displayName: Run dotnet test Windows
@@ -312,7 +279,7 @@ stages:
command: test
projects: '**/*.Tests.Integration.csproj'
testRunTitle: Integration Tests SQLite - $(Agent.OS)
${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}:
${{ if or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
${{ else }}:
arguments: '--configuration $(buildConfiguration) ${{parameters.integrationNonReleaseTestFilter}}'
@@ -326,7 +293,7 @@ stages:
command: test
projects: '**/*.Tests.Integration.csproj'
testRunTitle: Integration Tests SQLite - $(Agent.OS)
${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}:
${{ if or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
${{ else }}:
arguments: '--configuration $(buildConfiguration) ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
@@ -337,7 +304,7 @@ stages:
# Integration Tests (SQL Server)
- job:
timeoutInMinutes: 120
condition: or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), ${{parameters.sqlServerIntegrationTests}})
condition: or(eq(stageDependencies.Build.A.outputs['build.NBGV_PublicRelease'], 'True'), ${{parameters.sqlServerIntegrationTests}})
displayName: Integration Tests (SQL Server)
strategy:
matrix:
@@ -348,7 +315,7 @@ stages:
Linux:
vmImage: 'ubuntu-latest'
testDb: SqlServer
connectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);'
connectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=true'
pool:
vmImage: $(vmImage)
variables:
@@ -359,6 +326,11 @@ stages:
inputs:
artifact: build_output
path: $(Build.SourcesDirectory)
- task: UseDotNet@2
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
includePreviewVersions: $(dotnetIncludePreviewVersions)
- powershell: sqllocaldb start mssqllocaldb
displayName: Start localdb (Windows only)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
@@ -372,7 +344,7 @@ stages:
command: test
projects: '**/*.Tests.Integration.csproj'
testRunTitle: Integration Tests SQL Server - $(Agent.OS)
${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}:
${{ if or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
${{ else }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}'
@@ -387,7 +359,7 @@ stages:
command: test
projects: '**/*.Tests.Integration.csproj'
testRunTitle: Integration Tests SQL Server - $(Agent.OS)
${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}:
${{ if or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
${{ else }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
@@ -418,6 +390,7 @@ stages:
dockerImageName: umbraco-linux
Windows:
vmImage: 'windows-latest'
DOTNET_GENERATE_ASPNET_CERTIFICATE: true # Automatically generate HTTPS development certificate on Windows
# Enable console logging in Release mode
Serilog__WriteTo__0__Name: Async
Serilog__WriteTo__0__Args__configure__0__Name: Console
@@ -471,7 +444,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- pwsh: |
$sha = 'g$(Build.SourceVersion)'.substring(0, 8)
@@ -507,6 +479,8 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
- pwsh: |
docker logs $(dockerImageName) > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1
docker stop $(dockerImageName)
@@ -545,7 +519,7 @@ stages:
- Unit
- Integration
# - E2E # TODO: Enable when stable.
condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), ${{parameters.myGetDeploy}}))
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.myGetDeploy}}))
jobs:
- job:
displayName: Push to pre-release feed
@@ -563,13 +537,12 @@ stages:
packagesToPush: $(Build.ArtifactStagingDirectory)/**/*.nupkg
nuGetFeedType: 'external'
publishFeedCredentials: 'MyGet - Pre-releases'
- stage: Deploy_NuGet
displayName: NuGet release
dependsOn:
- Deploy_MyGet
- Build_Docs
condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), ${{parameters.nuGetDeploy}}))
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.nuGetDeploy}}))
jobs:
- job:
displayName: Push to NuGet
@@ -592,12 +565,12 @@ stages:
pool:
vmImage: 'windows-latest' # Apparently AzureFileCopy is windows only :(
variables:
umbracoMajorVersion: $[ stageDependencies.Build.A.outputs['determineMajorVersion.majorVersion'] ]
umbracoMajorVersion: $[ stageDependencies.Build.A.outputs['build.NBGV_VersionMajor'] ]
displayName: Upload API Documention
dependsOn:
- Build
- Deploy_NuGet
condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), ${{parameters.uploadApiDocs}}))
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.uploadApiDocs}}))
jobs:
- job:
displayName: Upload C# Docs
-53
View File
@@ -1,53 +0,0 @@
name: issue-first-response
on:
issues:
types: [opened]
jobs:
send-response:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Install dependencies
run: |
npm install node-fetch@2
- name: Fetch random comment 🗣️ and add it to the issue
uses: actions/github-script@v6
with:
script: |
const fetch = require('node-fetch')
const response = await fetch('https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/comments/PostComment', {
method: 'post',
body: JSON.stringify({
repo: '${{ github.repository }}',
number: '${{ github.event.number }}',
actor: '${{ github.actor }}',
commentType: 'opened-issue-first-comment'
}),
headers: {
'Authorization': 'Bearer ${{ secrets.OUR_BOT_API_TOKEN }}',
'Content-Type': 'application/json'
}
});
try {
const data = await response.text();
if(response.status === 200 && data !== '') {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: data
});
} else {
console.log("Status code did not indicate success:", response.status);
console.log("Returned data:", data);
}
} catch(error) {
console.log(error);
}
-152
View File
@@ -1,152 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Umbraco.Cms.Core.Configuration;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Deploy.Core.Configuration.DebugConfiguration;
using Umbraco.Deploy.Core.Configuration.DeployConfiguration;
using Umbraco.Deploy.Core.Configuration.DeployProjectConfiguration;
using Umbraco.Forms.Core.Configuration;
using SecuritySettings = Umbraco.Cms.Core.Configuration.Models.SecuritySettings;
namespace JsonSchema
{
internal class AppSettings
{
/// <summary>
/// Gets or sets the Umbraco
/// </summary>
public UmbracoDefinition? Umbraco { get; set; }
/// <summary>
/// Configuration of Umbraco CMS and packages
/// </summary>
internal class UmbracoDefinition
{
// ReSharper disable once InconsistentNaming
public CmsDefinition? CMS { get; set; }
public FormsDefinition? Forms { get; set; }
public DeployDefinition? Deploy { get; set; }
/// <summary>
/// Configurations for the Umbraco CMS
/// </summary>
public class CmsDefinition
{
public ContentSettings? Content { get; set; }
public CoreDebugSettings? Debug { get; set; }
public ExceptionFilterSettings? ExceptionFilter { get; set; }
public ModelsBuilderSettings? ModelsBuilder { get; set; }
public GlobalSettings? Global { get; set; }
public HealthChecksSettings? HealthChecks { get; set; }
public HostingSettings? Hosting { get; set; }
public ImagingSettings? Imaging { get; set; }
public IndexCreatorSettings? Examine { get; set; }
public IndexingSettings? Indexing { get; set; }
public KeepAliveSettings? KeepAlive { get; set; }
public LoggingSettings? Logging { get; set; }
public NuCacheSettings? NuCache { get; set; }
public RequestHandlerSettings? RequestHandler { get; set; }
public RuntimeSettings? Runtime { get; set; }
public SecuritySettings? Security { get; set; }
public TourSettings? Tours { get; set; }
public TypeFinderSettings? TypeFinder { get; set; }
public WebRoutingSettings? WebRouting { get; set; }
public UmbracoPluginSettings? Plugins { get; set; }
public UnattendedSettings? Unattended { get; set; }
public RichTextEditorSettings? RichTextEditor { get; set; }
public RuntimeMinificationSettings? RuntimeMinification { get; set; }
public BasicAuthSettings? BasicAuth { get; set; }
public PackageMigrationSettings? PackageMigration { get; set; }
public LegacyPasswordMigrationSettings? LegacyPasswordMigration { get; set; }
public ContentDashboardSettings? ContentDashboard { get; set; }
public HelpPageSettings? HelpPage { get; set; }
public InstallDefaultData? InstallDefaultData { get; set; }
public DataTypesSettings? DataTypes { get; set; }
public MarketplaceSettings? Marketplace { get; set; }
}
/// <summary>
/// Configurations for the Umbraco CMS InstallDefaultData configuration.
/// </summary>
public class InstallDefaultData
{
public InstallDefaultDataSettings? Languages { get; set; }
public InstallDefaultDataSettings? DataTypes { get; set; }
public InstallDefaultDataSettings? MediaTypes { get; set; }
public InstallDefaultDataSettings? MemberTypes { get; set; }
}
/// <summary>
/// Configurations for the Umbraco Forms package to Umbraco CMS
/// </summary>
public class FormsDefinition
{
public FormDesignSettings? FormDesign { get; set; }
public PackageOptionSettings? Options { get; set; }
public Umbraco.Forms.Core.Configuration.SecuritySettings? Security { get; set; }
public FieldTypesDefinition? FieldTypes { get; set; }
/// <summary>
/// Configurations for the Umbraco Forms Field Types
/// </summary>
public class FieldTypesDefinition
{
public DatePickerSettings? DatePicker { get; set; }
public Recaptcha2Settings? Recaptcha2 { get; set; }
public Recaptcha3Settings? Recaptcha3 { get; set; }
}
}
/// <summary>
/// Configurations for the Umbraco Deploy package to Umbraco CMS
/// </summary>
public class DeployDefinition
{
public DeploySettings? Settings { get; set; }
public DeployProjectConfig? Project { get; set; }
public DebugSettings? Debug { get; set; }
}
}
}
}
@@ -1,13 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
using NJsonSchema.Generation;
namespace JsonSchema
{
internal class NamespacePrefixedSchemaNameGenerator : DefaultSchemaNameGenerator
{
public override string Generate(Type type) => type.Namespace?.Replace(".", string.Empty) + base.Generate(type);
}
}
-13
View File
@@ -1,13 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using CommandLine;
namespace JsonSchema
{
internal class Options
{
[Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "appsettings-schema.json")]
public string OutputFile { get; set; } = null!;
}
}
-41
View File
@@ -1,41 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
using System.IO;
using System.Threading.Tasks;
using CommandLine;
namespace JsonSchema
{
internal class Program
{
public static async Task Main(string[] args)
{
try
{
await Parser.Default.ParseArguments<Options>(args)
.WithParsedAsync(Execute);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
private static async Task Execute(Options options)
{
var generator = new UmbracoJsonSchemaGenerator();
var schema = await generator.Generate();
var path = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, options.OutputFile));
Console.WriteLine("Path to use {0}", path);
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
Console.WriteLine("Ensured directory exists");
await File.WriteAllTextAsync(path, schema);
Console.WriteLine("File written at {0}", path);
}
}
}
@@ -1,58 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NJsonSchema.Generation;
using Umbraco.Cms.Core.Configuration.Models;
namespace JsonSchema
{
/// <summary>
/// Generator of the JsonSchema for AppSettings.json including A specific Umbraco version.
/// </summary>
public class UmbracoJsonSchemaGenerator
{
private static readonly HttpClient s_client = new ();
private readonly JsonSchemaGenerator _innerGenerator;
/// <summary>
/// Initializes a new instance of the <see cref="UmbracoJsonSchemaGenerator" /> class.
/// </summary>
public UmbracoJsonSchemaGenerator()
=> _innerGenerator = new JsonSchemaGenerator(new UmbracoJsonSchemaGeneratorSettings());
/// <summary>
/// Generates a json representing the JsonSchema for AppSettings.json including A specific Umbraco version..
/// </summary>
public async Task<string> Generate()
{
JObject umbracoSchema = GenerateUmbracoSchema();
JObject officialSchema = await GetOfficialAppSettingsSchema();
officialSchema.Merge(umbracoSchema);
return officialSchema.ToString();
}
private async Task<JObject> GetOfficialAppSettingsSchema()
{
HttpResponseMessage response = await s_client.GetAsync("https://json.schemastore.org/appsettings.json")
.ConfigureAwait(false);
var result = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<JObject>(result)!;
}
private JObject GenerateUmbracoSchema()
{
NJsonSchema.JsonSchema schema = _innerGenerator.Generate(typeof(AppSettings));
// TODO: when the "UmbracoPath" setter is removed from "GlobalSettings" (scheduled for V12), remove this line as well
schema.Definitions["UmbracoCmsCoreConfigurationModelsGlobalSettings"]?.Properties?.Remove(nameof(GlobalSettings.UmbracoPath));
return JsonConvert.DeserializeObject<JObject>(schema.ToJson())!;
}
}
}
@@ -1,43 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using NJsonSchema.Generation;
namespace JsonSchema
{
/// <inheritdoc />
public class UmbracoJsonSchemaGeneratorSettings : JsonSchemaGeneratorSettings
{
/// <summary>
/// Initializes a new instance of the <see cref="UmbracoJsonSchemaGeneratorSettings"/> class.
/// </summary>
public UmbracoJsonSchemaGeneratorSettings()
{
AlwaysAllowAdditionalObjectProperties = true;
SerializerSettings = new JsonSerializerSettings()
{
ContractResolver = new WritablePropertiesOnlyResolver()
};
DefaultReferenceTypeNullHandling = ReferenceTypeNullHandling.NotNull;
SchemaNameGenerator = new NamespacePrefixedSchemaNameGenerator();
SerializerSettings.Converters.Add(new StringEnumConverter());
IgnoreObsoleteProperties = true;
GenerateExamples = true;
}
private class WritablePropertiesOnlyResolver : DefaultContractResolver
{
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
{
IList<JsonProperty> props = base.CreateProperties(type, memberSerialization);
return props.Where(p => p.Writable).ToList();
}
}
}
}
@@ -0,0 +1,9 @@
namespace Umbraco.Cms.Api.Common.Attributes;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class MapToApiAttribute : Attribute
{
public MapToApiAttribute(string apiName) => ApiName = apiName;
public string ApiName { get; }
}
@@ -1,13 +1,12 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Umbraco.Cms.ManagementApi.Builders;
namespace Umbraco.Cms.Api.Common.Builders;
public class ProblemDetailsBuilder
{
private string? _title;
private string? _detail;
private int _status = StatusCodes.Status400BadRequest;
private string? _type;
public ProblemDetailsBuilder WithTitle(string title)
@@ -22,12 +21,6 @@ public class ProblemDetailsBuilder
return this;
}
public ProblemDetailsBuilder WithStatus(int status)
{
_status = status;
return this;
}
public ProblemDetailsBuilder WithType(string type)
{
_type = type;
@@ -39,7 +32,6 @@ public class ProblemDetailsBuilder
{
Title = _title,
Detail = _detail,
Status = _status,
Type = _type ?? "Error",
};
}
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
namespace Umbraco.Cms.Api.Common.Configuration;
public class ConfigureApiBehaviorOptions : IConfigureOptions<ApiBehaviorOptions>
{
public void Configure(ApiBehaviorOptions options) =>
// disable ProblemDetails as default result type for every non-success response (i.e. 404)
// - see https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.apibehavioroptions.suppressmapclienterrors
options.SuppressMapClientErrors = true;
}
@@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Api.Common.Json;
namespace Umbraco.Cms.Api.Common.Configuration;
public class ConfigureMvcJsonOptions : IConfigureOptions<MvcOptions>
{
private readonly string _jsonOptionsName;
private readonly IOptionsMonitor<JsonOptions> _jsonOptions;
private readonly ILoggerFactory _loggerFactory;
public ConfigureMvcJsonOptions(
string jsonOptionsName,
IOptionsMonitor<JsonOptions> jsonOptions,
ILoggerFactory loggerFactory)
{
_jsonOptionsName = jsonOptionsName;
_jsonOptions = jsonOptions;
_loggerFactory = loggerFactory;
}
public void Configure(MvcOptions options)
{
JsonOptions jsonOptions = _jsonOptions.Get(_jsonOptionsName);
ILogger<NamedSystemTextJsonInputFormatter> logger = _loggerFactory.CreateLogger<NamedSystemTextJsonInputFormatter>();
options.InputFormatters.Insert(0, new NamedSystemTextJsonInputFormatter(_jsonOptionsName, jsonOptions, logger));
options.OutputFormatters.Insert(0, new NamedSystemTextJsonOutputFormatter(_jsonOptionsName, jsonOptions.JsonSerializerOptions));
}
}
@@ -0,0 +1,65 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.Configuration;
public class ConfigureUmbracoSwaggerGenOptions : IConfigureOptions<SwaggerGenOptions>
{
private readonly IOptions<ApiVersioningOptions> _apiVersioningOptions;
private readonly IOperationIdSelector _operationIdSelector;
private readonly ISchemaIdSelector _schemaIdSelector;
public ConfigureUmbracoSwaggerGenOptions(
IOptions<ApiVersioningOptions> apiVersioningOptions,
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector)
{
_apiVersioningOptions = apiVersioningOptions;
_operationIdSelector = operationIdSelector;
_schemaIdSelector = schemaIdSelector;
}
public void Configure(SwaggerGenOptions swaggerGenOptions)
{
swaggerGenOptions.SwaggerDoc(
DefaultApiConfiguration.ApiName,
new OpenApiInfo
{
Title = "Default API",
Version = "Latest",
Description = "All endpoints not defined under specific APIs"
});
swaggerGenOptions.CustomOperationIds(description => _operationIdSelector.OperationId(description, _apiVersioningOptions.Value));
swaggerGenOptions.DocInclusionPredicate((name, api) =>
{
if (string.IsNullOrWhiteSpace(api.GroupName))
{
return false;
}
if (api.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
{
return controllerActionDescriptor.MethodInfo.HasMapToApiAttribute(name);
}
return false;
});
swaggerGenOptions.TagActionsBy(api => new[] { api.GroupName });
swaggerGenOptions.OrderActionsBy(ActionOrderBy);
swaggerGenOptions.SchemaFilter<EnumSchemaFilter>();
swaggerGenOptions.CustomSchemaIds(_schemaIdSelector.SchemaId);
swaggerGenOptions.SupportNonNullableReferenceTypes();
}
// see https://github.com/domaindrivendev/Swashbuckle.AspNetCore#change-operation-sort-order-eg-for-ui-sorting
private static string ActionOrderBy(ApiDescription apiDesc)
=> $"{apiDesc.GroupName}_{apiDesc.ActionDescriptor.AttributeRouteInfo?.Template ?? apiDesc.ActionDescriptor.RouteValues["controller"]}_{apiDesc.ActionDescriptor.RouteValues["action"]}_{apiDesc.HttpMethod}";
}
@@ -0,0 +1,6 @@
namespace Umbraco.Cms.Api.Common.Configuration;
internal static class DefaultApiConfiguration
{
public const string ApiName = "default";
}
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Api.Common.Configuration;
namespace Umbraco.Cms.Api.Common.DependencyInjection;
public static class MvcBuilderExtensions
{
public static IMvcBuilder AddJsonOptions(this IMvcBuilder builder, string settingsName, Action<JsonOptions> configure)
{
builder.Services.Configure(settingsName, configure);
builder.Services.AddSingleton<IConfigureOptions<MvcOptions>>(provider =>
{
IOptionsMonitor<JsonOptions> options = provider.GetRequiredService<IOptionsMonitor<JsonOptions>>();
ILoggerFactory loggerFactory = provider.GetRequiredService<ILoggerFactory>();
return new ConfigureMvcJsonOptions(settingsName, options, loggerFactory);
});
return builder;
}
}
@@ -0,0 +1,23 @@
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Common.Configuration;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Api.Common.Serialization;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Web.Common.ApplicationBuilder;
namespace Umbraco.Cms.Api.Common.DependencyInjection;
public static class UmbracoBuilderApiExtensions
{
public static IUmbracoBuilder AddUmbracoApiOpenApiUI(this IUmbracoBuilder builder)
{
builder.Services.AddSwaggerGen();
builder.Services.ConfigureOptions<ConfigureUmbracoSwaggerGenOptions>();
builder.Services.AddSingleton<IUmbracoJsonTypeInfoResolver, UmbracoJsonTypeInfoResolver>();
builder.Services.AddSingleton<IOperationIdSelector, OperationIdSelector>();
builder.Services.AddSingleton<ISchemaIdSelector, SchemaIdSelector>();
builder.Services.Configure<UmbracoPipelineOptions>(options => options.AddFilter(new SwaggerRouteTemplatePipelineFilter("UmbracoApiCommon")));
return builder;
}
}
@@ -0,0 +1,106 @@
using System.Security.Cryptography;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using Umbraco.Cms.Api.Common.Security;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Infrastructure.HostedServices;
namespace Umbraco.Cms.Api.Common.DependencyInjection;
public static class UmbracoBuilderAuthExtensions
{
private static bool _initialized;
public static IUmbracoBuilder AddUmbracoOpenIddict(this IUmbracoBuilder builder)
{
if (_initialized is false)
{
ConfigureOpenIddict(builder);
_initialized = true;
}
return builder;
}
private static void ConfigureOpenIddict(IUmbracoBuilder builder)
{
builder.Services.AddOpenIddict()
// Register the OpenIddict server components.
.AddServer(options =>
{
// Enable the authorization and token endpoints.
// - important: member endpoints MUST be added before backoffice endpoints to ensure that auto-discovery works for members
// FIXME: swap paths here so member API is first (see comment above)
options
.SetAuthorizationEndpointUris(
Paths.MemberApi.AuthorizationEndpoint.TrimStart(Constants.CharArrays.ForwardSlash))
.SetTokenEndpointUris(
Paths.MemberApi.TokenEndpoint.TrimStart(Constants.CharArrays.ForwardSlash))
.SetLogoutEndpointUris(
Paths.MemberApi.LogoutEndpoint.TrimStart(Constants.CharArrays.ForwardSlash))
.SetRevocationEndpointUris(
Paths.MemberApi.RevokeEndpoint.TrimStart(Constants.CharArrays.ForwardSlash));
// Enable authorization code flow with PKCE
options
.AllowAuthorizationCodeFlow()
.RequireProofKeyForCodeExchange()
.AllowRefreshTokenFlow();
// Register the ASP.NET Core host and configure for custom authentication endpoint.
options
.UseAspNetCore()
.EnableAuthorizationEndpointPassthrough()
.EnableLogoutEndpointPassthrough();
// Enable reference tokens
// - see https://documentation.openiddict.com/configuration/token-storage.html
options
.UseReferenceAccessTokens()
.UseReferenceRefreshTokens();
// Use ASP.NET Core Data Protection for tokens instead of JWT.
// This is more secure, and has the added benefit of having a high throughput
// but means that all servers (such as in a load balanced setup)
// needs to use the same application name and key ring,
// however this is already recommended for load balancing, so should be fine.
// See https://documentation.openiddict.com/configuration/token-formats.html#switching-to-data-protection-tokens
// and https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-7.0
// for more information
options.UseDataProtection();
// Register encryption and signing credentials to protect tokens.
// Note that for tokens generated/validated using ASP.NET Core Data Protection,
// a separate key ring is used, distinct from the credentials discussed in
// https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html
// More details can be found here: https://github.com/openiddict/openiddict-core/issues/1892#issuecomment-1737308506
// "When using ASP.NET Core Data Protection to generate opaque tokens, the signing and encryption credentials
// registered via Add*Key/Certificate() are not used". But since OpenIddict requires the registration of such,
// we can generate random keys per instance without them taking effect.
// - see also https://github.com/openiddict/openiddict-core/issues/1231
options
.AddEncryptionKey(new SymmetricSecurityKey(RandomNumberGenerator.GetBytes(32))) // generate a cryptographically secure random 256-bits key
.AddSigningKey(new RsaSecurityKey(RSA.Create(keySizeInBits: 2048))); // generate RSA key with recommended size of 2048-bits
})
// Register the OpenIddict validation components.
.AddValidation(options =>
{
// Import the configuration from the local OpenIddict server instance.
options.UseLocalServer();
// Register the ASP.NET Core host.
options.UseAspNetCore();
// Enable token entry validation
// - see https://documentation.openiddict.com/configuration/token-storage.html#enabling-token-entry-validation-at-the-api-level
options.EnableTokenEntryValidation();
// Use ASP.NET Core Data Protection for tokens instead of JWT. (see note in AddServer)
options.UseDataProtection();
});
builder.Services.AddHostedService<OpenIddictCleanup>();
}
}
@@ -0,0 +1,32 @@
using System.Reflection;
using Asp.Versioning;
using Umbraco.Cms.Api.Common.Attributes;
using Umbraco.Cms.Api.Common.Configuration;
namespace Umbraco.Extensions;
public static class MethodInfoApiCommonExtensions
{
public static string? GetMapToApiVersionAttributeValue(this MethodInfo methodInfo)
{
MapToApiVersionAttribute[] mapToApis = methodInfo.GetCustomAttributes(typeof(MapToApiVersionAttribute), inherit: true).Cast<MapToApiVersionAttribute>().ToArray();
return string.Join("|", mapToApis.SelectMany(x=>x.Versions));
}
public static string? GetMapToApiAttributeValue(this MethodInfo methodInfo)
{
MapToApiAttribute[] mapToApis = (methodInfo.DeclaringType?.GetCustomAttributes(typeof(MapToApiAttribute), inherit: true) ?? Array.Empty<object>()).Cast<MapToApiAttribute>().ToArray();
return mapToApis.SingleOrDefault()?.ApiName;
}
public static bool HasMapToApiAttribute(this MethodInfo methodInfo, string apiName)
{
var value = methodInfo.GetMapToApiAttributeValue();
return value == apiName
|| (value is null && apiName == DefaultApiConfiguration.ApiName);
}
}
@@ -0,0 +1,9 @@
namespace Umbraco.Cms.Api.Common.Filters;
[AttributeUsage(AttributeTargets.Class)]
public class JsonOptionsNameAttribute : Attribute
{
public JsonOptionsNameAttribute(string jsonOptionsName) => JsonOptionsName = jsonOptionsName;
public string JsonOptionsName { get; }
}
@@ -0,0 +1,10 @@
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Api.Common.Filters;
namespace Umbraco.Cms.Api.Common.Json;
public static class HttpContextJsonExtensions
{
public static string? CurrentJsonOptionsName(this HttpContext context)
=> context.GetEndpoint()?.Metadata.GetMetadata<JsonOptionsNameAttribute>()?.JsonOptionsName;
}
@@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Extensions.Logging;
namespace Umbraco.Cms.Api.Common.Json;
internal class NamedSystemTextJsonInputFormatter : SystemTextJsonInputFormatter
{
private readonly string _jsonOptionsName;
public NamedSystemTextJsonInputFormatter(string jsonOptionsName, JsonOptions options, ILogger<NamedSystemTextJsonInputFormatter> logger)
: base(options, logger) =>
_jsonOptionsName = jsonOptionsName;
public override bool CanRead(InputFormatterContext context)
=> context.HttpContext.CurrentJsonOptionsName() == _jsonOptionsName && base.CanRead(context);
public override async Task<InputFormatterResult> ReadAsync(InputFormatterContext context)
{
try
{
return await base.ReadAsync(context);
}
catch (NotSupportedException exception)
{
// This happens when trying to deserialize to an interface, without sending the $type as part of the request
context.ModelState.TryAddModelException(string.Empty, new InputFormatterException(exception.Message, exception));
return await InputFormatterResult.FailureAsync();
}
}
}
@@ -0,0 +1,18 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc.Formatters;
namespace Umbraco.Cms.Api.Common.Json;
internal class NamedSystemTextJsonOutputFormatter : SystemTextJsonOutputFormatter
{
private readonly string _jsonOptionsName;
public NamedSystemTextJsonOutputFormatter(string jsonOptionsName, JsonSerializerOptions jsonSerializerOptions) : base(jsonSerializerOptions)
{
_jsonOptionsName = jsonOptionsName;
}
public override bool CanWriteResult(OutputFormatterCanWriteContext context)
=> context.HttpContext.CurrentJsonOptionsName() == _jsonOptionsName && base.CanWriteResult(context);
}
@@ -0,0 +1,23 @@
using System.Reflection;
using System.Runtime.Serialization;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Umbraco.Cms.Api.Common.OpenApi;
public class EnumSchemaFilter : ISchemaFilter
{
public void Apply(OpenApiSchema model, SchemaFilterContext context)
{
if (context.Type.IsEnum)
{
model.Enum.Clear();
foreach (var name in Enum.GetNames(context.Type))
{
var actualName = context.Type.GetField(name)?.GetCustomAttribute<EnumMemberAttribute>()?.Value ?? name;
model.Enum.Add(new OpenApiString(actualName));
}
}
}
}
@@ -0,0 +1,9 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
namespace Umbraco.Cms.Api.Common.OpenApi;
public interface IOperationIdSelector
{
string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions);
}
@@ -0,0 +1,6 @@
namespace Umbraco.Cms.Api.Common.OpenApi;
public interface ISchemaIdSelector
{
string SchemaId(Type type);
}
@@ -0,0 +1,48 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.OpenApi;
/// <summary>
/// This filter explicitly removes all other mime types than application/json from a named OpenAPI document when application/json is accepted.
/// </summary>
public class MimeTypeDocumentFilter : IDocumentFilter
{
private readonly string _documentName;
public MimeTypeDocumentFilter(string documentName) => _documentName = documentName;
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
{
if (context.DocumentName != _documentName)
{
return;
}
OpenApiOperation[] operations = swaggerDoc.Paths
.SelectMany(path => path.Value.Operations.Values)
.ToArray();
void RemoveUnwantedMimeTypes(IDictionary<string, OpenApiMediaType> content)
{
if (content.ContainsKey("application/json"))
{
content.RemoveAll(r => r.Key != "application/json");
}
}
OpenApiRequestBody[] requestBodies = operations.Select(operation => operation.RequestBody).WhereNotNull().ToArray();
foreach (OpenApiRequestBody requestBody in requestBodies)
{
RemoveUnwantedMimeTypes(requestBody.Content);
}
OpenApiResponse[] responses = operations.SelectMany(operation => operation.Responses.Values).WhereNotNull().ToArray();
foreach (OpenApiResponse response in responses)
{
RemoveUnwantedMimeTypes(response.Content);
}
}
}
@@ -0,0 +1,21 @@
using System.Text.RegularExpressions;
namespace Umbraco.Cms.Api.Common.OpenApi;
/// <summary>
/// This is the regexes used to generate the operation IDs, the benefit of this being partial with GeneratedRegex
/// source generators is that it will be pre-compiled at startup
/// See: https://devblogs.microsoft.com/dotnet/regular-expression-improvements-in-dotnet-7/#source-generation for more info.
/// </summary>
internal static partial class OperationIdRegexes
{
// Your IDE may be showing errors here, this is because it's a new dotnet 7 feature (it's fixed in the EAP of Rider)
[GeneratedRegex(".*?\\/v[1-9]+/")]
public static partial Regex VersionPrefixRegex();
[GeneratedRegex("\\{(.*?)\\:?\\}")]
public static partial Regex TemplatePlaceholdersRegex();
[GeneratedRegex("[\\/\\-](\\w{1})")]
public static partial Regex ToCamelCaseRegex();
}
@@ -0,0 +1,79 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.OpenApi;
public class OperationIdSelector : IOperationIdSelector
{
public virtual string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions)
{
if (apiDescription.ActionDescriptor is not ControllerActionDescriptor controllerActionDescriptor
|| controllerActionDescriptor.ControllerTypeInfo.Namespace?.StartsWith("Umbraco.Cms.Api") is not true)
{
return null;
}
return UmbracoOperationId(apiDescription, apiVersioningOptions);
}
protected string? UmbracoOperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions)
{
if (apiDescription.ActionDescriptor is not ControllerActionDescriptor controllerActionDescriptor)
{
return null;
}
ApiVersion defaultVersion = apiVersioningOptions.DefaultApiVersion;
var httpMethod = apiDescription.HttpMethod?.ToLower().ToFirstUpper() ?? "Get";
// if the route info "Name" is supplied we'll use this explicitly as the operation ID
// - usage example: [HttpGet("my-api/route}", Name = "MyCustomRoute")]
if (string.IsNullOrWhiteSpace(apiDescription.ActionDescriptor.AttributeRouteInfo?.Name) == false)
{
var explicitOperationId = apiDescription.ActionDescriptor.AttributeRouteInfo!.Name;
return explicitOperationId.InvariantStartsWith(httpMethod)
? explicitOperationId
: $"{httpMethod}{explicitOperationId}";
}
var relativePath = apiDescription.RelativePath;
if (string.IsNullOrWhiteSpace(relativePath))
{
throw new Exception(
$"There is no relative path for controller action {apiDescription.ActionDescriptor.RouteValues["controller"]}");
}
// Remove the prefixed base path with version, e.g. /umbraco/management/api/v1/tracked-reference/{id} => tracked-reference/{id}
var unprefixedRelativePath = OperationIdRegexes
.VersionPrefixRegex()
.Replace(relativePath, string.Empty);
// Remove template placeholders, e.g. tracked-reference/{id} => tracked-reference/Id
var formattedOperationId = OperationIdRegexes
.TemplatePlaceholdersRegex()
.Replace(unprefixedRelativePath, m => $"By{m.Groups[1].Value.ToFirstUpper()}");
// Remove dashes (-) and slashes (/) and convert the following letter to uppercase with
// the word "By" in front, e.g. tracked-reference/Id => TrackedReferenceById
formattedOperationId = OperationIdRegexes
.ToCamelCaseRegex()
.Replace(formattedOperationId, m => m.Groups[1].Value.ToUpper());
//Get map to version attribute
string? version = null;
var versionAttributeValue = controllerActionDescriptor.MethodInfo.GetMapToApiVersionAttributeValue();
// We only wanna add a version, if it is not the default one.
if (string.Equals(versionAttributeValue, defaultVersion.ToString()) == false)
{
version = versionAttributeValue;
}
// Return the operation ID with the formatted http method verb in front, e.g. GetTrackedReferenceById
return $"{httpMethod}{formattedOperationId.ToFirstUpper()}{version}";
}
}
@@ -0,0 +1,36 @@
using System.Text.RegularExpressions;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.OpenApi;
public class SchemaIdSelector : ISchemaIdSelector
{
public virtual string SchemaId(Type type)
=> type.Namespace?.StartsWith("Umbraco.Cms") is true ? UmbracoSchemaId(type) : type.Name;
protected string UmbracoSchemaId(Type type)
{
string SanitizedTypeName(Type t) => t.Name
// first grab the "non generic" part of any generic type name (i.e. "PagedViewModel`1" becomes "PagedViewModel")
.Split('`').First()
// then remove the "ViewModel" postfix from type names
.TrimEnd("ViewModel");
var name = SanitizedTypeName(type);
if (type.IsGenericType)
{
// append the generic type names, ultimately turning i.e. "PagedViewModel<RelationItemViewModel>" into "PagedRelationItem"
name = $"{name}{string.Join(string.Empty, type.GenericTypeArguments.Select(SanitizedTypeName))}";
}
if (name.EndsWith("Model") == false)
{
// because some models names clash with common classes in TypeScript (i.e. Document),
// we need to add a "Model" postfix to all models
name = $"{name}Model";
}
// make absolutely sure we don't pass any invalid named by removing all non-word chars
return Regex.Replace(name, @"[^\w]", string.Empty);
}
}
@@ -0,0 +1,75 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Web.Common.ApplicationBuilder;
using Umbraco.Extensions;
using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment;
namespace Umbraco.Cms.Api.Common.OpenApi;
public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
{
public SwaggerRouteTemplatePipelineFilter(string name)
: base(name)
=> PostPipeline = PostPipelineAction;
private void PostPipelineAction(IApplicationBuilder applicationBuilder)
{
if (SwaggerIsEnabled(applicationBuilder) is false)
{
return;
}
IOptions<SwaggerGenOptions> swaggerGenOptions = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<SwaggerGenOptions>>();
applicationBuilder.UseSwagger(swaggerOptions =>
{
swaggerOptions.RouteTemplate = SwaggerRouteTemplate(applicationBuilder);
});
applicationBuilder.UseSwaggerUI(swaggerUiOptions => SwaggerUiConfiguration(swaggerUiOptions, swaggerGenOptions.Value, applicationBuilder));
}
protected virtual bool SwaggerIsEnabled(IApplicationBuilder applicationBuilder)
{
IWebHostEnvironment webHostEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IWebHostEnvironment>();
return webHostEnvironment.IsProduction() is false;
}
protected virtual string SwaggerRouteTemplate(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger/{{documentName}}/swagger.json";
protected virtual string SwaggerUiRoutePrefix(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger";
protected virtual void SwaggerUiConfiguration(
SwaggerUIOptions swaggerUiOptions,
SwaggerGenOptions swaggerGenOptions,
IApplicationBuilder applicationBuilder)
{
swaggerUiOptions.RoutePrefix = SwaggerUiRoutePrefix(applicationBuilder);
foreach ((var name, OpenApiInfo? apiInfo) in swaggerGenOptions.SwaggerGeneratorOptions.SwaggerDocs
.OrderBy(x => x.Value.Title))
{
swaggerUiOptions.SwaggerEndpoint($"{name}/swagger.json", $"{apiInfo.Title}");
}
swaggerUiOptions.OAuthUsePkce();
}
private string GetUmbracoPath(IApplicationBuilder applicationBuilder)
{
GlobalSettings settings = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<GlobalSettings>>().Value;
IHostingEnvironment hostingEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IHostingEnvironment>();
return settings.GetBackOfficePath(hostingEnvironment);
}
}
@@ -0,0 +1,20 @@
namespace Umbraco.Cms.Api.Common.Security;
public static class Paths
{
public static class MemberApi
{
public const string EndpointTemplate = "security/member";
public static readonly string AuthorizationEndpoint = EndpointPath($"{EndpointTemplate}/authorize");
public static readonly string TokenEndpoint = EndpointPath($"{EndpointTemplate}/token");
public static readonly string LogoutEndpoint = EndpointPath($"{EndpointTemplate}/signout");
public static readonly string RevokeEndpoint = EndpointPath($"{EndpointTemplate}/revoke");
// NOTE: we're NOT using /api/v1.0/ here because it will clash with the Delivery API docs
private static string EndpointPath(string relativePath) => $"/umbraco/delivery/api/v1/{relativePath}";
}
}
@@ -0,0 +1,8 @@
using System.Text.Json.Serialization.Metadata;
namespace Umbraco.Cms.Api.Common.Serialization;
public interface IUmbracoJsonTypeInfoResolver : IJsonTypeInfoResolver
{
IEnumerable<Type> FindSubTypes(Type type);
}
@@ -0,0 +1,86 @@
using System.Collections.Concurrent;
using System.Text.Json;
using System.Text.Json.Serialization.Metadata;
using Umbraco.Cms.Core.Composing;
namespace Umbraco.Cms.Api.Common.Serialization;
public sealed class UmbracoJsonTypeInfoResolver : DefaultJsonTypeInfoResolver, IUmbracoJsonTypeInfoResolver
{
private readonly ITypeFinder _typeFinder;
private readonly ConcurrentDictionary<Type, ISet<Type>> _subTypesCache = new ConcurrentDictionary<Type, ISet<Type>>();
public UmbracoJsonTypeInfoResolver(ITypeFinder typeFinder)
{
_typeFinder = typeFinder;
}
public IEnumerable<Type> FindSubTypes(Type type)
{
if (_subTypesCache.TryGetValue(type, out ISet<Type>? cachedResult))
{
return cachedResult;
}
var result = _typeFinder.FindClassesOfType(type).ToHashSet();
_subTypesCache.TryAdd(type, result);
return result;
}
public override JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options)
{
JsonTypeInfo result = base.GetTypeInfo(type, options);
if (type.IsInterface)
{
return GetTypeInfoForInterface(result, type, options);
}
else
{
return GetTypeInfoForClass(result, type, options);
}
}
private JsonTypeInfo GetTypeInfoForClass(JsonTypeInfo result, Type type, JsonSerializerOptions options)
{
if (result.Kind != JsonTypeInfoKind.Object || !type.GetInterfaces().Any())
{
return result;
}
JsonPolymorphismOptions jsonPolymorphismOptions = result.PolymorphismOptions ?? new JsonPolymorphismOptions();
jsonPolymorphismOptions.DerivedTypes.Add(new JsonDerivedType(type, type.Name));
result.PolymorphismOptions = jsonPolymorphismOptions;
return result;
}
private JsonTypeInfo GetTypeInfoForInterface(JsonTypeInfo result, Type type, JsonSerializerOptions options)
{
IEnumerable<Type> subTypes = FindSubTypes(type);
if (!subTypes.Any())
{
return result;
}
JsonPolymorphismOptions jsonPolymorphismOptions = result.PolymorphismOptions ?? new JsonPolymorphismOptions();
IEnumerable<Type> knownSubTypes = jsonPolymorphismOptions.DerivedTypes.Select(x => x.DerivedType);
IEnumerable<Type> subTypesToAdd = subTypes.Except(knownSubTypes);
foreach (Type subType in subTypesToAdd)
{
jsonPolymorphismOptions.DerivedTypes.Add(new JsonDerivedType(
subType,
subType.Name ?? string.Empty));
}
result.PolymorphismOptions = jsonPolymorphismOptions;
return result;
}
}
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS - API Common</Title>
<Description>Contains the bits and pieces that are shared between the Umbraco CMS APIs.</Description>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="OpenIddict.Abstractions" Version="4.5.0" />
<PackageReference Include="OpenIddict.AspNetCore" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
</Project>
@@ -1,9 +1,13 @@
namespace Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using System.ComponentModel.DataAnnotations;
namespace Umbraco.Cms.Api.Common.ViewModels.Pagination;
public class PagedViewModel<T>
{
[Required]
public long Total { get; set; }
[Required]
public IEnumerable<T> Items { get; set; } = Enumerable.Empty<T>();
public static PagedViewModel<T> Empty() => new();
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Accessors;
internal sealed class RequestContextOutputExpansionStrategyAccessor : RequestContextServiceAccessorBase<IOutputExpansionStrategy>, IOutputExpansionStrategyAccessor
{
public RequestContextOutputExpansionStrategyAccessor(IHttpContextAccessor httpContextAccessor)
: base(httpContextAccessor)
{
}
}
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Accessors;
internal sealed class RequestContextRequestStartItemProviderAccessor : RequestContextServiceAccessorBase<IRequestStartItemProvider>, IRequestStartItemProviderAccessor
{
public RequestContextRequestStartItemProviderAccessor(IHttpContextAccessor httpContextAccessor)
: base(httpContextAccessor)
{
}
}
@@ -0,0 +1,20 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace Umbraco.Cms.Api.Delivery.Accessors;
public abstract class RequestContextServiceAccessorBase<T>
where T : class
{
private readonly IHttpContextAccessor _httpContextAccessor;
protected RequestContextServiceAccessorBase(IHttpContextAccessor httpContextAccessor)
=> _httpContextAccessor = httpContextAccessor;
public bool TryGetValue([NotNullWhen(true)] out T? requestStartNodeService)
{
requestStartNodeService = _httpContextAccessor.HttpContext?.RequestServices.GetService<T>();
return requestStartNodeService is not null;
}
}
@@ -0,0 +1,30 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Api.Delivery.Filters;
namespace Umbraco.Cms.Api.Delivery.Configuration;
public class ConfigureUmbracoDeliveryApiSwaggerGenOptions: IConfigureOptions<SwaggerGenOptions>
{
public void Configure(SwaggerGenOptions swaggerGenOptions)
{
swaggerGenOptions.SwaggerDoc(
DeliveryApiConfiguration.ApiName,
new OpenApiInfo
{
Title = DeliveryApiConfiguration.ApiTitle,
Version = "Latest",
Description = $"You can find out more about the {DeliveryApiConfiguration.ApiTitle} in [the documentation]({DeliveryApiConfiguration.ApiDocumentationContentArticleLink})."
});
swaggerGenOptions.DocumentFilter<MimeTypeDocumentFilter>(DeliveryApiConfiguration.ApiName);
swaggerGenOptions.OperationFilter<SwaggerContentDocumentationFilter>();
swaggerGenOptions.OperationFilter<SwaggerMediaDocumentationFilter>();
swaggerGenOptions.ParameterFilter<SwaggerContentDocumentationFilter>();
swaggerGenOptions.ParameterFilter<SwaggerMediaDocumentationFilter>();
}
}
@@ -0,0 +1,74 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.Security;
using Umbraco.Cms.Api.Delivery.Controllers;
using Umbraco.Cms.Api.Delivery.Filters;
namespace Umbraco.Cms.Api.Delivery.Configuration;
/// <summary>
/// This configures member authentication for the Delivery API in Swagger. Consult the docs for
/// member authentication within the Delivery API for instructions on how to use this.
/// </summary>
/// <remarks>
/// This class is not used by the core CMS due to the required installation dependencies (local login page among other things).
/// </remarks>
public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions : IConfigureOptions<SwaggerGenOptions>
{
private const string AuthSchemeName = "Umbraco Member";
public void Configure(SwaggerGenOptions options)
{
options.AddSecurityDefinition(
AuthSchemeName,
new OpenApiSecurityScheme
{
In = ParameterLocation.Header,
Name = AuthSchemeName,
Type = SecuritySchemeType.OAuth2,
Description = "Umbraco Member Authentication",
Flows = new OpenApiOAuthFlows
{
AuthorizationCode = new OpenApiOAuthFlow
{
AuthorizationUrl = new Uri(Paths.MemberApi.AuthorizationEndpoint, UriKind.Relative),
TokenUrl = new Uri(Paths.MemberApi.TokenEndpoint, UriKind.Relative)
}
}
});
// add security requirements for content API operations
options.OperationFilter<DeliveryApiSecurityFilter>();
}
private class DeliveryApiSecurityFilter : SwaggerFilterBase<ContentApiControllerBase>, IOperationFilter
{
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
if (CanApply(context) is false)
{
return;
}
operation.Security = new List<OpenApiSecurityRequirement>
{
new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = AuthSchemeName,
}
},
new string[] { }
}
}
};
}
}
}
@@ -0,0 +1,13 @@
namespace Umbraco.Cms.Api.Delivery.Configuration;
internal static class DeliveryApiConfiguration
{
internal const string ApiTitle = "Umbraco Delivery API";
internal const string ApiName = "delivery";
internal const string ApiDocumentationContentArticleLink = "https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api";
// TODO: update this when the Media article is out
internal const string ApiDocumentationMediaArticleLink = "https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api";
}
@@ -0,0 +1,85 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class ByIdContentApiController : ContentApiItemControllerBase
{
private readonly IRequestMemberAccessService _requestMemberAccessService;
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestMemberAccessService)
{
}
[ActivatorUtilitiesConstructor]
public ByIdContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IRequestMemberAccessService requestMemberAccessService)
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
/// <summary>
/// Gets a content item by id.
/// </summary>
/// <param name="id">The unique identifier of the content item.</param>
/// <returns>The content item or not found result.</returns>
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ById(Guid id)
{
IPublishedContent? contentItem = ApiPublishedContentCache.GetById(id);
if (contentItem is null)
{
return NotFound();
}
IActionResult? deniedAccessResult = await HandleMemberAccessAsync(contentItem, _requestMemberAccessService);
if (deniedAccessResult is not null)
{
return deniedAccessResult;
}
IApiContentResponse? apiContentResponse = ApiContentResponseBuilder.Build(contentItem);
if (apiContentResponse is null)
{
return NotFound();
}
return Ok(apiContentResponse);
}
}
@@ -0,0 +1,39 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class ByIdMediaApiController : MediaApiControllerBase
{
public ByIdMediaApiController(IPublishedSnapshotAccessor publishedSnapshotAccessor, IApiMediaWithCropsResponseBuilder apiMediaWithCropsResponseBuilder)
: base(publishedSnapshotAccessor, apiMediaWithCropsResponseBuilder)
{
}
/// <summary>
/// Gets a media item by id.
/// </summary>
/// <param name="id">The unique identifier of the media item.</param>
/// <returns>The media item or not found result.</returns>
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ById(Guid id)
{
IPublishedContent? media = PublishedMediaCache.GetById(id);
if (media is null)
{
return await Task.FromResult(NotFound());
}
return Ok(BuildApiMediaWithCrops(media));
}
}
@@ -0,0 +1,79 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class ByIdsContentApiController : ContentApiItemControllerBase
{
private readonly IRequestMemberAccessService _requestMemberAccessService;
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdsContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByIdsContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestMemberAccessService)
{
}
[ActivatorUtilitiesConstructor]
public ByIdsContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IRequestMemberAccessService requestMemberAccessService)
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
/// <summary>
/// Gets content items by ids.
/// </summary>
/// <param name="ids">The unique identifiers of the content items to retrieve.</param>
/// <returns>The content items.</returns>
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
public async Task<IActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
{
IPublishedContent[] contentItems = ApiPublishedContentCache.GetByIds(ids).ToArray();
IActionResult? deniedAccessResult = await HandleMemberAccessAsync(contentItems, _requestMemberAccessService);
if (deniedAccessResult is not null)
{
return deniedAccessResult;
}
IApiContentResponse[] apiContentItems = contentItems
.Select(ApiContentResponseBuilder.Build)
.WhereNotNull()
.ToArray();
return await Task.FromResult(Ok(apiContentItems));
}
}
@@ -0,0 +1,41 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Infrastructure.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class ByIdsMediaApiController : MediaApiControllerBase
{
public ByIdsMediaApiController(IPublishedSnapshotAccessor publishedSnapshotAccessor, IApiMediaWithCropsResponseBuilder apiMediaWithCropsResponseBuilder)
: base(publishedSnapshotAccessor, apiMediaWithCropsResponseBuilder)
{
}
/// <summary>
/// Gets media items by ids.
/// </summary>
/// <param name="ids">The unique identifiers of the media items to retrieve.</param>
/// <returns>The media items.</returns>
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<ApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
public async Task<ActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
{
IPublishedContent[] mediaItems = ids
.Select(PublishedMediaCache.GetById)
.WhereNotNull()
.ToArray();
ApiMediaWithCropsResponse[] apiMediaItems = mediaItems
.Select(BuildApiMediaWithCrops)
.ToArray();
return await Task.FromResult(Ok(apiMediaItems));
}
}
@@ -0,0 +1,45 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class ByPathMediaApiController : MediaApiControllerBase
{
private readonly IApiMediaQueryService _apiMediaQueryService;
public ByPathMediaApiController(
IPublishedSnapshotAccessor publishedSnapshotAccessor,
IApiMediaWithCropsResponseBuilder apiMediaWithCropsResponseBuilder,
IApiMediaQueryService apiMediaQueryService)
: base(publishedSnapshotAccessor, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
/// <summary>
/// Gets a media item by its path.
/// </summary>
/// <param name="path">The path of the media item.</param>
/// <returns>The media item or not found result.</returns>
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByPath(string path)
{
path = DecodePath(path);
IPublishedContent? media = _apiMediaQueryService.GetByPath(path);
if (media is null)
{
return await Task.FromResult(NotFound());
}
return Ok(BuildApiMediaWithCrops(media));
}
}
@@ -0,0 +1,151 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class ByRouteContentApiController : ContentApiItemControllerBase
{
private readonly IRequestRoutingService _requestRoutingService;
private readonly IRequestRedirectService _requestRedirectService;
private readonly IRequestPreviewService _requestPreviewService;
private readonly IRequestMemberAccessService _requestMemberAccessService;
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRoutingService,
requestRedirectService,
requestPreviewService,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRoutingService,
requestRedirectService,
requestPreviewService,
requestMemberAccessService)
{
}
[ActivatorUtilitiesConstructor]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService)
: base(apiPublishedContentCache, apiContentResponseBuilder)
{
_requestRoutingService = requestRoutingService;
_requestRedirectService = requestRedirectService;
_requestPreviewService = requestPreviewService;
_requestMemberAccessService = requestMemberAccessService;
}
/// <summary>
/// Gets a content item by route.
/// </summary>
/// <param name="path">The path to the content item.</param>
/// <remarks>
/// Optional URL segment for the root content item
/// can be added through the "start-item" header.
/// </remarks>
/// <returns>The content item or not found result.</returns>
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByRoute(string path = "")
{
path = DecodePath(path);
path = path.TrimStart("/");
path = path.Length == 0 ? "/" : path;
IPublishedContent? contentItem = GetContent(path);
if (contentItem is not null)
{
IActionResult? deniedAccessResult = await HandleMemberAccessAsync(contentItem, _requestMemberAccessService);
if (deniedAccessResult is not null)
{
return deniedAccessResult;
}
return await Task.FromResult(Ok(ApiContentResponseBuilder.Build(contentItem)));
}
IApiContentRoute? redirectRoute = _requestRedirectService.GetRedirectRoute(path);
return redirectRoute != null
? RedirectTo(redirectRoute)
: NotFound();
}
private IPublishedContent? GetContent(string path)
=> path.StartsWith(Constants.DeliveryApi.Routing.PreviewContentPathPrefix)
? GetPreviewContent(path)
: GetPublishedContent(path);
private IPublishedContent? GetPublishedContent(string path)
{
var contentRoute = _requestRoutingService.GetContentRoute(path);
IPublishedContent? contentItem = ApiPublishedContentCache.GetByRoute(contentRoute);
return contentItem;
}
private IPublishedContent? GetPreviewContent(string path)
{
if (_requestPreviewService.IsPreview() is false)
{
return null;
}
if (Guid.TryParse(path.AsSpan(Constants.DeliveryApi.Routing.PreviewContentPathPrefix.Length).TrimEnd("/"), out Guid contentId) is false)
{
return null;
}
IPublishedContent? contentItem = ApiPublishedContentCache.GetById(contentId);
return contentItem;
}
private IActionResult RedirectTo(IApiContentRoute redirectRoute)
{
Response.Headers.Add("Location-Start-Item-Path", redirectRoute.StartItem.Path);
Response.Headers.Add("Location-Start-Item-Id", redirectRoute.StartItem.Id.ToString("D"));
return RedirectPermanent(redirectRoute.Path);
}
}
@@ -0,0 +1,58 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.Builders;
using Umbraco.Cms.Api.Delivery.Filters;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Services.OperationStatus;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[DeliveryApiAccess]
[VersionedDeliveryApiRoute("content")]
[ApiExplorerSettings(GroupName = "Content")]
[LocalizeFromAcceptLanguageHeader]
[ValidateStartItem]
public abstract class ContentApiControllerBase : DeliveryApiControllerBase
{
protected IApiPublishedContentCache ApiPublishedContentCache { get; }
protected IApiContentResponseBuilder ApiContentResponseBuilder { get; }
protected ContentApiControllerBase(IApiPublishedContentCache apiPublishedContentCache, IApiContentResponseBuilder apiContentResponseBuilder)
{
ApiPublishedContentCache = apiPublishedContentCache;
ApiContentResponseBuilder = apiContentResponseBuilder;
}
protected IActionResult ApiContentQueryOperationStatusResult(ApiContentQueryOperationStatus status) =>
status switch
{
ApiContentQueryOperationStatus.FilterOptionNotFound => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Filter option not found")
.WithDetail("One of the attempted 'filter' options does not exist")
.Build()),
ApiContentQueryOperationStatus.SelectorOptionNotFound => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Selector option not found")
.WithDetail("The attempted 'fetch' option does not exist")
.Build()),
ApiContentQueryOperationStatus.SortOptionNotFound => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Sort option not found")
.WithDetail("One of the attempted 'sort' options does not exist")
.Build()),
_ => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Unknown content query status")
.WithDetail($"Content query status \"{status}\" was not expected here")
.Build()),
};
/// <summary>
/// Creates a 403 Forbidden result.
/// </summary>
/// <remarks>
/// Use this method instead of <see cref="ControllerBase.Forbid()"/> on the controller base. The latter will yield
/// a redirect to an access denied URL because of the default cookie auth scheme. This method ensures that a proper
/// 403 Forbidden status code is returned to the client.
/// </remarks>
protected IActionResult Forbidden() => new StatusCodeResult(StatusCodes.Status403Forbidden);
}
@@ -0,0 +1,58 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Delivery.Controllers;
public abstract class ContentApiItemControllerBase : ContentApiControllerBase
{
// TODO: Remove this in V14 when the obsolete constructors have been removed
private readonly IPublicAccessService _publicAccessService;
[Obsolete($"Please use the constructor that does not accept {nameof(IPublicAccessService)}. Will be removed in V14.")]
protected ContentApiItemControllerBase(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService)
: this(apiPublishedContentCache, apiContentResponseBuilder)
{
}
protected ContentApiItemControllerBase(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder)
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _publicAccessService = StaticServiceProvider.Instance.GetRequiredService<IPublicAccessService>();
[Obsolete($"Please use {nameof(IPublicAccessService)} to test for content protection. Will be removed in V14.")]
protected bool IsProtected(IPublishedContent content) => _publicAccessService.IsProtected(content.Path);
protected async Task<IActionResult?> HandleMemberAccessAsync(IPublishedContent contentItem, IRequestMemberAccessService requestMemberAccessService)
{
PublicAccessStatus accessStatus = await requestMemberAccessService.MemberHasAccessToAsync(contentItem);
return accessStatus is PublicAccessStatus.AccessAccepted
? null
: accessStatus is PublicAccessStatus.AccessDenied
? Forbidden()
: Unauthorized();
}
protected async Task<IActionResult?> HandleMemberAccessAsync(IEnumerable<IPublishedContent> contentItems, IRequestMemberAccessService requestMemberAccessService)
{
foreach (IPublishedContent content in contentItems)
{
IActionResult? result = await HandleMemberAccessAsync(content, requestMemberAccessService);
// if any of the content items yield an error based on the current member access, return that error
if (result is not null)
{
return result;
}
}
return null;
}
}
@@ -0,0 +1,29 @@
using System.Net;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.Attributes;
using Umbraco.Cms.Api.Common.Filters;
using Umbraco.Cms.Api.Delivery.Configuration;
using Umbraco.Cms.Core;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiController]
[JsonOptionsName(Constants.JsonOptionsNames.DeliveryApi)]
[MapToApi(DeliveryApiConfiguration.ApiName)]
public abstract class DeliveryApiControllerBase : Controller
{
protected string DecodePath(string path)
{
// OpenAPI does not allow reserved chars as "in:path" parameters, so clients based on the Swagger JSON will URL
// encode the path. Normally, ASP.NET Core handles that encoding with an automatic decoding - apparently just not
// for forward slashes, for whatever reason... so we need to deal with those. Hopefully this will be addressed in
// an upcoming version of ASP.NET Core.
// See also https://github.com/dotnet/aspnetcore/issues/11544
if (path.Contains("%2F", StringComparison.OrdinalIgnoreCase))
{
path = WebUtility.UrlDecode(path);
}
return path;
}
}
@@ -0,0 +1,56 @@
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.Builders;
using Umbraco.Cms.Api.Delivery.Filters;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Infrastructure.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[DeliveryApiMediaAccess]
[VersionedDeliveryApiRoute("media")]
[ApiExplorerSettings(GroupName = "Media")]
public abstract class MediaApiControllerBase : DeliveryApiControllerBase
{
private readonly IApiMediaWithCropsResponseBuilder _apiMediaWithCropsResponseBuilder;
private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor;
private IPublishedMediaCache? _publishedMediaCache;
protected MediaApiControllerBase(IPublishedSnapshotAccessor publishedSnapshotAccessor, IApiMediaWithCropsResponseBuilder apiMediaWithCropsResponseBuilder)
{
_publishedSnapshotAccessor = publishedSnapshotAccessor;
_apiMediaWithCropsResponseBuilder = apiMediaWithCropsResponseBuilder;
}
protected IPublishedMediaCache PublishedMediaCache => _publishedMediaCache
??= _publishedSnapshotAccessor.GetRequiredPublishedSnapshot().Media
?? throw new InvalidOperationException("Could not obtain the published media cache");
protected ApiMediaWithCropsResponse BuildApiMediaWithCrops(IPublishedContent media)
=> _apiMediaWithCropsResponseBuilder.Build(media);
protected IActionResult ApiMediaQueryOperationStatusResult(ApiMediaQueryOperationStatus status) =>
status switch
{
ApiMediaQueryOperationStatus.FilterOptionNotFound => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Filter option not found")
.WithDetail("One of the attempted 'filter' options does not exist")
.Build()),
ApiMediaQueryOperationStatus.SelectorOptionNotFound => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Selector option not found")
.WithDetail("The attempted 'fetch' option does not exist")
.Build()),
ApiMediaQueryOperationStatus.SortOptionNotFound => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Sort option not found")
.WithDetail("One of the attempted 'sort' options does not exist")
.Build()),
_ => BadRequest(new ProblemDetailsBuilder()
.WithTitle("Unknown media query status")
.WithDetail($"Media query status \"{status}\" was not expected here")
.Build()),
};
}
@@ -0,0 +1,89 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class QueryContentApiController : ContentApiControllerBase
{
private readonly IRequestMemberAccessService _requestMemberAccessService;
private readonly IApiContentQueryService _apiContentQueryService;
[Obsolete($"Please use the constructor that accepts {nameof(IRequestMemberAccessService)}. Will be removed in V14.")]
public QueryContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilderBuilder,
IApiContentQueryService apiContentQueryService)
: this(
apiPublishedContentCache,
apiContentResponseBuilderBuilder,
apiContentQueryService,
StaticServiceProvider.Instance.GetRequiredService<IRequestMemberAccessService>())
{
}
[ActivatorUtilitiesConstructor]
public QueryContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilderBuilder,
IApiContentQueryService apiContentQueryService,
IRequestMemberAccessService requestMemberAccessService)
: base(apiPublishedContentCache, apiContentResponseBuilderBuilder)
{
_apiContentQueryService = apiContentQueryService;
_requestMemberAccessService = requestMemberAccessService;
}
/// <summary>
/// Gets a paginated list of content item(s) from query.
/// </summary>
/// <param name="fetch">Optional fetch query parameter value.</param>
/// <param name="filter">Optional filter query parameters values.</param>
/// <param name="sort">Optional sort query parameters values.</param>
/// <param name="skip">The amount of items to skip.</param>
/// <param name="take">The amount of items to take.</param>
/// <returns>The paged result of the content item(s).</returns>
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
{
ProtectedAccess protectedAccess = await _requestMemberAccessService.MemberAccessAsync();
Attempt<PagedModel<Guid>, ApiContentQueryOperationStatus> queryAttempt = _apiContentQueryService.ExecuteQuery(fetch, filter, sort, protectedAccess, skip, take);
if (queryAttempt.Success is false)
{
return ApiContentQueryOperationStatusResult(queryAttempt.Status);
}
PagedModel<Guid> pagedResult = queryAttempt.Result;
IEnumerable<IPublishedContent> contentItems = ApiPublishedContentCache.GetByIds(pagedResult.Items);
IApiContentResponse[] apiContentItems = contentItems.Select(ApiContentResponseBuilder.Build).WhereNotNull().ToArray();
var model = new PagedViewModel<IApiContentResponse>
{
Total = pagedResult.Total,
Items = apiContentItems
};
return Ok(model);
}
}
@@ -0,0 +1,67 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Infrastructure.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers;
[ApiVersion("1.0")]
public class QueryMediaApiController : MediaApiControllerBase
{
private readonly IApiMediaQueryService _apiMediaQueryService;
public QueryMediaApiController(
IPublishedSnapshotAccessor publishedSnapshotAccessor,
IApiMediaWithCropsResponseBuilder apiMediaWithCropsResponseBuilder,
IApiMediaQueryService apiMediaQueryService)
: base(publishedSnapshotAccessor, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
/// <summary>
/// Gets a paginated list of media item(s) from query.
/// </summary>
/// <param name="fetch">Optional fetch query parameter value.</param>
/// <param name="filter">Optional filter query parameters values.</param>
/// <param name="sort">Optional sort query parameters values.</param>
/// <param name="skip">The amount of items to skip.</param>
/// <param name="take">The amount of items to take.</param>
/// <returns>The paged result of the media item(s).</returns>
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<ApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
{
Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> queryAttempt = _apiMediaQueryService.ExecuteQuery(fetch, filter, sort, skip, take);
if (queryAttempt.Success is false)
{
return ApiMediaQueryOperationStatusResult(queryAttempt.Status);
}
PagedModel<Guid> pagedResult = queryAttempt.Result;
IPublishedContent[] mediaItems = pagedResult.Items.Select(PublishedMediaCache.GetById).WhereNotNull().ToArray();
var model = new PagedViewModel<ApiMediaWithCropsResponse>
{
Total = pagedResult.Total,
Items = mediaItems.Select(BuildApiMediaWithCrops)
};
return await Task.FromResult(Ok(model));
}
}
@@ -0,0 +1,171 @@
using System.Security.Claims;
using Asp.Versioning;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using OpenIddict.Abstractions;
using OpenIddict.Server.AspNetCore;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Extensions;
using SignInResult = Microsoft.AspNetCore.Mvc.SignInResult;
using IdentitySignInResult = Microsoft.AspNetCore.Identity.SignInResult;
namespace Umbraco.Cms.Api.Delivery.Controllers.Security;
[ApiVersion("1.0")]
[ApiController]
[VersionedDeliveryApiRoute(Common.Security.Paths.MemberApi.EndpointTemplate)]
[ApiExplorerSettings(IgnoreApi = true)]
public class MemberController : DeliveryApiControllerBase
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IMemberSignInManager _memberSignInManager;
private readonly IMemberManager _memberManager;
private readonly DeliveryApiSettings _deliveryApiSettings;
private readonly ILogger<MemberController> _logger;
public MemberController(
IHttpContextAccessor httpContextAccessor,
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<MemberController> logger)
{
_httpContextAccessor = httpContextAccessor;
_memberSignInManager = memberSignInManager;
_memberManager = memberManager;
_logger = logger;
_deliveryApiSettings = deliveryApiSettings.Value;
}
[HttpGet("authorize")]
[MapToApiVersion("1.0")]
public async Task<IActionResult> Authorize()
{
// in principle this is not necessary for now, since the member application has been removed, thus making
// the member client ID invalid for the authentication code flow. However, if we ever add additional flows
// to the API, we should perform this check, so we might as well include it upfront.
if (_deliveryApiSettings.MemberAuthorizationIsEnabled() is false)
{
return BadRequest("Member authorization is not allowed.");
}
HttpContext context = _httpContextAccessor.GetRequiredHttpContext();
OpenIddictRequest? request = context.GetOpenIddictServerRequest();
if (request is null)
{
return BadRequest("Unable to obtain OpenID data from the current request.");
}
// make sure this endpoint ONLY handles member authentication
if (request.ClientId is not Constants.OAuthClientIds.Member)
{
return BadRequest("The specified client ID cannot be used here.");
}
return request.IdentityProvider.IsNullOrWhiteSpace()
? await AuthorizeInternal(request)
: await AuthorizeExternal(request);
}
[HttpGet("signout")]
[MapToApiVersion("1.0")]
public async Task<IActionResult> Signout()
{
await _memberSignInManager.SignOutAsync();
return SignOut(OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);
}
private async Task<IActionResult> AuthorizeInternal(OpenIddictRequest request)
{
// retrieve the user principal stored in the authentication cookie.
AuthenticateResult cookieAuthResult = await HttpContext.AuthenticateAsync(IdentityConstants.ApplicationScheme);
var userName = cookieAuthResult.Succeeded
? cookieAuthResult.Principal?.Identity?.Name
: null;
if (userName is null)
{
return Challenge(IdentityConstants.ApplicationScheme);
}
MemberIdentityUser? member = await _memberManager.FindByNameAsync(userName);
if (member is null)
{
_logger.LogError("The member with username {userName} was successfully authorized, but could not be retrieved by the member manager", userName);
return BadRequest("The member could not be found.");
}
return await SignInMember(member, request);
}
private async Task<IActionResult> AuthorizeExternal(OpenIddictRequest request)
{
var provider = request.IdentityProvider ?? throw new ArgumentException("No identity provider found in request", nameof(request));
ExternalLoginInfo? loginInfo = await _memberSignInManager.GetExternalLoginInfoAsync();
if (loginInfo?.Principal is null)
{
AuthenticationProperties properties = _memberSignInManager.ConfigureExternalAuthenticationProperties(provider, null);
return Challenge(properties, provider);
}
// NOTE: if we're going to support 2FA for members, we need to:
// - use SecuritySettings.MemberBypassTwoFactorForExternalLogins instead of the hardcoded value (true) for "bypassTwoFactor".
// - handle IdentitySignInResult.TwoFactorRequired
IdentitySignInResult result = await _memberSignInManager.ExternalLoginSignInAsync(loginInfo, false, true);
if (result == IdentitySignInResult.Success)
{
// get the member and perform sign-in
MemberIdentityUser? member = await _memberManager.FindByLoginAsync(loginInfo.LoginProvider, loginInfo.ProviderKey);
if (member is null)
{
_logger.LogError("A member was successfully authorized using external authentication, but could not be retrieved by the member manager");
return BadRequest("The member could not be found.");
}
// update member authentication tokens if succeeded
await _memberSignInManager.UpdateExternalAuthenticationTokensAsync(loginInfo);
return await SignInMember(member, request);
}
var errorProperties = new AuthenticationProperties(new Dictionary<string, string?>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.AccessDenied,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The member is not allowed to access this resource."
});
return Forbid(errorProperties, provider);
}
private async Task<IActionResult> SignInMember(MemberIdentityUser member, OpenIddictRequest request)
{
ClaimsPrincipal memberPrincipal = await _memberSignInManager.CreateUserPrincipalAsync(member);
memberPrincipal.SetClaim(OpenIddictConstants.Claims.Subject, member.Key.ToString());
IList<string> roles = await _memberManager.GetRolesAsync(member);
memberPrincipal.SetClaim(Constants.OAuthClaims.MemberKey, member.Key.ToString());
memberPrincipal.SetClaim(Constants.OAuthClaims.MemberRoles, string.Join(",", roles));
Claim[] claims = memberPrincipal.Claims.ToArray();
foreach (Claim claim in claims.Where(claim => claim.Type is not Constants.Security.SecurityStampClaimType))
{
claim.SetDestinations(OpenIddictConstants.Destinations.AccessToken);
}
if (request.GetScopes().Contains(OpenIddictConstants.Scopes.OfflineAccess))
{
// "offline_access" scope is required to use refresh tokens
memberPrincipal.SetScopes(OpenIddictConstants.Scopes.OfflineAccess);
}
return new SignInResult(OpenIddictServerAspNetCoreDefaults.AuthenticationScheme, memberPrincipal);
}
}
@@ -0,0 +1,68 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Common.DependencyInjection;
using Umbraco.Cms.Api.Delivery.Accessors;
using Umbraco.Cms.Api.Delivery.Configuration;
using Umbraco.Cms.Api.Delivery.Handlers;
using Umbraco.Cms.Api.Delivery.Json;
using Umbraco.Cms.Api.Delivery.Rendering;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Api.Delivery.Security;
using Umbraco.Cms.Api.Delivery.Services;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Infrastructure.Security;
namespace Umbraco.Extensions;
public static class UmbracoBuilderExtensions
{
public static IUmbracoBuilder AddDeliveryApi(this IUmbracoBuilder builder)
{
builder.Services.AddScoped<IRequestStartItemProvider, RequestStartItemProvider>();
builder.Services.AddScoped<IOutputExpansionStrategy, RequestContextOutputExpansionStrategy>();
builder.Services.AddSingleton<IRequestCultureService, RequestCultureService>();
builder.Services.AddSingleton<IRequestRoutingService, RequestRoutingService>();
builder.Services.AddSingleton<IRequestRedirectService, RequestRedirectService>();
builder.Services.AddSingleton<IRequestPreviewService, RequestPreviewService>();
builder.Services.AddSingleton<IOutputExpansionStrategyAccessor, RequestContextOutputExpansionStrategyAccessor>();
builder.Services.AddSingleton<IRequestStartItemProviderAccessor, RequestContextRequestStartItemProviderAccessor>();
builder.Services.AddSingleton<IApiAccessService, ApiAccessService>();
builder.Services.AddSingleton<IApiContentQueryService, ApiContentQueryService>();
builder.Services.AddSingleton<IApiContentQueryProvider, ApiContentQueryProvider>();
builder.Services.AddSingleton<IApiMediaQueryService, ApiMediaQueryService>();
builder.Services.AddTransient<IMemberApplicationManager, MemberApplicationManager>();
builder.Services.AddTransient<IRequestMemberAccessService, RequestMemberAccessService>();
builder.Services.ConfigureOptions<ConfigureUmbracoDeliveryApiSwaggerGenOptions>();
builder.AddUmbracoApiOpenApiUI();
builder
.Services
.AddControllers()
.AddJsonOptions(Constants.JsonOptionsNames.DeliveryApi, options =>
{
// all Delivery API specific JSON options go here
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
options.JsonSerializerOptions.TypeInfoResolver = new DeliveryApiJsonTypeResolver();
options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
});
builder.Services.AddAuthentication();
builder.AddUmbracoOpenIddict();
builder.AddNotificationAsyncHandler<UmbracoApplicationStartingNotification, InitializeMemberApplicationNotificationHandler>();
builder.AddNotificationAsyncHandler<MemberSavedNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
builder.AddNotificationAsyncHandler<MemberDeletedNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
builder.AddNotificationAsyncHandler<AssignedMemberRolesNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
builder.AddNotificationAsyncHandler<RemovedMemberRolesNotification, RevokeMemberAuthenticationTokensNotificationHandler>();
// FIXME: remove this when Delivery API V1 is removed
builder.Services.AddSingleton<MatcherPolicy, DeliveryApiItemsEndpointsMatcherPolicy>();
return builder;
}
}
@@ -0,0 +1,43 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class DeliveryApiAccessAttribute : TypeFilterAttribute
{
public DeliveryApiAccessAttribute()
: base(typeof(DeliveryApiAccessFilter))
{
}
private class DeliveryApiAccessFilter : IActionFilter
{
private readonly IApiAccessService _apiAccessService;
private readonly IRequestPreviewService _requestPreviewService;
public DeliveryApiAccessFilter(IApiAccessService apiAccessService, IRequestPreviewService requestPreviewService)
{
_apiAccessService = apiAccessService;
_requestPreviewService = requestPreviewService;
}
public void OnActionExecuting(ActionExecutingContext context)
{
var hasAccess = _requestPreviewService.IsPreview()
? _apiAccessService.HasPreviewAccess()
: _apiAccessService.HasPublicAccess();
if (hasAccess)
{
return;
}
context.Result = new UnauthorizedResult();
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -0,0 +1,35 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class DeliveryApiMediaAccessAttribute : TypeFilterAttribute
{
public DeliveryApiMediaAccessAttribute()
: base(typeof(DeliveryApiMediaAccessFilter))
{
}
private class DeliveryApiMediaAccessFilter : IActionFilter
{
private readonly IApiAccessService _apiAccessService;
public DeliveryApiMediaAccessFilter(IApiAccessService apiAccessService)
=> _apiAccessService = apiAccessService;
public void OnActionExecuting(ActionExecutingContext context)
{
if (_apiAccessService.HasMediaAccess())
{
return;
}
context.Result = new UnauthorizedResult();
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -0,0 +1,37 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class LocalizeFromAcceptLanguageHeaderAttribute : TypeFilterAttribute
{
public LocalizeFromAcceptLanguageHeaderAttribute()
: base(typeof(LocalizeFromAcceptLanguageHeaderAttributeFilter))
{
}
private class LocalizeFromAcceptLanguageHeaderAttributeFilter : IActionFilter
{
private readonly IRequestCultureService _requestCultureService;
public LocalizeFromAcceptLanguageHeaderAttributeFilter(IRequestCultureService requestCultureService)
=> _requestCultureService = requestCultureService;
public void OnActionExecuting(ActionExecutingContext context)
{
var requestedCulture = _requestCultureService.GetRequestedCulture();
if (requestedCulture.IsNullOrWhiteSpace())
{
return;
}
_requestCultureService.SetRequestCulture(requestedCulture);
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -0,0 +1,171 @@
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Delivery.Configuration;
using Umbraco.Cms.Api.Delivery.Controllers;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class SwaggerContentDocumentationFilter : SwaggerDocumentationFilterBase<ContentApiControllerBase>
{
protected override string DocumentationLink => DeliveryApiConfiguration.ApiDocumentationContentArticleLink;
protected override void ApplyOperation(OpenApiOperation operation, OperationFilterContext context)
{
operation.Parameters ??= new List<OpenApiParameter>();
AddExpand(operation);
operation.Parameters.Add(new OpenApiParameter
{
Name = "Accept-Language",
In = ParameterLocation.Header,
Required = false,
Description = "Defines the language to return. Use this when querying language variant content items.",
Schema = new OpenApiSchema { Type = "string" },
Examples = new Dictionary<string, OpenApiExample>
{
{ "Default", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{ "English culture", new OpenApiExample { Value = new OpenApiString("en-us") } }
}
});
AddApiKey(operation);
operation.Parameters.Add(new OpenApiParameter
{
Name = "Preview",
In = ParameterLocation.Header,
Required = false,
Description = "Whether to request draft content.",
Schema = new OpenApiSchema { Type = "boolean" }
});
operation.Parameters.Add(new OpenApiParameter
{
Name = "Start-Item",
In = ParameterLocation.Header,
Required = false,
Description = "URL segment or GUID of a root content item.",
Schema = new OpenApiSchema { Type = "string" }
});
}
protected override void ApplyParameter(OpenApiParameter parameter, ParameterFilterContext context)
{
switch (parameter.Name)
{
case "fetch":
AddQueryParameterDocumentation(parameter, FetchQueryParameterExamples(), "Specifies the content items to fetch");
break;
case "filter":
AddQueryParameterDocumentation(parameter, FilterQueryParameterExamples(), "Defines how to filter the fetched content items");
break;
case "sort":
AddQueryParameterDocumentation(parameter, SortQueryParameterExamples(), "Defines how to sort the found content items");
break;
case "skip":
parameter.Description = PaginationDescription(true, "content");
break;
case "take":
parameter.Description = PaginationDescription(false, "content");
break;
default:
return;
}
}
private Dictionary<string, OpenApiExample> FetchQueryParameterExamples() =>
new()
{
{ "Select all", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Select all ancestors of a node by id",
new OpenApiExample { Value = new OpenApiString("ancestors:id") }
},
{
"Select all ancestors of a node by path",
new OpenApiExample { Value = new OpenApiString("ancestors:path") }
},
{
"Select all children of a node by id",
new OpenApiExample { Value = new OpenApiString("children:id") }
},
{
"Select all children of a node by path",
new OpenApiExample { Value = new OpenApiString("children:path") }
},
{
"Select all descendants of a node by id",
new OpenApiExample { Value = new OpenApiString("descendants:id") }
},
{
"Select all descendants of a node by path",
new OpenApiExample { Value = new OpenApiString("descendants:path") }
}
};
private Dictionary<string, OpenApiExample> FilterQueryParameterExamples() =>
new()
{
{ "Default filter", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Filter by content type",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("contentType:alias1") } }
},
{
"Filter by name",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("name:nodeName") } }
}
};
private Dictionary<string, OpenApiExample> SortQueryParameterExamples() =>
new()
{
{ "Default sort", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Sort by create date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("createDate:asc"), new OpenApiString("createDate:desc")
}
}
},
{
"Sort by level",
new OpenApiExample
{
Value = new OpenApiArray { new OpenApiString("level:asc"), new OpenApiString("level:desc") }
}
},
{
"Sort by name",
new OpenApiExample
{
Value = new OpenApiArray { new OpenApiString("name:asc"), new OpenApiString("name:desc") }
}
},
{
"Sort by sort order",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("sortOrder:asc"), new OpenApiString("sortOrder:desc")
}
}
},
{
"Sort by update date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("updateDate:asc"), new OpenApiString("updateDate:desc")
}
}
}
};
}
@@ -0,0 +1,18 @@
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Umbraco.Cms.Api.Delivery.Filters;
[Obsolete($"Superseded by {nameof(SwaggerContentDocumentationFilter)} and {nameof(SwaggerMediaDocumentationFilter)}. Will be removed in V14.")]
public class SwaggerDocumentationFilter : IOperationFilter, IParameterFilter
{
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
// retained for backwards compat
}
public void Apply(OpenApiParameter parameter, ParameterFilterContext context)
{
// retained for backwards compat
}
}
@@ -0,0 +1,78 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal abstract class SwaggerDocumentationFilterBase<TBaseController>
: SwaggerFilterBase<TBaseController>, IOperationFilter, IParameterFilter
where TBaseController : Controller
{
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
if (CanApply(context))
{
ApplyOperation(operation, context);
}
}
public void Apply(OpenApiParameter parameter, ParameterFilterContext context)
{
if (CanApply(context))
{
ApplyParameter(parameter, context);
}
}
protected abstract string DocumentationLink { get; }
protected abstract void ApplyOperation(OpenApiOperation operation, OperationFilterContext context);
protected abstract void ApplyParameter(OpenApiParameter parameter, ParameterFilterContext context);
protected void AddQueryParameterDocumentation(OpenApiParameter parameter, Dictionary<string, OpenApiExample> examples, string description)
{
parameter.Description = QueryParameterDescription(description);
parameter.Examples = examples;
}
protected void AddExpand(OpenApiOperation operation) =>
operation.Parameters.Add(new OpenApiParameter
{
Name = "expand",
In = ParameterLocation.Query,
Required = false,
Description = QueryParameterDescription("Defines the properties that should be expanded in the response"),
Schema = new OpenApiSchema { Type = "string" },
Examples = new Dictionary<string, OpenApiExample>
{
{ "Expand none", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{ "Expand all", new OpenApiExample { Value = new OpenApiString("all") } },
{
"Expand specific property",
new OpenApiExample { Value = new OpenApiString("property:alias1") }
},
{
"Expand specific properties",
new OpenApiExample { Value = new OpenApiString("property:alias1,alias2") }
}
}
});
protected void AddApiKey(OpenApiOperation operation) =>
operation.Parameters.Add(new OpenApiParameter
{
Name = "Api-Key",
In = ParameterLocation.Header,
Required = false,
Description = "API key specified through configuration to authorize access to the API.",
Schema = new OpenApiSchema { Type = "string" }
});
protected string PaginationDescription(bool skip, string itemType)
=> $"Specifies the number of found {itemType} items to {(skip ? "skip" : "take")}. Use this to control pagination of the response.";
private string QueryParameterDescription(string description)
=> $"{description}. Refer to [the documentation]({DocumentationLink}#query-parameters) for more details on this.";
}
@@ -0,0 +1,19 @@
using System.Reflection;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal abstract class SwaggerFilterBase<TBaseController>
where TBaseController : Controller
{
protected bool CanApply(OperationFilterContext context)
=> CanApply(context.MethodInfo);
protected bool CanApply(ParameterFilterContext context)
=> CanApply(context.ParameterInfo.Member);
private bool CanApply(MemberInfo member)
=> member.DeclaringType?.Implements<TBaseController>() is true;
}
@@ -0,0 +1,119 @@
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Delivery.Configuration;
using Umbraco.Cms.Api.Delivery.Controllers;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class SwaggerMediaDocumentationFilter : SwaggerDocumentationFilterBase<MediaApiControllerBase>
{
protected override string DocumentationLink => DeliveryApiConfiguration.ApiDocumentationMediaArticleLink;
protected override void ApplyOperation(OpenApiOperation operation, OperationFilterContext context)
{
operation.Parameters ??= new List<OpenApiParameter>();
AddExpand(operation);
AddApiKey(operation);
}
protected override void ApplyParameter(OpenApiParameter parameter, ParameterFilterContext context)
{
switch (parameter.Name)
{
case "fetch":
AddQueryParameterDocumentation(parameter, FetchQueryParameterExamples(), "Specifies the media items to fetch");
break;
case "filter":
AddQueryParameterDocumentation(parameter, FilterQueryParameterExamples(), "Defines how to filter the fetched media items");
break;
case "sort":
AddQueryParameterDocumentation(parameter, SortQueryParameterExamples(), "Defines how to sort the found media items");
break;
case "skip":
parameter.Description = PaginationDescription(true, "media");
break;
case "take":
parameter.Description = PaginationDescription(false, "media");
break;
default:
return;
}
}
private Dictionary<string, OpenApiExample> FetchQueryParameterExamples() =>
new()
{
{
"Select all children at root level",
new OpenApiExample { Value = new OpenApiString("children:/") }
},
{
"Select all children of a media item by id",
new OpenApiExample { Value = new OpenApiString("children:id") }
},
{
"Select all children of a media item by path",
new OpenApiExample { Value = new OpenApiString("children:path") }
}
};
private Dictionary<string, OpenApiExample> FilterQueryParameterExamples() =>
new()
{
{ "Default filter", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Filter by media type",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("mediaType:alias1") } }
},
{
"Filter by name",
new OpenApiExample { Value = new OpenApiArray { new OpenApiString("name:nodeName") } }
}
};
private Dictionary<string, OpenApiExample> SortQueryParameterExamples() =>
new()
{
{ "Default sort", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{
"Sort by create date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("createDate:asc"), new OpenApiString("createDate:desc")
}
}
},
{
"Sort by name",
new OpenApiExample
{
Value = new OpenApiArray { new OpenApiString("name:asc"), new OpenApiString("name:desc") }
}
},
{
"Sort by sort order",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("sortOrder:asc"), new OpenApiString("sortOrder:desc")
}
}
},
{
"Sort by update date",
new OpenApiExample
{
Value = new OpenApiArray
{
new OpenApiString("updateDate:asc"), new OpenApiString("updateDate:desc")
}
}
}
};
}
@@ -0,0 +1,42 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class ValidateStartItemAttribute : TypeFilterAttribute
{
public ValidateStartItemAttribute()
: base(typeof(ValidateStartItemFilter))
{
}
private class ValidateStartItemFilter : IActionFilter
{
private readonly IRequestStartItemProviderAccessor _requestStartItemProviderAccessor;
public ValidateStartItemFilter(IRequestStartItemProviderAccessor requestStartItemProviderAccessor)
=> _requestStartItemProviderAccessor = requestStartItemProviderAccessor;
public void OnActionExecuting(ActionExecutingContext context)
{
if (_requestStartItemProviderAccessor.TryGetValue(out IRequestStartItemProvider? requestStartItemProvider) is false
|| requestStartItemProvider.RequestedStartItem() is null)
{
return;
}
IPublishedContent? startItem = requestStartItemProvider.GetStartItem();
if (startItem is null)
{
context.Result = new NotFoundObjectResult("The Start-Item could not be found");
}
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -0,0 +1,79 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Infrastructure.Security;
namespace Umbraco.Cms.Api.Delivery.Handlers;
internal sealed class InitializeMemberApplicationNotificationHandler : INotificationAsyncHandler<UmbracoApplicationStartingNotification>
{
private readonly IMemberApplicationManager _memberApplicationManager;
private readonly IRuntimeState _runtimeState;
private readonly ILogger<InitializeMemberApplicationNotificationHandler> _logger;
private readonly DeliveryApiSettings _deliveryApiSettings;
public InitializeMemberApplicationNotificationHandler(
IMemberApplicationManager memberApplicationManager,
IRuntimeState runtimeState,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<InitializeMemberApplicationNotificationHandler> logger)
{
_memberApplicationManager = memberApplicationManager;
_runtimeState = runtimeState;
_logger = logger;
_deliveryApiSettings = deliveryApiSettings.Value;
}
public async Task HandleAsync(UmbracoApplicationStartingNotification notification, CancellationToken cancellationToken)
{
if (_runtimeState.Level != RuntimeLevel.Run)
{
return;
}
if (_deliveryApiSettings.MemberAuthorization?.AuthorizationCodeFlow?.Enabled is not true)
{
await _memberApplicationManager.DeleteMemberApplicationAsync(cancellationToken);
return;
}
if (ValidateRedirectUrls(_deliveryApiSettings.MemberAuthorization.AuthorizationCodeFlow.LoginRedirectUrls) is false)
{
await _memberApplicationManager.DeleteMemberApplicationAsync(cancellationToken);
return;
}
if (_deliveryApiSettings.MemberAuthorization.AuthorizationCodeFlow.LogoutRedirectUrls.Any()
&& ValidateRedirectUrls(_deliveryApiSettings.MemberAuthorization.AuthorizationCodeFlow.LogoutRedirectUrls) is false)
{
await _memberApplicationManager.DeleteMemberApplicationAsync(cancellationToken);
return;
}
await _memberApplicationManager.EnsureMemberApplicationAsync(
_deliveryApiSettings.MemberAuthorization.AuthorizationCodeFlow.LoginRedirectUrls,
_deliveryApiSettings.MemberAuthorization.AuthorizationCodeFlow.LogoutRedirectUrls,
cancellationToken);
}
private bool ValidateRedirectUrls(Uri[] redirectUrls)
{
if (redirectUrls.Any() is false)
{
_logger.LogWarning("No redirect URLs defined for Delivery API member authentication - cannot enable member authentication");
return false;
}
if (redirectUrls.All(url => url.IsAbsoluteUri) is false)
{
_logger.LogWarning("All redirect URLs defined for Delivery API member authentication must be absolute - cannot enable member authentication");
return false;
}
return true;
}
}
@@ -0,0 +1,102 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using OpenIddict.Abstractions;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Delivery.Handlers;
internal sealed class RevokeMemberAuthenticationTokensNotificationHandler
: INotificationAsyncHandler<MemberSavedNotification>,
INotificationAsyncHandler<MemberDeletedNotification>,
INotificationAsyncHandler<AssignedMemberRolesNotification>,
INotificationAsyncHandler<RemovedMemberRolesNotification>
{
private readonly IMemberService _memberService;
private readonly IOpenIddictTokenManager _tokenManager;
private readonly bool _enabled;
private readonly ILogger<RevokeMemberAuthenticationTokensNotificationHandler> _logger;
public RevokeMemberAuthenticationTokensNotificationHandler(
IMemberService memberService,
IOpenIddictTokenManager tokenManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<RevokeMemberAuthenticationTokensNotificationHandler> logger)
{
_memberService = memberService;
_tokenManager = tokenManager;
_logger = logger;
_enabled = deliveryApiSettings.Value.MemberAuthorizationIsEnabled();
}
public async Task HandleAsync(MemberSavedNotification notification, CancellationToken cancellationToken)
{
if (_enabled is false)
{
return;
}
foreach (IMember member in notification.SavedEntities.Where(member => member.IsLockedOut || member.IsApproved is false))
{
// member is locked out and/or un-approved, make sure we revoke all tokens
await RevokeTokensAsync(member);
}
}
public async Task HandleAsync(MemberDeletedNotification notification, CancellationToken cancellationToken)
{
if (_enabled is false)
{
return;
}
foreach (IMember member in notification.DeletedEntities)
{
await RevokeTokensAsync(member);
}
}
public async Task HandleAsync(AssignedMemberRolesNotification notification, CancellationToken cancellationToken)
=> await MemberRolesChangedAsync(notification);
public async Task HandleAsync(RemovedMemberRolesNotification notification, CancellationToken cancellationToken)
=> await MemberRolesChangedAsync(notification);
private async Task RevokeTokensAsync(IMember member)
{
var tokens = await _tokenManager.FindBySubjectAsync(member.Key.ToString()).ToArrayAsync();
if (tokens.Any() is false)
{
return;
}
_logger.LogInformation("Deleting {count} active tokens for member with ID {id}", tokens.Length, member.Id);
foreach (var token in tokens)
{
await _tokenManager.DeleteAsync(token);
}
}
private async Task MemberRolesChangedAsync(MemberRolesNotification notification)
{
if (_enabled is false)
{
return;
}
foreach (var memberId in notification.MemberIds)
{
IMember? member = _memberService.GetById(memberId);
if (member is null)
{
_logger.LogWarning("Unable to find member with ID {id}", memberId);
continue;
}
await RevokeTokensAsync(member);
}
}
}
@@ -0,0 +1,15 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Filters;
public sealed class ContentTypeFilterIndexer : IContentIndexHandler
{
internal const string FieldName = "contentType";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[] { new IndexFieldValue { FieldName = FieldName, Values = new object[] { content.ContentType.Alias } } };
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.StringRaw, VariesByCulture = false } };
}
@@ -0,0 +1,15 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Filters;
public sealed class NameFilterIndexer : IContentIndexHandler
{
internal const string FieldName = "name";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[] { new IndexFieldValue { FieldName = FieldName, Values = new object[] { content.GetCultureName(culture) ?? string.Empty } } };
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.StringAnalyzed, VariesByCulture = true } };
}
@@ -0,0 +1,17 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Selectors;
public sealed class AncestorsSelectorIndexer : IContentIndexHandler
{
// NOTE: "id" is a reserved field name
internal const string FieldName = "itemId";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[] { new IndexFieldValue { FieldName = FieldName, Values = new object[] { content.Key } } };
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.StringRaw, VariesByCulture = false } };
}
@@ -0,0 +1,35 @@
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Delivery.Indexing.Selectors;
public sealed class ChildrenSelectorIndexer : IContentIndexHandler
{
private readonly IEntityService _entityService;
public ChildrenSelectorIndexer(IEntityService entityService)
=> _entityService = entityService;
internal const string FieldName = "parentId";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
{
Guid parentKey = Guid.Empty;
if (content.ParentId > 0)
{
Attempt<Guid> getKeyAttempt = _entityService.GetKey(content.ParentId, UmbracoObjectTypes.Document);
parentKey = getKeyAttempt.Success ? getKeyAttempt.Result : parentKey;
}
yield return new IndexFieldValue
{
FieldName = FieldName,
Values = new object[] { parentKey }
};
}
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.StringRaw, VariesByCulture = false } };
}
@@ -0,0 +1,36 @@
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Indexing.Selectors;
public sealed class DescendantsSelectorIndexer : IContentIndexHandler
{
internal const string FieldName = "ancestorIds";
private readonly IEntityService _entityService;
public DescendantsSelectorIndexer(IEntityService entityService)
=> _entityService = entityService;
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
{
var ancestorKeys = content.GetAncestorIds()?.Select(id =>
{
Attempt<Guid> getKeyAttempt = _entityService.GetKey(id, UmbracoObjectTypes.Document);
return getKeyAttempt.Success ? getKeyAttempt.Result : (object)Guid.Empty;
}).ToArray() ?? Array.Empty<object>();
yield return new IndexFieldValue
{
FieldName = FieldName,
Values = ancestorKeys
};
}
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.StringRaw, VariesByCulture = false } };
}
@@ -0,0 +1,15 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Sorts;
public sealed class CreateDateSortIndexer : IContentIndexHandler
{
internal const string FieldName = "createDate";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[] { new IndexFieldValue { FieldName = FieldName, Values = new object[] { content.CreateDate } } };
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.Date, VariesByCulture = false } };
}
@@ -0,0 +1,15 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Sorts;
public sealed class LevelSortIndexer : IContentIndexHandler
{
internal const string FieldName = "level";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[] { new IndexFieldValue { FieldName = FieldName, Values = new object[] { content.Level } } };
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.Number, VariesByCulture = false } };
}
@@ -0,0 +1,15 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Sorts;
public sealed class NameSortIndexer : IContentIndexHandler
{
internal const string FieldName = "sortName";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[] { new IndexFieldValue { FieldName = FieldName, Values = new object[] { content.GetCultureName(culture) ?? string.Empty } } };
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.StringSortable, VariesByCulture = true } };
}
@@ -0,0 +1,15 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Sorts;
public sealed class SortOrderSortIndexer : IContentIndexHandler
{
internal const string FieldName = "sortOrder";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[] { new IndexFieldValue { FieldName = FieldName, Values = new object[] { content.SortOrder } } };
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.Number, VariesByCulture = false } };
}
@@ -0,0 +1,22 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
namespace Umbraco.Cms.Api.Delivery.Indexing.Sorts;
public sealed class UpdateDateSortIndexer : IContentIndexHandler
{
internal const string FieldName = "updateDate";
public IEnumerable<IndexFieldValue> GetFieldValues(IContent content, string? culture)
=> new[]
{
new IndexFieldValue
{
FieldName = FieldName,
Values = new object[] { (culture is not null ? content.GetUpdateDate(culture) : null) ?? content.UpdateDate }
}
};
public IEnumerable<IndexField> GetFields()
=> new[] { new IndexField { FieldName = FieldName, FieldType = FieldType.Date, VariesByCulture = true } };
}
@@ -0,0 +1,43 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization.Metadata;
using Umbraco.Cms.Core.Models.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Json;
// see https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism?pivots=dotnet-7-0
public class DeliveryApiJsonTypeResolver : DefaultJsonTypeInfoResolver
{
public override JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options)
{
JsonTypeInfo jsonTypeInfo = base.GetTypeInfo(type, options);
if (jsonTypeInfo.Type == typeof(IApiContent))
{
ConfigureJsonPolymorphismOptions(jsonTypeInfo, typeof(ApiContent));
}
else if (jsonTypeInfo.Type == typeof(IApiContentResponse))
{
ConfigureJsonPolymorphismOptions(jsonTypeInfo, typeof(ApiContentResponse));
}
else if (jsonTypeInfo.Type == typeof(IRichTextElement))
{
ConfigureJsonPolymorphismOptions(jsonTypeInfo, typeof(RichTextGenericElement), typeof(RichTextTextElement));
}
return jsonTypeInfo;
}
private void ConfigureJsonPolymorphismOptions(JsonTypeInfo jsonTypeInfo, params Type[] derivedTypes)
{
jsonTypeInfo.PolymorphismOptions = new JsonPolymorphismOptions
{
UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FailSerialization,
};
foreach (Type derivedType in derivedTypes)
{
jsonTypeInfo.PolymorphismOptions.DerivedTypes.Add(new JsonDerivedType(derivedType));
}
}
}
@@ -0,0 +1,31 @@
using Umbraco.Cms.Api.Delivery.Indexing.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying.Filters;
public sealed class ContentTypeFilter : IFilterHandler
{
private const string ContentTypeSpecifier = "contentType:";
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(ContentTypeSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public FilterOption BuildFilterOption(string filter)
{
var alias = filter.Substring(ContentTypeSpecifier.Length);
return new FilterOption
{
FieldName = ContentTypeFilterIndexer.FieldName,
Values = alias.IsNullOrWhiteSpace() == false
? new[] { alias.TrimStart('!') }
: Array.Empty<string>(),
Operator = alias.StartsWith('!')
? FilterOperation.IsNot
: FilterOperation.Is
};
}
}
@@ -0,0 +1,31 @@
using Umbraco.Cms.Api.Delivery.Indexing.Filters;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Querying.Filters;
public sealed class NameFilter : IFilterHandler
{
private const string NameSpecifier = "name:";
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(NameSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public FilterOption BuildFilterOption(string filter)
{
var value = filter.Substring(NameSpecifier.Length);
var negate = value.StartsWith('!');
var values = value.TrimStart('!').Split(Constants.CharArrays.Comma);
return new FilterOption
{
FieldName = NameFilterIndexer.FieldName,
Values = values,
Operator = negate
? FilterOperation.DoesNotContain
: FilterOperation.Contains
};
}
}
@@ -0,0 +1,40 @@
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying;
public abstract class QueryOptionBase
{
private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor;
private readonly IRequestRoutingService _requestRoutingService;
public QueryOptionBase(IPublishedSnapshotAccessor publishedSnapshotAccessor,
IRequestRoutingService requestRoutingService)
{
_publishedSnapshotAccessor = publishedSnapshotAccessor;
_requestRoutingService = requestRoutingService;
}
protected Guid? GetGuidFromQuery(string queryStringValue)
{
if (queryStringValue.IsNullOrWhiteSpace())
{
return null;
}
if (Guid.TryParse(queryStringValue, out Guid id))
{
return id;
}
IPublishedSnapshot publishedSnapshot = _publishedSnapshotAccessor.GetRequiredPublishedSnapshot();
// Check if the passed value is a path of a content item
var contentRoute = _requestRoutingService.GetContentRoute(queryStringValue);
IPublishedContent? contentItem = publishedSnapshot.Content?.GetByRoute(contentRoute);
return contentItem?.Key;
}
}
@@ -0,0 +1,53 @@
using Umbraco.Cms.Api.Delivery.Indexing.Selectors;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying.Selectors;
public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler
{
private const string AncestorsSpecifier = "ancestors:";
private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor;
public AncestorsSelector(IPublishedSnapshotAccessor publishedSnapshotAccessor, IRequestRoutingService requestRoutingService)
: base(publishedSnapshotAccessor, requestRoutingService) =>
_publishedSnapshotAccessor = publishedSnapshotAccessor;
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(AncestorsSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public SelectorOption BuildSelectorOption(string selector)
{
var fieldValue = selector[AncestorsSpecifier.Length..];
Guid? id = GetGuidFromQuery(fieldValue);
if (id is null)
{
// Setting the Value to "" since that would yield no results.
// It won't be appropriate to return null here since if we reached this,
// it means that CanHandle() returned true, meaning that this Selector should be able to handle the selector value
return new SelectorOption
{
FieldName = AncestorsSelectorIndexer.FieldName,
Values = Array.Empty<string>()
};
}
IPublishedSnapshot publishedSnapshot = _publishedSnapshotAccessor.GetRequiredPublishedSnapshot();
IPublishedContent contentItem = publishedSnapshot.Content?.GetById((Guid)id)
?? throw new InvalidOperationException("Could not obtain the content cache");
var ancestorKeys = contentItem.Ancestors().Select(a => a.Key.ToString("D")).ToArray();
return new SelectorOption
{
FieldName = AncestorsSelectorIndexer.FieldName,
Values = ancestorKeys
};
}
}
@@ -0,0 +1,35 @@
using Umbraco.Cms.Api.Delivery.Indexing.Selectors;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying.Selectors;
public sealed class ChildrenSelector : QueryOptionBase, ISelectorHandler
{
private const string ChildrenSpecifier = "children:";
public ChildrenSelector(IPublishedSnapshotAccessor publishedSnapshotAccessor, IRequestRoutingService requestRoutingService)
: base(publishedSnapshotAccessor, requestRoutingService)
{
}
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(ChildrenSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public SelectorOption BuildSelectorOption(string selector)
{
var fieldValue = selector[ChildrenSpecifier.Length..];
var id = GetGuidFromQuery(fieldValue)?.ToString("D");
return new SelectorOption
{
FieldName = ChildrenSelectorIndexer.FieldName,
Values = id.IsNullOrWhiteSpace() == false
? new[] { id }
: Array.Empty<string>()
};
}
}
@@ -0,0 +1,35 @@
using Umbraco.Cms.Api.Delivery.Indexing.Selectors;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying.Selectors;
public sealed class DescendantsSelector : QueryOptionBase, ISelectorHandler
{
private const string DescendantsSpecifier = "descendants:";
public DescendantsSelector(IPublishedSnapshotAccessor publishedSnapshotAccessor, IRequestRoutingService requestRoutingService)
: base(publishedSnapshotAccessor, requestRoutingService)
{
}
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(DescendantsSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public SelectorOption BuildSelectorOption(string selector)
{
var fieldValue = selector[DescendantsSpecifier.Length..];
var id = GetGuidFromQuery(fieldValue)?.ToString("D");
return new SelectorOption
{
FieldName = DescendantsSelectorIndexer.FieldName,
Values = id.IsNullOrWhiteSpace() == false
? new[] { id }
: Array.Empty<string>()
};
}
}
@@ -0,0 +1,26 @@
using Umbraco.Cms.Api.Delivery.Indexing.Sorts;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Querying.Sorts;
public sealed class CreateDateSort : ISortHandler
{
private const string SortOptionSpecifier = "createDate:";
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(SortOptionSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public SortOption BuildSortOption(string sort)
{
var sortDirection = sort.Substring(SortOptionSpecifier.Length);
return new SortOption
{
FieldName = CreateDateSortIndexer.FieldName,
Direction = sortDirection.StartsWith("asc") ? Direction.Ascending : Direction.Descending
};
}
}
@@ -0,0 +1,26 @@
using Umbraco.Cms.Api.Delivery.Indexing.Sorts;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Querying.Sorts;
public sealed class LevelSort : ISortHandler
{
private const string SortOptionSpecifier = "level:";
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(SortOptionSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public SortOption BuildSortOption(string sort)
{
var sortDirection = sort.Substring(SortOptionSpecifier.Length);
return new SortOption
{
FieldName = LevelSortIndexer.FieldName,
Direction = sortDirection.StartsWith("asc") ? Direction.Ascending : Direction.Descending
};
}
}
@@ -0,0 +1,26 @@
using Umbraco.Cms.Api.Delivery.Indexing.Sorts;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Querying.Sorts;
public sealed class NameSort : ISortHandler
{
private const string SortOptionSpecifier = "name:";
/// <inheritdoc />
public bool CanHandle(string query)
=> query.StartsWith(SortOptionSpecifier, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc/>
public SortOption BuildSortOption(string sort)
{
var sortDirection = sort.Substring(SortOptionSpecifier.Length);
return new SortOption
{
FieldName = NameSortIndexer.FieldName,
Direction = sortDirection.StartsWith("asc") ? Direction.Ascending : Direction.Descending
};
}
}

Some files were not shown because too many files have changed in this diff Show More