Compare commits

...
1523 Commits
Author SHA1 Message Date
Andy Butland c6ab394947 Merge branch 'release/10.8.11' into v10/dev
# Conflicts:
#	version.json
2025-07-02 06:32:18 +02:00
Kenn JacobsenandGitHub d8f68d2c40 Merge commit from fork 2025-06-24 08:39:17 +02:00
Andy Butland ff88617db0 Bumped version to 10.8.11. 2025-06-05 07:49:09 +02:00
Andy Butland 9f912aea0e Merge branch 'release/10.8.10' into v10/dev
# Conflicts:
#	version.json
2025-05-06 07:15:10 +02:00
Andy Butland ba95c12f09 Resolved failures in unit tests. 2025-05-06 05:37:30 +02:00
Andy ButlandandGitHub 14fbd20665 Merge commit from fork
* Backport user enumeration fix.

* Supress warning on use of .NET 6 with TimeProvider dependency.

* Replace TimeProvider with Stopwatch, as the former isn't tested against .NET 6.0 and generates warnings.

* Remove full path details from exception when requesting a path outside of the physical file system's root.

* Added randomness to login duration.

* Ensured against negative duration.
2025-05-06 05:11:03 +02:00
mole 2d8b5e8786 Use windows agent for nuget push 2025-04-28 10:48:26 +02:00
Andy Butland 747e095178 Bump version to 10.8.10. 2025-04-22 10:06:27 +02:00
Andy Butland 1cfa5a225e Merge branch 'release/10.8.9' into v10/dev
# Conflicts:
#	version.json
2025-03-11 09:20:51 +01:00
7888b9a4ce Merge commit from fork
* Bumped version to 10.8.9.

* Fixed parsing of node if in content and media permission querystring handlers to retrieve expected value when multiple are provided in the querystring.

# Conflicts:
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/ContentPermissionsQueryStringHandlerTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/MediaPermissionsQueryStringHandlerTests.cs

* Add HttpPost attributes to backoffice endpoints that should only accept post requests.

* Narrow PermissionQueryString parsing to the releveant UmbracoObjectType

* Add missed update from v10

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-11 05:11:08 +01:00
Andy Butland e31582b297 Backport bumped imagesharp to prevent CVE-2025-27598 #18602 2025-03-09 08:58:25 +01:00
Nikolaj Geisle 75cc017a18 Merge branch 'release/10.8.8' into v10/dev
# Conflicts:
#	version.json
2025-01-23 11:08:09 +01:00
d60137e6da Merge commit from fork
* Ensure preview can only be requested with a valid culture code.

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

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

* Restricted to predefined culture codes.

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-01-20 14:14:28 +01:00
Andy Butland 9f9c88781a Bumped version to 10.8.8. 2025-01-07 10:08:01 +01:00
c7014e159b Sort manifest file paths alphabetically (#14466)
* Sort manifest file paths alphabetically

* Update src/Umbraco.Infrastructure/Manifest/ManifestParser.cs

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

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2024-11-21 16:19:48 +01:00
Zeegaan 31e1acce67 Merge remote-tracking branch 'origin/release/10.8.7' into v10/dev
# Conflicts:
#	version.json
2024-10-23 08:48:08 +02:00
Sven GeusensandNikolaj Geisle 35c51a029a Prevents XSS when viewing an uploaded SVG
from the media-info and image-preview components.
2024-10-21 12:42:06 +02:00
ElitsaandNikolaj Geisle 8c1128c85b Update the HttpContext's user with the authenticated user's principal 2024-10-21 12:41:42 +02:00
ElitsaandNikolaj Geisle c9021ab2d2 Reduce the time when getRemainingTimeoutSeconds request is made from 30s to 20s, so fewer calls are made 2024-10-21 12:41:18 +02:00
ElitsaandNikolaj Geisle 67a71f8f82 Make sure that the client shows the login screen as close to the server's timout time as possible 2024-10-21 12:41:17 +02:00
Andreas ZerbstandAndreas Zerbst edd0a4a4a9 Updated message pack (#17320)
(cherry picked from commit 11270eaaf5)
2024-10-21 11:46:43 +02:00
Andreas ZerbstandGitHub 11270eaaf5 Updated message pack (#17320) 2024-10-21 11:00:47 +02:00
Bjarke BergandGitHub 2d71b5a63b Updated image sharp to a non vulnerable version (#17290) 2024-10-16 12:16:38 +02:00
Nikolaj Geisle 9bab74d30e Bump version.json 2024-10-07 11:55:34 +02:00
Bjarke Berg 0ee0db8071 Merge remote-tracking branch 'refs/remotes/origin/release/10.8' into v10/dev
# Conflicts:
#	version.json
2024-05-21 08:44:27 +02:00
Bjarke BergandGitHub c17d4e1a60 Merge pull request from GHSA-j74q-mv2c-rxmp 2024-05-17 08:37:51 +02:00
Bjarke Berg fee222daff Bump version 2024-05-03 09:29:37 +02:00
119fde2033 V10: Fix for fallback file upload (#14892) (#15868)
* 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>

(cherry picked from commit 0b5d1f8aa6)

* Fix up formatting

---------

Co-authored-by: Ambert van Unen <ambertvu@gmail.com>
2024-04-24 13:44:20 +02:00
Andy ButlandandGitHub 52c21b0fca Updates JSON schema for Umbraco 10 with latest references for Forms and Deploy (#15918) 2024-03-20 13:20:40 +01:00
Bjarke Berg 99d5a7e609 Merge remote-tracking branch 'origin/release/10.8' into v10/dev 2024-03-19 08:43:59 +01:00
JeyandBjarke Berg 7e1d1a1968 Merge pull request from GHSA-552f-97wf-pmpq
Co-authored-by: jey <jey@umbraco.dk>
(cherry picked from commit b743f6a2df)
2024-03-18 08:28:25 +01:00
b743f6a2df Merge pull request from GHSA-552f-97wf-pmpq
Co-authored-by: jey <jey@umbraco.dk>
2024-03-18 08:27:41 +01:00
Bjarke Berg a2511ff09b Fixing locking issues for document type saves. (#15854)
* Added  ExecuteNonQuery(DbCommand command) on database to ensure we call OnExecutingCommand and OnExecutedCommand when executing DbCommands

* Added Cache Instructions lock, to avoid deadlocks

* Optimized read locks for nucache when only one content type is rebuilt

* Optimized the SqlServer locks, so only one command is executed (and thereby roundtrip) per lock instead of two

* Avoid breaking changes

* Cosmetic changes

* Take locks if everything is rebuild

* Use same lock in scopes, to avoid potential deadlocks between the two

* Use eager locks in PublishedSnapshotService.cs

* Added timeouts to some of the application locks

* Revert "Use eager locks in PublishedSnapshotService.cs"

This reverts commit 01873aae97.

* Revert "Added Cache Instructions lock, to avoid deadlocks"

This reverts commit e3fca7c12a.

* Use single readlock call to lock many

* Use eager locks for reads

* Eager write locks

* Ignore test of lazy locks

* Unique timeout exception messages

---------

Co-authored-by: kjac <kja@umbraco.dk>
(cherry picked from commit 2c23e67c65)
2024-03-15 14:55:20 +01:00
2c23e67c65 Fixing locking issues for document type saves. (#15854)
* Added  ExecuteNonQuery(DbCommand command) on database to ensure we call OnExecutingCommand and OnExecutedCommand when executing DbCommands

* Added Cache Instructions lock, to avoid deadlocks

* Optimized read locks for nucache when only one content type is rebuilt

* Optimized the SqlServer locks, so only one command is executed (and thereby roundtrip) per lock instead of two

* Avoid breaking changes

* Cosmetic changes

* Take locks if everything is rebuild

* Use same lock in scopes, to avoid potential deadlocks between the two

* Use eager locks in PublishedSnapshotService.cs

* Added timeouts to some of the application locks

* Revert "Use eager locks in PublishedSnapshotService.cs"

This reverts commit 01873aae97.

* Revert "Added Cache Instructions lock, to avoid deadlocks"

This reverts commit e3fca7c12a.

* Use single readlock call to lock many

* Use eager locks for reads

* Eager write locks

* Ignore test of lazy locks

* Unique timeout exception messages

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-03-15 10:56:02 +01:00
Bjarke Berg 8e837d387d Merge remote-tracking branch 'origin/v10/dev' into release/10.8
# Conflicts:
#	version.json
2024-03-14 14:53:42 +01:00
Bjarke Berg 801fb5f885 Bump version 2024-03-14 14:48:09 +01:00
Bjarke BergandGitHub ed517ecd86 Update Imagesharp (#15885) 2024-03-14 14:31:30 +01:00
Bjarke Berg b5e46ba880 Merge remote-tracking branch 'origin/release/10.8' into v10/dev 2024-02-06 11:07:16 +01:00
Nikolaj GeisleandGitHub cbf9f9bcd1 Merge pull request from GHSA-gvpc-3pj6-4m9w
* Add MarkDownPropertyValueEditor with html sanitizer

* Implement IMarkdownSanitizer.
2024-02-06 09:53:40 +01:00
Bjarke Berg 2735f17ed8 Merge remote-tracking branch 'origin/release/10.8' into v10/dev
# Conflicts:
#	version.json
2024-02-01 11:09:47 +01:00
Ronald BarendseandBjarke Berg e37cf30690 Skip cache refresher operations for content blueprints (#15633)
* Skip cache refresher operations for content blueprints

* Fix JsonPayload deserialization error by adding a default constructor and property initializers

* Obsolete JsonPayload constructor and update usages

(cherry picked from commit 3e28e10cdf)
2024-02-01 10:00:42 +01:00
Bjarke BergandGitHub 118ac8e230 V10+ version of https://github.com/umbraco/Umbraco-CMS/pull/15638 (#15664) 2024-02-01 09:58:42 +01:00
Ronald BarendseandGitHub 3e28e10cdf Skip cache refresher operations for content blueprints (#15633)
* Skip cache refresher operations for content blueprints

* Fix JsonPayload deserialization error by adding a default constructor and property initializers

* Obsolete JsonPayload constructor and update usages
2024-02-01 09:55:09 +01:00
AleksanderandBjarke Berg b18b6cc5e7 Pass cache level to properties when creating published content in nucache
(cherry picked from commit d9d2b66e85)

# Conflicts:
#	src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs
(cherry picked from commit 040495f359)
2024-01-31 10:52:01 +01:00
Elitsa MarinovskaandBjarke Berg 7a04baf9ef V10: Pass in variation context to published cache (#15563)
* Make sure that we always have variation context

* Fix references

(cherry picked from commit 57b3a196bf)
2024-01-30 15:57:33 +01:00
Sven GeusensandBjarke Berg bc1ddaed8c Run the same cleanup with scaffolding content as when copying. (#15541)
* Run the same cleanup with scaffolding content as when copying.

- Added a new ContentScaffoldedNotification
- Published the notification when a new scaffold has been created from a blueprint (content template)
- Linked up the ComplextPEContent handler to do the same cleanup for the new notification as when copying.
- registered handlers to the event for blocklist, blockgrid and nested content

* PR pattern matching suggestion

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>
(cherry picked from commit dff90c6ec0)
2024-01-30 15:54:33 +01:00
Bjarke Berg 860afb35f2 Bump version 2024-01-30 15:53:21 +01:00
Ronald BarendseandGitHub 9799c550f4 Create shadow file systems in configured LocalTempPath (#15637) 2024-01-29 08:48:45 +01:00
Ronald BarendseandGitHub b7e43a8def Get references from macro parameters using IDataValueReferenceFactory (#15625) 2024-01-23 16:08:17 +01:00
Ronald BarendseandGitHub cdbbd6a921 Optimize relation tracking for adding new and keeping existing relations (#15596)
* Include automatic relation type aliases from factory and fix SQL parameter overflow (#15141)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations (#15160)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations

* Always get all automatic relation type aliases

* Do not set relation type alias for unknown entity types

* Get references from recursive (nested/block) properties

* Optimize relation tracking for adding new and keeping existing relations

* Optimize getting references by grouping by property editor alias and avoiding duplicate parsing of the same value
2024-01-22 14:53:20 +01:00
Ronald BarendseandGitHub 5198e7c52d Backport relation tracking fixes and get references from recursive (nested/block) properties (#15593)
* Include automatic relation type aliases from factory and fix SQL parameter overflow (#15141)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations (#15160)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations

* Always get all automatic relation type aliases

* Do not set relation type alias for unknown entity types

* Get references from recursive (nested/block) properties
2024-01-19 20:02:57 +01:00
Andy ButlandandGitHub 49f5d2e2d4 Updates JSON schema for Umbraco 10 to include details of additional configuration introduced in Forms and Deploy. (#15566) 2024-01-12 13:13:20 +01:00
Elitsa MarinovskaandGitHub 57b3a196bf V10: Pass in variation context to published cache (#15563)
* Make sure that we always have variation context

* Fix references
2024-01-11 12:46:31 +01:00
dff90c6ec0 Run the same cleanup with scaffolding content as when copying. (#15541)
* Run the same cleanup with scaffolding content as when copying.

- Added a new ContentScaffoldedNotification
- Published the notification when a new scaffold has been created from a blueprint (content template)
- Linked up the ComplextPEContent handler to do the same cleanup for the new notification as when copying.
- registered handlers to the event for blocklist, blockgrid and nested content

* PR pattern matching suggestion

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>
2024-01-10 12:22:36 +01:00
AleksanderandSebastiaan Janssen 040495f359 Pass cache level to properties when creating published content in nucache
(cherry picked from commit d9d2b66e85)

# Conflicts:
#	src/Umbraco.Web/PublishedCache/NuCache/PublishedContent.cs
2024-01-08 14:42:17 +01:00
Bjarke Berg a2ad95d965 Change content 2023-12-22 13:49:57 +01:00
Bjarke Berg 64f2447c0e Added script to update default version 2023-12-22 13:15:13 +01:00
Bjarke Berg b648126d19 Use wildcard as default valid 2023-12-22 12:59:13 +01:00
812b414d96 Batched more update calls to avoid Sql paramater count error (#15487)
Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-12-21 09:43:37 +01:00
Bjarke Berg ec91c47158 Merge remote-tracking branch 'origin/release/10.8' into v10/dev
# Conflicts:
#	version.json
2023-12-20 09:51:14 +01:00
Kenn JacobsenandGitHub e04a41be45 Add policies for content template handling (#15482) 2023-12-19 14:18:48 +01:00
Chris Fitz-AvonandBjarke Berg d5156aced2 Remove content section access policy from GetAllLanguages endpoint. #15435 (#15450)
(cherry picked from commit cedfdcc9b2)
2023-12-18 08:25:00 +01:00
Bjarke Berg fa9b0e4718 Bump version 2023-12-18 08:23:34 +01:00
Bjarke Berg 8915064780 Merge remote-tracking branch 'origin/release/10.8' into v10/dev
# Conflicts:
#	version.json
2023-12-13 09:28:19 +01:00
ZeegaanandBjarke Berg 677ff59d04 Loosen up policies so editors can get what they need 2023-12-12 15:46:46 +01:00
Bjarke Berg 1fe2ec08be bump version 2023-12-12 15:35:15 +01:00
Bjarke Berg 5dfa76600a Post fix 2023-12-11 16:32:38 +01:00
Bjarke Berg 83bcd37250 Merge remote-tracking branch 'origin/release/10.8' into v10/dev 2023-12-11 14:37:10 +01:00
Kenn JacobsenandGitHub 4a7ad4a562 Merge pull request from GHSA-v98m-398x-269r 2023-12-11 14:00:23 +01:00
cdd4d2a000 Merge pull request from GHSA-cfr5-7p54-4qg8
* Bump version

* Apply authorization policies to controllers

* Return bad request if we urltracking is disabled

* Apply authorization policies to controllers

* Return bad request if we urltracking is disabled

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-12-11 13:59:59 +01:00
be5a740c96 Merge pull request from GHSA-8qp8-9rpw-j46c
* Added Exception handling and replicated error and info message

* Update auth.resource.js

Fixed the message

* Changed Delay introduction to early phase to avoid repeating code.

---------

Co-authored-by: jey <jey@umbraco.dk>
Co-authored-by: Jey <cyaqublu@gmail.com>
2023-12-11 13:59:35 +01:00
13cc320f19 Merge pull request from GHSA-6324-52pr-h4p5
* Bump version

* Fix https://github.com/umbraco/Umbraco-CMS/security/advisories/GHSA-6324-52pr-h4p5

* Fix https://github.com/umbraco/Umbraco-CMS/security/advisories/GHSA-6324-52pr-h4p5

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-12-11 13:59:03 +01:00
ZeegaanandBjarke Berg b5544aa520 Suppress flow when queueing background threads 2023-12-11 12:43:25 +01:00
Bjarke Berg 9e3f8c7d0c Merge remote-tracking branch 'origin/release/10.8' into v10/dev
# Conflicts:
#	version.json
2023-12-08 13:12:33 +01:00
Bjarke Berg cb76554455 Bugfix: Count existing media correct (#15206)
* https://github.com/umbraco/Umbraco-CMS/issues/15205
Count media correct

* Fix content should be document

(cherry picked from commit d2ff2ea46e)
2023-12-07 09:21:25 +01:00
Jacob Overgaard 37e4d80ce8 Update nightly build (#15359)
* cherry-pick templateParameters from v14/dev

* add isNightly parameter

* remove v9

* add parameter check for myget isNightly
2023-12-05 12:45:23 +01:00
Bjarke Berg d5d4edbe92 Bump Version 2023-11-30 21:51:54 +01:00
Bjarke Berg 8d9343b564 Merge branch 'release/10.8' into v10/dev
# Conflicts:
#	version.json
2023-11-27 18:10:40 +01:00
Bjarke Berg 1ee891c8d5 Merge remote-tracking branch 'origin/release/10.8' into release/10.8 2023-11-27 18:09:41 +01:00
Bjarke Berg bf1a5b9b28 Bump version 2023-11-27 18:09:30 +01:00
Bjarke Berg 696b74cdb6 Merge branch 'release/10.8' into v10/dev 2023-11-27 18:08:30 +01:00
Bjarke BergandGitHub bf8af4588e Centralised NuGet packages (#15293)
* Moved to centralized nuget packages

* Handle JsonSchema

* Change PackageReference to PackageVersion

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

* ManagePackageVersionsCentrally = false

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

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

* change working directory

* workingDirectory

* Force the template to use local nuget packages

* Force the template to use local nuget packages

* clean up

* added wait on

* added wait on
2023-11-27 15:18:00 +01:00
Kenn JacobsenandBjarke Berg 4781fb1d8b Ensure content types are updated in ContentStore when a data type changes (#15239) 2023-11-17 10:37:23 +01:00
Bjarke Berg d714741bee Fixed build 2023-11-15 09:53:28 +01:00
Bjarke Berg ea33b73daa Added scope.complete in edge cases. (#15207)
(cherry picked from commit 28e8ac11f0)
2023-11-15 09:46:24 +01:00
Bjarke Berg ba64b46824 Merge remote-tracking branch 'origin/release/10.8' into release/10.8 2023-11-15 09:45:30 +01:00
Bjarke Berg 04e59e9a9d 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

(cherry picked from commit 41f8f03c2c)
2023-11-15 09:45:23 +01:00
Jacob OvergaardandGitHub be39b9c19a V10: Update @umbraco-ui/uui, jQuery, ace-editor, nouislider, spectrum-colorpicker2 (#15197)
* V13: Add support for Node.js 20 (#15022)

* update versionSpec to nodejs 20 and avoid specifying minor and patch versions to improve Azure Pipelines stability

* update engines and package lock files

* update helpful displayNames for npm builds

* add retry to counter nodejs.org timeouts

add retryCountOnTaskFailure as suggested on https://developercommunity.visualstudio.com/t/NodeTool0-task-to-install-nodejs-fails/10455454

* update lockfile

* bump nvm support to latest node.js 20.9 LTS

* build(deps): bump @umbraco-ui/uui from 1.3.0 to 1.5.0

* build(deps): bump public dependencies to latest

* build(deps-dev): bump build dependencies to latest

* build(deps-dev): bump test tools to latest

* build: add script to lint and run --fix

* revert login merge from v13
2023-11-14 13:08:29 +01:00
Bjarke Berg 9a143c0850 Merge remote-tracking branch 'origin/release/10.8' into release/10.8 2023-11-14 11:46:26 +01:00
Bjarke Berg df4cd63962 https://github.com/umbraco/Umbraco-CMS/issues/15195 Fixed issue with media not cached correct (#15196) 2023-11-14 10:59:30 +01:00
Bjarke Berg a17e398f28 Merge remote-tracking branch 'origin/release/10.8' into v10/dev 2023-11-14 09:29:36 +01:00
Bjarke Berg 9af9dd2c02 Merge remote-tracking branch 'origin/release/10.8' into v10/dev 2023-11-14 09:29:09 +01:00
Bjarke BergandGitHub 2266a98fc6 https://github.com/umbraco/Umbraco-CMS/issues/15195 Fixed issue with media not cached correct (#15196) 2023-11-14 09:14:01 +01:00
151fccee97 Performance optimisations related to blocks (and multi url picker) (#15184)
* Added content types to property index value factory, because the deep cloning is too expensive to execute often

* Do not use entityservice in ToEditor, as it goes to the database. We need to use something that is cached.

* Small performance optimization for nested content too

* A little formatting and an obsoletion message

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-11-14 08:12:05 +01:00
Bjarke Berg abfa07367f Bump version 2023-11-13 18:06:41 +01:00
Bjarke BergandGitHub e5de8bf56b Updated nuget packages (#15192) 2023-11-13 14:59:52 +01:00
Bjarke Berg 00bb5170a0 Merge remote-tracking branch 'origin/v10/dev' into release/10.8
# Conflicts:
#	version.json
2023-11-09 13:53:46 +01:00
919138c299 #14835 Update link on permissionsreport.html (#14872)
* #14835 Update link on permissionsreport.html

Updated link to permissions page to point to 10-LTS documentation

* retrigger checks

---------

Co-authored-by: Rasmus Berntsen <rasmus.berntsen@isobar.com>
2023-11-09 13:53:18 +01:00
Ronald BarendseandGitHub ed65645a33 Add global.json and cleanup UI project file (#14900)
* Add global.json with minimum .NET 6.0.5 SDK version and roll forward policy

* Clean up UI project file
2023-11-09 13:52:21 +01:00
Ronald BarendseandGitHub d0be4ab263 Publish ContentTreeChangeNotification after saving/deleting blueprints (#14898) 2023-11-09 13:51:05 +01:00
Bjarke Berg ddb26632f9 Bump to rc 2023-11-09 13:38:34 +01:00
Bjarke Berg d5b1f5875b Bump version 2023-11-09 13:38:13 +01:00
Bjarke Berg f8c1a560ff Bump version 2023-11-09 13:36:57 +01:00
9e5ff305c8 Batched bulk WhereIn query to avoid To mana paramaters error (#15004)
Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-11-07 10:49:46 +01:00
Elitsa MarinovskaandGitHub ffaa77eb25 Update correct action (#15142) 2023-11-06 17:54:16 +01:00
Kenn JacobsenandGitHub 6777145079 Ensure that missing access rules do not break the site (#15081) 2023-11-02 08:45:27 +01:00
Elitsa MarinovskaandGitHub 92af8ac881 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:30:32 +01:00
Lucas Bach BisgaardandSebastiaan Janssen bde88caf14 Fixes #14351 - Using Fallback to default langauge on a specific item changes the whole VariationContext (#14620)
(cherry picked from commit 738749b705)
2023-10-26 11:47:44 +02:00
Bjarke BergandGitHub f4ac6cdded Added "pr: none" to nightly trigger (#15044) 2023-10-26 09:01:25 +02:00
Elitsa MarinovskaandGitHub 132935c2d7 Handle corrupted index (#14889) 2023-10-09 10:19:36 +02:00
Kenn JacobsenandGitHub 04b05714e5 Add notification state to "final" published notification when publishing with descendants (#14922)
* Revert "V10/bugfix/14543 publish descendants (#14763)"

This reverts commit f750bca453.

* Add notification state to "final" published notification when publishing with descendants
2023-10-05 14:39:00 +02:00
Kenn JacobsenandGitHub 7be1852827 Make sure to sign out external users if an error occurs during sign-in (#14867) 2023-09-28 13:25:11 +02:00
Andreas ZerbstandGitHub 158cef1692 V10 fixed up failing acceptance test (#14829)
* Updated playwright, our builders, and our helpers

* Updated the use of our testhelper methods, we removed the need for sending umbracoApi through the methods as a parameter since it was unnecessary

* Added a timeout

* Updated successNotifications and added a locator

* Removed timeout from successNotification

* Added additional timeouts and updated old locators which were failing

* Updated locator so it only finds one element

* Removed timeouts and added a waitForTimeout

* Removed timeouts

* Removed timeouts

* Added timeouts

* Updated locator

* Added a timeout

* Updated locators for clicking button

* Changed locator for adding the image, sometimes the old locator would find 2 locators
2023-09-20 12:15:24 +02:00
Bjarke Berg 1a4f3981eb Merge remote-tracking branch 'origin/v10/dev' into v10/dev 2023-09-20 09:42:28 +02:00
Bjarke Berg 7765f98ee1 Added random delay in forgot password to lessen the risk the response times can be use to determine whether the mail exist or not. 2023-09-20 09:02:32 +02:00
6b72880c0b fix: ensured that allowed user name characters are supported in backoffice users as well (#14810) (#14825)
Co-authored-by: Arkadiusz Biel <bielu@bielu.com.pl>
2023-09-19 09:01:35 +02:00
Andy ButlandandGitHub d9f3936a43 Updated dependencies to Forms and Deploy for JSON schema generation. (#14826) 2023-09-19 08:54:41 +02:00
bf09c87f87 Mention MultiUrlPickerValueConverter instead (#14818)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-09-18 13:48:11 +02:00
Sven GeusensandGitHub ec2134dea0 Disabled nighly build branch trigger (#14807) 2023-09-15 10:02:29 +02:00
Nikolaj GeisleandGitHub 8ccc2faee0 Add UsePagedSqlQuery setting to NucacheSettings (#14806)
* imlement UsePagedSqlQuery

* Remove unneccesary spacing
2023-09-14 20:11:08 +02:00
Jacob Overgaard 0a4cc27a5d 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:19:36 +02:00
c8e054baa2 V10/feature/pipeline test filters (#14766)
* Add configuration/code to not run certain tests based on variables/release builds

* Applied longrunning testAttribute to the worst offenders (>200ms on my machine)

* Fix yaml notation

* split up windows/non windows test runs

* Added supression for moved tests

* Fix yaml validation issues

* Change yaml string parameter null value to empty string

* Convert empty strings to whitespace strings

* Rename and cleanup some paramater to better reflect why we use them

* Nightly build test

* Change nightly build authentication type

* template paramater fix

* Update nightly pipeline name

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-09-12 14:16:27 +02:00
Bjarke Berg 95ffdae475 Merge remote-tracking branch 'origin/v10/dev' into v10/dev 2023-09-12 09:43:52 +02:00
Andreas ZerbstandJacob Overgaard ca8ac21f4b 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:13:08 +02:00
Jacob Overgaard f85a0d1715 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:12:48 +02:00
Andreas ZerbstandGitHub 2fc29e638c Limbo models builder changes the content to element when using Compositions (#14776) 2023-09-07 17:18:57 +02:00
Andreas ZerbstandGitHub 56486b1ace V10 Cherrypicked issuu RTE embed (#14777)
* Added a UserAgent to header

* Added the use of iframe. This allows us to see the issuu embed in the RTE
2023-09-07 16:28:11 +02:00
Bjarke Berg fd043f6ecf Merge remote-tracking branch 'origin/v10/dev' into release/10.7 2023-09-05 10:19:13 +02:00
Bjarke Berg 39a102ed8a rollback version 2023-09-05 10:14:21 +02:00
f750bca453 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:14:06 +02:00
Bjarke Berg 7e36203f60 Merge remote-tracking branch 'origin/release/10.7' into v10/dev
# Conflicts:
#	version.json
2023-09-04 10:24:22 +02:00
Bjarke Berg 334dff8645 bump version number 2023-09-04 10:23:44 +02:00
Bjarke Berg 9fd140f81d Merge remote-tracking branch 'origin/release/10.7' into v10/dev 2023-08-28 11:35:41 +02:00
Bjarke BergandGitHub 1198c76d67 Remove parsing of short into integer (#14721) 2023-08-25 13:07:42 +02:00
Nikolaj 869b480dae Bump version 2023-08-24 10:49:50 +02:00
Nikolaj 12704b112e Merge branch 'release/10.7' into v10/dev 2023-08-24 10:49:11 +02:00
Ronald BarendseandNikolaj 3c37653012 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:50:25 +02:00
e5a8d01004 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:09:43 +02:00
Andy ButlandandBjarke Berg 9fd0b1986c Updated JSON schema reference for Umbraco Forms. (#14701) 2023-08-22 13:30:26 +02:00
Andy ButlandandGitHub 80ea5174c6 Updated JSON schema reference for Umbraco Forms. (#14701) 2023-08-22 13:28:01 +02:00
Niels Lyngsøandkjac e1b4aebb0f directly render labels without angularJS template code (#14700) 2023-08-22 11:35:38 +02:00
Niels LyngsøandGitHub 38910a8d5c directly render labels without angularJS template code (#14700) 2023-08-22 11:27:16 +02:00
Kenn JacobsenandGitHub 0dc18982ee Do not allow content type property aliases that conflict with IPublishedElement (#14683) 2023-08-21 13:17:15 +02:00
311d322129 Add code infrastructure to validate file content (#14657)
* Implemented modular architecture for filestream security sanitization with an svg-html example

* 31440: Refactoring, applied to more entry points and removed test analyzer

* 31440 Added Unittests for FileStreamSecurityValidator

* PR fixes and better unittest mock names

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-08-21 13:08:26 +02:00
Andreas ZerbstandGitHub e7af98027d Updated the name of our Acceptance test project in the pipeline (#14691)
* Updated the name of our Acceptance test project.

The reason is because we want the naming to be clear and concise.

* Changed the name of the e2e pipeline project name for linux

* Updated dll file
2023-08-18 13:36:54 +03:00
Anders ReusandBjarke Berg 30f0cfc15d 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:58:58 +02:00
Ronald BarendseandBjarke Berg b743e715d4 Add DynamicRequestCultureProviderBase and improve locking (#14064) 2023-08-10 11:16:23 +02:00
d3243f8700 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:11:44 +02:00
264e4f8b57 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:47:45 +02:00
Sven Geusens 2b3f048db7 Revert "Implemented modular architecture for filestream security sanitization with an svg-html example"
This reverts commit 18ee016ae9.
2023-08-08 16:26:59 +02:00
Sven Geusens 18ee016ae9 Implemented modular architecture for filestream security sanitization with an svg-html example 2023-08-08 14:49:18 +02:00
Bjarke BergandGitHub 512199c8ab Pass the existing notification state to the ContentUnpublishingNotification so it can be shared. (#14638) 2023-08-08 09:40:44 +02:00
Bjarke BergandGitHub 4e410a9dd5 Stop event propagation when clicking on the expand-arrow in the tree. (#14637) 2023-08-08 09:27:23 +02:00
Jacob OvergaardandNiels Lyngsø e16e36c68f V12: Remove avatar step from login (#14629)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2023-08-07 11:02:53 +02:00
Bjarke Berg f384e0c30c Allow newlines in invite email and escape other html (#14618) 2023-08-02 14:17:39 +02:00
Bjarke Berg 04b74dddd0 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:37:39 +02:00
Kenn JacobsenandGitHub 43700d2bcb 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
2023-07-25 08:39:59 +02:00
Adrian CojocariuandGitHub eed9feb5f3 Fix method invoke. (#14597) 2023-07-24 15:18:23 +02:00
b2a5ce3e48 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>
2023-07-24 10:17:21 +02:00
Andy ButlandandGitHub 0ae404ce03 Extends JSON schema/Intellisense to full details of InstallDefaultData settings. (#14568)
* Fixes an incorrect property name used for generating JSON schema.

* Added JSON schema/intellisense for default data dictionary keys.

* Renamed private variable to match setting name.
2023-07-20 13:51:05 +02:00
ab836d2326 V10: Find and persist embedded images in rich text (#14546)
* add method to find and persist embedded base64 (data-uri) images in a html string

* use method to find embedded images in the Umbraco.TinyMce and Umbraco.Grid property editors

* rename method to better reflect what it does

* set allowed upload file types for integration tests

* add test for embedded images in Umbraco.TinyMce

* let old ctor call new ctor

* Apply suggestions from code review

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

* apply pattern matching

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-07-18 09:17:19 +02:00
Andy ButlandandGitHub c12cce6d8c Fixes an incorrect property name used for generating JSON schema. (#14542) 2023-07-14 09:27:02 +02:00
nikolajlauridsen 78e1da3231 Merge branch 'release/10.6' into v10/dev 2023-07-13 10:55:36 +02:00
82eae48d09 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:03:39 +02:00
Elitsa MarinovskaandGitHub a5ba32bfd7 Store tags as text (instead of nvarchar) (#14510)
* Migrate tags from NVarchar To NText

* Cleanup
2023-07-07 14:23:32 +02:00
Bjarke Berg c695f2192f Merge remote-tracking branch 'origin/release/10.6' into v10/dev
# Conflicts:
#	version.json
2023-07-07 08:27:51 +02:00
Zeegaan dc5c7a14a5 Bump version 2023-07-06 10:40:50 +02:00
Zeegaan c751e90928 Merge branch 'release/10.6' into v10/dev
# Conflicts:
#	version.json
2023-07-06 09:20:47 +02:00
Zeegaan d86e4b2d38 Bumb version 2023-07-05 10:46:14 +02:00
MaartenandSebastiaan Janssen 3f196a9de4 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>
(cherry picked from commit 1d239a30ca)
2023-07-04 11:10:58 +02:00
Nikolaj Brask-NielsenandSebastiaan Janssen 30ec9d9bc7 fix: Allows copying from unsaved content (#14464)
#14459

(cherry picked from commit 1d14158d82)
2023-07-04 11:08:39 +02:00
Anders BjernerandSebastiaan Janssen 3087fc3ba9 Added missing Danish translation for general_change (#14461)
* Added missing Danish translation for `general_change`

* Update en_us.xml

(cherry picked from commit a090997aa1)
2023-07-04 11:07:21 +02:00
christophnzandSebastiaan Janssen 7fd7a8715d Fixed typo "optinal" to "optional" for translation dictionary import dialog and 2 other occurrences
(cherry picked from commit 77a2e4b557)
2023-07-04 10:42:56 +02:00
Bjarne FyrstenborgandSebastiaan Janssen 62fd860a9e 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

(cherry picked from commit 583965cf9d)
2023-07-04 10:41:40 +02:00
Mads Mørch SchouandSebastiaan Janssen 76ad99beb0 Makes sure the nucache is not truncated when its null (#14395)
* Makes sure the nucache is not truncated when its null
* Removed parentheses

(cherry picked from commit 0a4a938b88)
2023-07-04 10:36:57 +02:00
Jason ElkinandSebastiaan Janssen ebe375d23b Add ContentDeletingNotification to EmptyRecycleBin (#14397)
* Add ContentDeletingNotification to EmptyRecycleBin

* Fix formatting.

(cherry picked from commit 118f914158)
2023-07-04 10:35:08 +02:00
Marco TeodoroandSebastiaan Janssen 2f35967bb2 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>
(cherry picked from commit 1ba834a9ca)
2023-07-04 10:33:05 +02:00
Paul SealandSebastiaan Janssen f93f3d88da 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>
(cherry picked from commit 542d0f7f74)
2023-07-04 10:06:26 +02:00
Bjarne FyrstenborgandSebastiaan Janssen dbd009ffcd Update label in Danish translation
(cherry picked from commit 575f00d6f0)
2023-07-04 10:05:17 +02:00
alevak09andSebastiaan Janssen b99e14e288 Add Croatian Language (#14379)
Croatian language translation of Umbraco backoffice and culture settings

(cherry picked from commit 9f4d3e5525)
2023-07-04 10:03:42 +02:00
Paul SealandSebastiaan Janssen b8415ed7f0 Update the tour text to the correct text and to save confusion
(cherry picked from commit 5073a26e7f)
2023-07-04 10:00:09 +02:00
Miguel PintoandSebastiaan Janssen 8f6370a480 Swapped the sortCreateDateAscending and sortCreateDateDescending translation values to match the intended behavior (#14315)
(cherry picked from commit 76cb85224e)
2023-07-04 09:53:46 +02:00
RussellandSebastiaan Janssen aa4a1b3498 Fix for User null from IP address "::1" has logged out (#14322)
(cherry picked from commit dd59ef17f5)
2023-07-04 09:51:59 +02:00
RussellandSebastiaan Janssen b716e98780 Change "Media Picker" in RTE to "Image Picker" (#14321)
(cherry picked from commit 0220621337)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
2023-07-04 09:49:34 +02:00
Elitsa MarinovskaandGitHub e86fb0eeb6 Adding null check and descriptive error (#14469) 2023-06-27 13:35:01 +02:00
Elitsa MarinovskaandGitHub fe1080dd64 Check the cases where there might be a custom image type, instead of an the default Umbraco image type (#14463) 2023-06-27 10:33:46 +02:00
Bjarke Berg 1133c4e7f2 Merge remote-tracking branch 'origin/release/10.6' into v10/dev 2023-06-27 09:06:17 +02:00
Jacob Overgaard f5b834974d package-lock.json sync 2023-06-26 14:28:59 +02:00
Nikolaj 75113a90fb Bump version 2023-06-22 09:18:57 +02:00
miguelcrpintoandZeegaan 7e573c70a3 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-21 14:04:56 +02:00
dependabot[bot]andNikolaj 5c5de77965 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-21 09:45:50 +02:00
dependabot[bot]andNikolaj 2f486610bb 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-21 09:45:45 +02:00
Nikolaj d19a30768f Merge remote-tracking branch 'origin/v10/dev' into v10/dev 2023-06-21 09:20:26 +02:00
Nikolaj b451bb802b Revert "Case-insensitive tag names with SQLite provider (#14012)"
This reverts commit bb7752c483.
2023-06-21 08:45:54 +02:00
MoleandGitHub 785390efd7 Add Noop property indexer to multi url picker (#14416) 2023-06-20 12:14:35 +02:00
nikolajlauridsenandBjarke Berg 3b3e1cec40 Add Noop property indexer to multi url picker 2023-06-20 12:12:00 +02:00
Jacob OvergaardandGitHub 89d104e176 v10: Backoffice JS updates (#14406)
* update @umbraco-ui/uui to 1.3.0

* update ace editor to 1.22.1

* update diff to 5.1.0

* update autoprefixer to 10.4.14

* update underscore to 1.13.6

* update jQuery to 3.7.0

* fix pr-first-response workflow
2023-06-20 09:24:07 +02:00
Bjarne FyrstenborgandNikolaj 9a3e655645 Fix transparent background after upgrade of spectrum color picker (#14251) 2023-06-19 08:50:57 +02:00
Andy ButlandandGitHub 5f15b8abb1 Updated Forms and Deploy references in JSON schema project for Umbraco 10. (#14383) 2023-06-16 10:01:09 +02:00
Andreas ZerbstandGitHub 4df3e19af7 Added a mapper for the IPropertyType (#14373) 2023-06-12 11:18:57 +02:00
89d670372d Update security stamps on logout (#14362)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-06-12 09:56:04 +02:00
Mole b5ab115318 Remove external login tokens before removing external logins (#14341) 2023-06-06 14:11:20 +02:00
407263d090 V10: Handle blob images (#14317)
* Handle blob images

* remove dots from mapping

* Revert bad formatting

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-05-31 08:43:14 +02:00
b37bb517ab 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:36:42 +02:00
MoleandGitHub 999a83995e V10: Add external login provider count to detailed telemetry (#14282)
* Add backoffice external login provider count to telemetry

* Update translation

* Fix integration test
2023-05-24 11:48:56 +02:00
Kenn Jacobsenandnikolajlauridsen b3a93ac86c Ensure that blocks always open automatically when added to block list or block grid (#14294) 2023-05-24 10:23:40 +02:00
Andy ButlandandGitHub e79246368b Update JSON schema package references for Forms and Deploy. (#14285) 2023-05-23 09:38:01 +02:00
Sebastiaan Janssen b67c7fbe77 Cherry pick b8d6613bd8 accidentally kept both lines instead of just the one, this fixes the problem. 2023-05-22 15:15:19 +02:00
Dhanesh Kumar MjandSebastiaan Janssen 16f448a802 [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:25:15 +02:00
b3bedb4efe 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:48:36 +02:00
Andreas ZerbstandGitHub 5b73fc19ee V10: Fix NoopPublishedValuefallback varation context member not implemented (#14227)
* Added missing VariationContextAccessor

* Fixed identation
2023-05-10 14:31:40 +02:00
4cdab08910 Fixes #14102 - NestedPropertyIndexValueFactoryBase ignores compositions (#14115) (#14219)
Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
2023-05-09 09:49:04 +02:00
MoleandGitHub 391cade75f Merge pull request #14205 from umbraco/v10/bugfix/fix_acceptance_test
Fix acceptance test
2023-05-04 10:24:24 +02:00
Anders BrohusandSebastiaan Janssen e27e8d1189 Fixing danish typos (#14184)
* Fixed typo

* Fixed another typo

* Removed space from translation

(cherry picked from commit 7df5c9c212)
2023-05-04 10:13:51 +02:00
MichałandSebastiaan Janssen 1e0ace7a34 Save and preview translation.
(cherry picked from commit 0765a2ebbb)
2023-05-04 10:10:56 +02:00
Nikolaj 21c6828b59 Use regex for class 2023-05-04 09:32:32 +02:00
Nikolaj f7f361239c Try quick fix for test 2023-05-04 09:32:27 +02:00
Nikolaj 05908e2c78 Remove test.only 2023-05-04 09:32:18 +02:00
Jacob Overgaard 3a7ba530a2 Fix: Form elements in thirdparty dashboard views get removed (#14152) 2023-05-03 11:07:33 +02:00
Jacob Overgaard f4073c1dc7 update @umbraco-ui/uui to 1.2.1 2023-05-03 11:07:10 +02:00
Niels LyngsøandJacob Overgaard 7b5233803e fix situation when config was not available. (#14148) 2023-05-03 08:42:19 +02:00
Jacob OvergaardandGitHub 822febb8e8 update @umbraco-ui/uui to 1.2.1 (#14186) 2023-05-03 08:07:04 +02:00
MoleandGitHub bf7b9a20a8 Set culture variation when getting property types for indexing (#14167) 2023-04-26 14:51:55 +02:00
Elitsa MarinovskaandGitHub 9aadb41f4a Change state to publishing before handling ContentSavingNotification (#14114) 2023-04-25 15:08:15 +02:00
Mark DrakeandSebastiaan Janssen aaec419672 Edge Cases for Issue #13838: Hotkey Actions Triggered from Web Components (#14098)
(cherry picked from commit 1436fe4e15)
2023-04-21 14:13:02 +02:00
Dhanesh Kumar MjandSebastiaan Janssen 66b1add0d0 Save and Preview blank on second use #14052 (#14094)
(cherry picked from commit 00eab03d50)
2023-04-21 11:31:47 +02:00
Søren KottalandSebastiaan Janssen 81c6a1b8e6 Adds padding to the icon in btn-social (#14080)
(cherry picked from commit c4cf5f910d)
2023-04-18 16:30:40 +02:00
Nikolaj GeisleandSebastiaan Janssen 747f2e7599 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>
(cherry picked from commit c868c60ed2)
2023-04-18 15:22:39 +02:00
Markus JohanssonandSebastiaan Janssen f9aaf1984a #14016 Fixed, added cache buster to Block Grid Editor stylesheets
(cherry picked from commit 80f6bb404a)
2023-04-18 14:48:08 +02:00
Mark DrakeandSebastiaan Janssen 539640f995 resolve spacing issues with block list inline editor when it is the last property editor on the current tab
(cherry picked from commit 9a638b6edc)
2023-04-18 14:46:56 +02:00
Dhanesh KumarandSebastiaan Janssen 07a45d02f9 fix for the char limit(512) for textboxdatatype
(cherry picked from commit 2c580e8d4f)
2023-04-18 14:45:31 +02:00
Lewis HazellandSebastiaan Janssen bb7752c483 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.

(cherry picked from commit 37d737f9bc)
2023-04-18 14:41:06 +02:00
Lucas Bach BisgaardandSebastiaan Janssen d1975ee2cf Fix bug, in multiurlpicker where you cannot deselect a selected entity.
(cherry picked from commit 3385947c4e)
2023-04-18 14:40:10 +02:00
Bjarne FyrstenborgandSebastiaan Janssen 4d13345b14 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>
(cherry picked from commit e30587f90d)
2023-04-18 14:37:23 +02:00
Andreas ZerbstandGitHub 02e16992b4 V10/qa/added more acceptance tests (#14100)
* Imported BlockGrid tests from v11

* Updated existing tests

* Updated version of playwright, our models builders and testhelpers

* More imported tests

* Updated flaky tests
2023-04-18 08:13:01 +02:00
Nikolaj 5d3546e1b5 Bump version 2023-04-13 08:53:47 +02:00
Nikolaj 5828080589 Merge branch 'release/10.5' into v10/dev 2023-04-13 08:47:41 +02:00
Nikolaj 8e32ac3e20 Bump to non-rc 2023-04-12 09:35:23 +02:00
Elitsa MarinovskaandGitHub 22328598db Adding dedicated Forbidden and Unauthorized handling for members (#14036) 2023-04-11 15:41:55 +02:00
ce47281c04 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:44:56 +02:00
BatJanandSebastiaan Janssen 83ad463e81 Change style to class
(cherry picked from commit 69010baceb)
2023-03-28 12:56:22 +02:00
Matthew CareandSebastiaan Janssen 06f527e87b Fix pressing enter in a property editor name field (#13329)
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
(cherry picked from commit 7349ae1c5c)
2023-03-28 12:55:50 +02:00
Sebastiaan Janssen 6bc999bca4 Unit tests need updating now that the WriterId is properly being set after merging #12843
(cherry picked from commit a88d0c0ec9)
2023-03-28 10:28:33 +02:00
patrickdemooij9andSebastiaan Janssen 5f8ba2e864 Memory improvements to ShortStringHelper (#13089)
(cherry picked from commit b17d9004fd)
2023-03-28 10:19:43 +02:00
patrickdemooij9andSebastiaan Janssen eee6207f19 Performance improvement for ReplaceFirst function (#13018)
* Some benchmarks for replacefirst & span method

(cherry picked from commit e550a4ce3a)
2023-03-28 10:14:42 +02:00
LandLogic ITandSebastiaan Janssen 888173ac5b Add it key translation
(cherry picked from commit 99268f6211)
2023-03-28 10:11:57 +02:00
DennisandSebastiaan Janssen 7208f591c7 Fix equality check on property group (#13133)
* Fix equality check on property group

Also fix circular reference on PropertyTypeCollection

(cherry picked from commit f64f634979)
2023-03-28 10:08:48 +02:00
gadgetfbiandSebastiaan Janssen 391bfb73e8 Fixes: listitem: <li> elements must be contained in a <ul> or <ol> (#13120)
Co-authored-by: Rob Nicolson <rob.nicolson@brightwire.net>
(cherry picked from commit 1f6307944b)
2023-03-28 09:38:51 +02:00
Matthew CareandSebastiaan Janssen 9f2e79e9db Prevent overflowing property values (#12943)
(cherry picked from commit b34a93ed59)
2023-03-27 12:49:20 +02:00
Ealse BoumaandSebastiaan Janssen 40285b76b9 Fix: Infinite Editor creates each save action a new version when content is invalid (#12713)
(cherry picked from commit 93a85a46f3)
2023-03-27 11:30:53 +02:00
Patrick de MooijandSebastiaan Janssen aab6539d1f 12748: Make sure to set writerId
(cherry picked from commit 3ee9bfbc93)
2023-03-27 09:57:51 +02:00
Nikolaj 5598cc2491 Convert path to absolute 2023-03-23 09:21:07 +01:00
Andy ButlandandNikolaj b665099657 Updated reference for JSON schema to latest release of Forms 10. (#13996) 2023-03-23 09:14:23 +01:00
Andy ButlandandGitHub 010f722fa0 Updated reference for JSON schema to latest release of Forms 10. (#13996) 2023-03-23 08:59:28 +01:00
NuklonandSebastiaan Janssen 4f8b8b3415 Fixes #13732 - IsBackOfficeRequest is extremely inefficient (#13743)
* Update UmbracoRequestPaths.cs

* Update UmbracoRequestPaths.cs

* remove redundant check

---------

Co-authored-by: Michael <michael@crossingpaths.be>
(cherry picked from commit de27eb697e)

# Conflicts:
#	src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
2023-03-21 08:24:13 +01:00
jesperweberandSebastiaan Janssen b1fd9e6f16 Added sort audit to nodes actually being sorted
(cherry picked from commit 36069aa813)
2023-03-20 16:23:12 +01:00
Joel MandellandSebastiaan Janssen d31bd8755e Fixing issue #13865 (i.e. Rich text link picker not resolving correct variant when using .ValueFor()). (#13889)
(cherry picked from commit 451d1cec6a)
2023-03-20 15:59:08 +01:00
Dhanesh Kumar MjandSebastiaan Janssen 6b208362cc [fix] Infinite Editor from member property with a media picker (#13817)
(cherry picked from commit 71e7836001)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
2023-03-17 12:24:39 +01:00
Lennard FonteijnandSebastiaan Janssen 9d1140165e Fixed issue where filtering allowed element types with a NotificationHandler causes issues with Block Grid areas
(cherry picked from commit e10ff16fa1)
2023-03-17 08:52:46 +01:00
Matt BegentandSebastiaan Janssen f70533e3a0 Add skip links to header (#13938)
* Add skip links to header

* Tweak skip link z-index

(cherry picked from commit f6ebcdcfb6)
2023-03-17 08:51:41 +01:00
Jason ElkinandSebastiaan Janssen 53c547fb61 Use correct listenAddress for Karma on node 18+
(cherry picked from commit 50c4f8c6b5)
2023-03-17 08:50:31 +01:00
Erik-Jan WestendorpandSebastiaan Janssen 82c21da5b7 Add Romanian language (#13965)
(cherry picked from commit 11b20cc6cc)
2023-03-17 08:49:35 +01:00
Karn BlackmoreandSebastiaan Janssen 2d32f46d80 Fix algiment issues by setting the editor to position fix.
(cherry picked from commit daf54468b1)
2023-03-17 08:48:56 +01:00
kiasynandSebastiaan Janssen e9d17d3b9f 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

(cherry picked from commit 62b49c7ea7)
2023-03-17 08:47:48 +01:00
ChadandSebastiaan Janssen 7c77fd1ca9 Faster cache key generation (#13504)
* Reduce the number of string concatenations required to generate cache keys.
* Updated to match existing Nucache keys.

---------

(cherry picked from commit 7c30da9fbf)
2023-03-17 08:46:29 +01:00
Joe GlombekandSebastiaan Janssen d4970ed752 Add checkered background to file upload
(including SVGs added to the media library)

(cherry picked from commit 066276a532)
2023-03-17 08:44:47 +01:00
AaronandSebastiaan Janssen 66c786a42d Changed to cast double to long (#13935)
(cherry picked from commit ca515c3ed7)
2023-03-17 08:43:27 +01:00
Sean ThorneandSebastiaan Janssen e6c0826d39 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>
(cherry picked from commit 64bd310037)
2023-03-17 08:42:13 +01:00
AaronandSebastiaan Janssen 8a3cf2731e Solves tooltip issue for block column editor on remove block column editor option
(cherry picked from commit 393845ce4d)
2023-03-17 08:40:16 +01:00
Paul SealandSebastiaan Janssen b8d6613bd8 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`

(cherry picked from commit d8f204ddf9)
2023-03-17 08:38:04 +01:00
ChadandSebastiaan Janssen 12414013d5 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>
(cherry picked from commit be72c8147d)
2023-03-17 08:37:05 +01:00
CyberReiterandSebastiaan Janssen 5fcbd4e4cd Fall back to object if PublishedPropertyType modelType is null (#13553)
* add null check

* return object when type is null

(cherry picked from commit 0cfc1fb664)
2023-03-17 08:36:05 +01:00
CyberReiterandSebastiaan Janssen 6b309dc3be Fix install when adding custom default languages (#13904)
* Adding ids to language installation

---------

Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
(cherry picked from commit 30abbb0c5d)
2023-03-17 08:35:12 +01:00
Miska HusgafvelandSebastiaan Janssen 458688aed6 Ensure cropperHelper.pixelsToCoordinates returns valid coordinates
(cherry picked from commit 282b7ac3d5)
2023-03-17 08:31:40 +01:00
Erik-Jan WestendorpandSebastiaan Janssen a56a6bae31 Map BackOfficeNotification in ContentMapDefinitions (#13874)
* Map Notifications

* Empty line

(cherry picked from commit 5158d8119d)
2023-03-17 08:29:20 +01:00
Erik-Jan WestendorpandSebastiaan Janssen 010ea5a2aa 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

(cherry picked from commit 9771e77243)
2023-03-17 08:21:21 +01:00
Menno MoutandSebastiaan Janssen 84d81b20ef 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.
(cherry picked from commit ca23784898)
2023-03-17 08:19:57 +01:00
mwillebrandsandSebastiaan Janssen d148e93b45 Fix for #13860
Undefined error when inserting an empty link in the RTE editor

(cherry picked from commit 6ce30fb561)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
2023-03-17 08:06:49 +01:00
niekvanderreestandSebastiaan Janssen 0ce2fdb23b Change GetMinNonAlphaNumericChars() to return 1 (#13876)
(cherry picked from commit 27e38e1606)
2023-03-17 08:03:45 +01:00
Menno MoutandSebastiaan Janssen 273e7708e5 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.

(cherry picked from commit 37db3ae3da)
2023-03-16 13:03:16 +01:00
Bjarne FyrstenborgandSebastiaan Janssen 154021801e Reset selected index/searcher (#13866)
(cherry picked from commit 62fdbd159c)
2023-03-16 12:49:39 +01:00
Smayke95andSebastiaan Janssen d418d06c02 Add Bosnian language (#13854)
* Add Bosnian language

* fix

* Fix issue with Marketplace

(cherry picked from commit 42d143c6b2)
2023-03-16 12:47:50 +01:00
Simone ChiarettaandSebastiaan Janssen c684b38247 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

(cherry picked from commit 362832b594)
2023-03-16 12:46:38 +01:00
tristanjthompsonandSebastiaan Janssen dca1c1b1be Update JITOptimizerValidator error message.
(cherry picked from commit e9f5b562ad)
2023-03-16 11:35:28 +01:00
Sebastiaan Janssen 86247b4578 Revert "Add DefaultLanguage fallback policy for published values (#13814)"
This reverts commit ef4c9c508d.
2023-03-16 11:32:35 +01:00
Ronald BarendseandSebastiaan Janssen ef4c9c508d Add DefaultLanguage fallback policy for published values (#13814)
* Add DefaultLanguage fallback

* Implement DefaultLanguage fallback

* Add DefaultLanguage fallback test

(cherry picked from commit 7348171c01)
2023-03-16 11:31:30 +01:00
Anders BrohusandSebastiaan Janssen f7ba2cfe96 2FA translations
Added and changed some translations about 2FA

(cherry picked from commit 559e56949f)
2023-03-16 11:21:15 +01:00
Dhanesh Kumar MjandSebastiaan Janssen 80a2839797 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>
(cherry picked from commit 2f5726384d)
2023-03-16 11:20:00 +01:00
Erik-Jan WestendorpandSebastiaan Janssen aacac4997d 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>
(cherry picked from commit 280fbdd870)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/common/directives/components/umbavatar.directive.js
2023-03-16 11:17:02 +01:00
Jeroen BreuerandSebastiaan Janssen 815eb5b9c8 Make methods virtual so they can be redefined in derived classes.
(cherry picked from commit ff3d8c1c6c)
2023-03-16 11:06:19 +01:00
Ealse BoumaandSebastiaan Janssen 5966ad4a05 Changed default initialized button permissions for listviews
(cherry picked from commit 5c0673930a)
2023-03-16 11:01:45 +01:00
Warren BuckleyandSebastiaan Janssen 06b89963e4 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

(cherry picked from commit d38fabea4a)
2023-03-16 10:57:52 +01:00
Marc GoodsonandSebastiaan Janssen caa4ca510e Add .woff2 to BrowsableFileExtensions
(cherry picked from commit 23b03f408e)
2023-03-16 10:53:44 +01:00
Sebastiaan Janssen 0ecb613b4a Revert "add the s html element to allow list for TinyMCE (#13697)"
This reverts commit 48ad91392f.
2023-03-16 10:45:47 +01:00
Jacob OvergaardandSebastiaan Janssen 48ad91392f add the s html element to allow list for TinyMCE (#13697)
Fixes #13637

(cherry picked from commit cfdc4a9573)

# Conflicts:
#	src/Umbraco.Core/Configuration/Models/RichTextEditorSettings.cs
2023-03-16 10:43:47 +01:00
CyberReiterandSebastiaan Janssen 5e555c6129 Updating german translation (#13684)
* updating german translations

* translating missing sections

* added missing closing tag

Co-authored-by: Michael <michael@crossingpaths.be>
(cherry picked from commit 8fdb5a55ea)
2023-03-16 10:38:20 +01:00
Mike MaseyandSebastiaan Janssen 47078bcc70 fix: move list view selection options to after list in focus order
(cherry picked from commit 3ebd15b67e)
2023-03-16 10:37:11 +01:00
ustadstarandSebastiaan Janssen 0ba1254e7d Fix copy content with descendants not copying sort order (#13464)
(cherry picked from commit fd992f65bb)
2023-03-16 10:33:39 +01:00
Erik-Jan WestendorpandSebastiaan Janssen d0e34c38a0 Translate dictionary area
(cherry picked from commit 045c755ccf)
2023-03-16 10:11:58 +01:00
Mykola GorbatenkoandSebastiaan Janssen 6be8d2e885 added Ukrainian language
(cherry picked from commit b52a4363c4)
2023-03-16 10:08:54 +01:00
CyberReiterandSebastiaan Janssen bfd29dfc3b minor improvements to indexing performance
(cherry picked from commit b7a26360e5)
2023-03-16 09:19:41 +01:00
Robert FosterandSebastiaan Janssen 4b2af296be 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

(cherry picked from commit e7a986b1c3)
2023-03-16 09:18:23 +01:00
MehmetandSebastiaan Janssen 17aa9cee51 Rename title marketplace to packages (#13625)
(cherry picked from commit 59c5226d68)
2023-03-16 09:14:21 +01:00
Mario LopezandSebastiaan Janssen f035b2bee2 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>
(cherry picked from commit dc46b649f7)
2023-03-16 09:10:57 +01:00
Calvin DavisandSebastiaan Janssen 4d4b5b7007 Add margin-right to block card name and subname
(cherry picked from commit 4fbb0805e8)
2023-03-16 09:08:05 +01:00
Bjarne FyrstenborgandSebastiaan Janssen c04b11cf17 Only show rollback button if allowed action
(cherry picked from commit 05a511a16c)
2023-03-16 09:06:14 +01:00
Bjarke Berg 6404f2dae8 Merge remote-tracking branch 'origin/release/10.4.1' into v10/dev
# Conflicts:
#	version.json
2023-03-15 16:21:40 +01:00
Nikolaj 0c6632eeb4 Bump version 2023-03-14 14:25:02 +01:00
Bjarke Berg 4e3ac66865 Check the tmpimg path is in the expected folder 2023-03-14 08:27:17 +01:00
Bjarke BergandGitHub de6e9aeb31 Prioritise surface controller requests highest (#13919)
* Fixed issue mentioned in https://github.com/umbraco/Umbraco-CMS/issues/13836

Now surface controller requests always has higher priority than other. So if this is both a surface controller request and a virtual page request, it will execute the surface controller.

* Moved some login into private methods

* More clean up

* Clean up

* Only handle valid candidates
2023-03-08 13:43:35 +01:00
Nikolaj GeisleandGitHub a8a8a7fea5 Make Detailed telemetry the default (#13918) 2023-03-07 13:14:23 +01:00
MoleandGitHub 84e20e74d3 Don't replace hyphen and underscore with empty string (#13896)
Replace it with a space instead
2023-03-07 11:31:15 +01:00
Bjarke BergandNikolaj Geisle 220414114e Fallback to use ActivatorUtilities to create controller from type, if it is not registered in DI (#13910) 2023-03-07 11:24:44 +01:00
MoleandGitHub 2538f946fc Check explicitly for MaintenanceResult in published request filter (#13911)
LGTM 💪
2023-03-07 08:15:19 +01:00
Bjarke BergandGitHub eb07998cf2 Merge pull request #13900 from umbraco/v10/bugfix/12200
Add allowlist of media hosts.
2023-03-02 14:34:05 +01:00
Bjarke Berg 7119253e6f Add allowlist of media hosts. 2023-03-01 15:17:08 +01:00
9cfda6e05c new up settings so they are no longer null (#13879)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-02-23 14:22:33 +01:00
555f6e2514 Add obsolete messages to no longer used properties (#13859)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-02-21 08:13:44 +01:00
Elitsa MarinovskaandGitHub cc76289a36 Fix mapping (#13844) 2023-02-17 09:38:39 +01:00
Andy ButlandandGitHub f9ed9c0ae8 Bumped dependencies on Forms and Deploy to latest releases in JSON schema project. (#13827) 2023-02-14 08:01:08 +01:00
d9f342bee7 Added missing property index value factories (#13819)
* Added missing PropertyIndexValueFactories, for Block Grid, Block List, Nested Content, Tags and added No-op for image picker, image cropper etc, where the content dont make any sense anyway.

Made it replace for block grid/list, nested content and tags

* Fixed tests

* Ensure raw-fields are the prefix

* Code clean up

* build fix

* Minor cleanup

* Fixed issue with published values / external index

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-02-13 14:47:26 +01:00
Kenn JacobsenandGitHub e529818560 Make the default lockout time configurable for users and members (#13808)
* Make the default lock timeout configurable for users and members

* Update obsoletion to V13
2023-02-10 10:56:55 +01:00
Kenn JacobsenandGitHub 45f8ffcd0b Support notifications for multiple root nodes (#13805) 2023-02-10 10:49:39 +01:00
Kenn JacobsenandGitHub 7d9e07ff7c Don't show DB details on install screen when using a pre-configured connection string (#13809) 2023-02-10 10:45:19 +01:00
b83c88e9f1 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:46:14 +01:00
Bjarke BergandGitHub 884793f729 Added fix to maintenance page so it is shown before the content cache is created. (#13767) 2023-02-05 16:47:09 +01:00
Jacob Overgaard c90a0ecfdc 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:24:27 +01:00
Andreas ZerbstandGitHub 5871fd2097 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 13:52:39 +01:00
Yari MariënandSebastiaan Janssen 8616f01bf6 Added youtube shorts url pattern. 2023-01-31 18:25:15 +01:00
Kenn JacobsenandGitHub c585b1da9e Correct the obsolete message for DataTypeService constructor. (#13761) 2023-01-31 09:56:36 +01:00
Andy ButlandandGitHub e87196909a Uses URL path separator when generating UDIs for files nested in folders. (#13689) 2023-01-31 09:46:45 +01:00
823c59cee1 Send email notification on password reset (#13756)
Co-authored-by: Aleksander <alf@umrabco.dk>
2023-01-31 09:05:15 +01:00
03365f55c4 Update label when updating color (#13720)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-01-27 09:52:37 +01:00
Bjarke BergandGitHub f275d80e2f Fixes issue with nucache slow on linux, when cold-booting (#13719)
* Fixes issue with nucache slow on linux, when cold-booting

https://github.com/umbraco/Umbraco-CMS/issues/12159
2023-01-26 16:20:57 +01:00
Jacob OvergaardandElitsa Marinovska 435b6f0650 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

(cherry picked from commit 7aee15d6d1)
2023-01-20 08:16:25 +01:00
Bjarke BergandGitHub ea3668a224 Update docfx (#13679) 2023-01-16 16:10:06 +01:00
Kenn JacobsenandGitHub f6113db0fc Re-introduce the option to conditionally login members after registration (#13659)
* Re-introduce the option to conditionally login members after registration

* Make absolutely sure the default is true for automatic member login after registration
2023-01-12 10:56:14 +01:00
Kenn JacobsenandGitHub 9d522ea9a0 Make it possible to drag multiple properties to other tabs in succession (#13579) 2023-01-12 10:53:57 +01:00
Kenn JacobsenandGitHub 6f2016d6da Only save selected variant for new content (#13649) 2023-01-12 10:53:14 +01:00
Kenn JacobsenandGitHub 4e7f663596 Use element type icon colors in block list catalogue, unless a specific color has been defined for catalogue appearance (#13651) 2023-01-12 10:51:23 +01:00
Kenn JacobsenandGitHub 2ec05431ba Fix the content picker XPATH scope in infinite editing (#13657) 2023-01-12 10:49:30 +01:00
Kenn JacobsenandGitHub 75a85bab0f Make sure the expand icon is never faded in mini list views (#13661) 2023-01-12 10:48:28 +01:00
Kenn JacobsenandGitHub 0c694c4b9d Fix broken buttons for properties with alias "navigation" (#13663) 2023-01-12 10:47:27 +01:00
Nikolaj ba74ca0512 Bump version 2023-01-11 15:37:27 +01:00
Nikolaj 96561b9446 Merge branch 'release/10.4' into v10/dev 2023-01-11 15:36:00 +01:00
Andy ButlandandNikolaj daff9884a3 Changed healthcheck collection configuration to use a concrete type to ensure configuration settings are bound. 2023-01-11 10:16:53 +01:00
Andy ButlandandSebastiaan Janssen d582632c85 Changed healthcheck collection configuration to use a concrete type to ensure configuration settings are bound. 2023-01-11 10:12:49 +01:00
Nikolaj 29bc727a4b Bump version 2023-01-11 10:06:39 +01:00
Kenn JacobsenandGitHub 42f6717de8 Use the client culture if available when rendering macro HTML for the backoffice (#13653) 2023-01-11 10:02:51 +01:00
24455bae6e Add primary key column attribute to ContentVersionCleanupPolicyDto.cs (#12684)
* Add primary key column attribute to ContentVersionCleanupPolicyDto.cs

* Test pipelines

* Revert "Test pipelines"

This reverts commit a8f654ebb7.

* test commit for pipelines

* Revert "test commit for pipelines"

This reverts commit ab03f977f4.

* Dont cascade delete

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

* Remove unneccesary delete clause

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

* Remove added whitespace

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

* Revert "Remove unneccesary delete clause"

This reverts commit 4b2b665169.

* Disable identity for PK

* Add PK migration

* formatting

* Keep latest entry

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-01-10 10:59:10 +01:00
31655536b1 Implement check for connectionstring value (#13641)
Signed-off-by: Zeegaan <nge@umbraco.dk>

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-01-09 08:52:46 +01:00
Nikolaj 392b48f159 Merge branch 'release/10.4' into v10/dev 2022-12-21 13:53:58 +01:00
a364141efa 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 09:57:00 +01:00
Bjarke Berg fae74c53ba Merge remote-tracking branch 'origin/release/10.4' into v10/dev 2022-12-20 10:18:14 +01:00
d62e2d731b 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-20 09:53:54 +01:00
Kenn Jacobsenandnikolajlauridsen ab82549fd6 Support space (and more) in tag groups (#13589) 2022-12-16 14:25:30 +01:00
Kenn JacobsenandGitHub 9c21951d02 Support space (and more) in tag groups (#13589) 2022-12-16 14:23:31 +01:00
Ronald BarendseandElitsa Marinovska 4d760a54c8 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
(cherry picked from commit 544cb30602)
2022-12-16 13:00:39 +01:00
Nikolaj GeisleandGitHub 5066491726 Close shared connection (#13580)
* Close shared connection

* Use transaction instead of shared connection
2022-12-14 18:33:00 +01:00
Elitsa MarinovskaandSebastiaan Janssen dabc7bed9b 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

(cherry picked from commit af6b8fc5cb)
2022-12-14 13:50:16 +01:00
Jacob OvergaardandSebastiaan Janssen d6d4421a37 Tree picker support for selecting containers (#13507)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13463

(cherry picked from commit 63e4adca92)
2022-12-14 13:48:51 +01:00
Bjarne FyrstenborgandSebastiaan Janssen aaababca9b UserController should use getLocalDate from dateHelper (#13469)
* Use `getLocalDate` from dateHelper

* Remove duplicate import

* Keep function getLocalDate but use dateHelper

* Mark function as deprecated

(cherry picked from commit 30a7bca0ef)
2022-12-14 13:45:01 +01:00
Erik-Jan WestendorpandSebastiaan Janssen 77fdcf20ca Add AddManifestFilter extension method to UmbracoBuilder.CollectionBuilders.cs (#13161)
(cherry picked from commit 65dd52ad05)
2022-12-14 13:44:22 +01:00
Anders BjernerandSebastiaan Janssen fb881d568b Added "loading" parameter to "umbEditorHeader" directive
(cherry picked from commit 33668a5d95)
2022-12-14 13:43:36 +01:00
Owain JonesandSebastiaan Janssen 345feaf16a Updated welsh translations file
(cherry picked from commit 079b2b7452)
2022-12-14 13:41:28 +01:00
Anders BjernerandSebastiaan Janssen f4012115a3 NullOrWhiteSpaceAsNull should be nullable
(cherry picked from commit 5ffc2b1ccb)
2022-12-14 13:40:40 +01:00
SimonJansson2andSebastiaan Janssen 8bee709720 Adding swedish backoffice translations
(cherry picked from commit 2071224d1f)
2022-12-14 13:40:02 +01:00
Jason ElkinandSebastiaan Janssen 90ffd25d96 Swap HSTS healthcheck status on localhost
(cherry picked from commit 6cb53fd703)
2022-12-14 13:39:10 +01:00
CyberReiterandSebastiaan Janssen 43a4a49409 adding some german translations
(cherry picked from commit ce60e72452)
2022-12-14 13:38:22 +01:00
Sebastiaan Janssen 2265d0a928 Changed Logo button behavior to be more consistent with the rest of the header
(cherry picked from commit 7d9ee69fbc)
2022-12-14 13:37:38 +01:00
Tobias MønsterandSebastiaan Janssen 67d6e9f3df Renames Installer form from "myForm" to "installerForm" (#12806)
Co-authored-by: Joe Glombek <joe@glombek.com>
(cherry picked from commit 6cad4013e4)
2022-12-14 13:36:53 +01:00
Anders BjernerandSebastiaan Janssen 8ff1d0769e Added shortcut="esc" to RTE HTML editor close button
(cherry picked from commit 4922144528)
2022-12-14 13:35:01 +01:00
TiffanyandSebastiaan Janssen 4dbd7de0d6 Tree Roots are H1
(cherry picked from commit 105670dcc1)
2022-12-14 13:34:17 +01:00
Matthew WiseandSebastiaan Janssen 508898c4ee standarising ActionLetter and ActionName for IAction
(cherry picked from commit ec56778c9f)
2022-12-14 13:32:08 +01:00
Kristian Tolleshaug MørchandSebastiaan Janssen ba53b47b72 Ensure format processor is before quality processor.
(cherry picked from commit 69c725b3ec)
2022-12-14 13:31:08 +01:00
ustadstarandSebastiaan Janssen faf69e4349 Fix check for existing userStatesFilter
(cherry picked from commit f7e73fbff5)
2022-12-14 13:26:28 +01:00
Paul SealandSebastiaan Janssen 5db507cb96 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

(cherry picked from commit d86d29807d)
2022-12-14 13:23:34 +01:00
Corné HoskamandSebastiaan Janssen 479dde280f 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

(cherry picked from commit 9099bf44ac)
2022-12-14 13:22:44 +01:00
Corné HoskamandSebastiaan Janssen 93c0a4ee38 Added various Block Grid translations (EN & NL) (#13488)
* Added various translations

* Added another translation

* Change request

(cherry picked from commit a4e67bf444)

# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
2022-12-14 13:21:59 +01:00
Vlael LayugandSebastiaan Janssen a810c59774 add default culture when there's only 1 language configured
(cherry picked from commit f7b42a50cc)
2022-12-14 13:19:08 +01:00
Erik-Jan WestendorpandSebastiaan Janssen 0b36c1195e Use constants instead of hardcoded strings
(cherry picked from commit 4f129baebd)
2022-12-14 13:17:49 +01:00
Justin NevilleandSebastiaan Janssen 5f4dc7a994 Added aria label to time period on log dashboard
(cherry picked from commit 8bf6a9246f)
2022-12-14 13:17:00 +01:00
Justin NevilleandSebastiaan Janssen 04be6889ab Allow empty valuesets to be indexed so the back-offce does not hang when rebuilding empty indexes
(cherry picked from commit 88ff05a836)
2022-12-14 13:15:53 +01:00
Markus JohanssonandSebastiaan Janssen 3bd9da00cc LogViewe: Adding support for destructed properties
(cherry picked from commit d2ab80534a)
2022-12-14 13:15:01 +01:00
Lotte PitcherandSebastiaan Janssen a0e8049916 Remove reference to installing a local package via backoffice (#13330)
(cherry picked from commit da9eae1252)
2022-12-14 13:14:19 +01:00
CyberReiterandSebastiaan Janssen 328f5e0817 make use of spans in UriExtensions to make them faster
(cherry picked from commit 02dcf98e3d)
2022-12-14 13:13:24 +01:00
Vitor RodriguesandSebastiaan Janssen 57a29e4085 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.

(cherry picked from commit 7ad1e638e6)
2022-12-14 13:12:37 +01:00
Vitor RodriguesandSebastiaan Janssen ea3c862228 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.

(cherry picked from commit d4c921264d)
2022-12-14 13:11:32 +01:00
Kenn JacobsenandGitHub dc2701cb5e Handle StringValues in ObjectExtensions.TryConvertTo (#13575) 2022-12-14 11:39:36 +01:00
Marc GoodsonandSebastiaan Janssen b87b9bebe2 Adjust the wording of some of the helper text around the new Block Grid editor (#13484)
(cherry picked from commit 2461b7d805)

# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
2022-12-14 11:03:45 +01:00
Kenn JacobsenandGitHub c0d022be10 Fix wrongfully reported pending package migrations (#13574) 2022-12-14 11:00:12 +01:00
Bjarne FyrstenborgandSebastiaan Janssen 2f1ef29690 Adjust sorting of block grid editor groups to y-axis only (#13225)
fixes https://github.com/umbraco/Umbraco-CMS/issues/13180

(cherry picked from commit d4c5f5017f)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.controller.js
2022-12-14 10:53:35 +01:00
CyberReiterandSebastiaan Janssen d46d5aac0d Use ToArray instead of ToList
(cherry picked from commit f99378c5d3)
2022-12-14 10:47:16 +01:00
Lars-Erik AabechandSebastiaan Janssen c0d5b544f5 Ensure culture is always set in LocalizeText
(cherry picked from commit 4d23e8a6bd)
2022-12-14 10:45:56 +01:00
Karl ButlerandSebastiaan Janssen 303abaea28 Accessibility Fixes for Users and Packages pages (#13087)
(cherry picked from commit 2d560e9766)
2022-12-14 10:41:49 +01:00
patrickdemooij9andSebastiaan Janssen 481d496641 Use span in StripFileExtension to speed up and use less memory (#13101)
(cherry picked from commit 475cea40a1)
2022-12-14 10:38:04 +01:00
bkclerkeandSebastiaan Janssen ae31c2f5e4 add aria-labelledby attribute to tags input
(cherry picked from commit 1009238f32)
2022-12-14 10:36:09 +01:00
Kenn JacobsenandGitHub 2e271ba766 Fix unpublished state for culture variant content in a single language site (#13570) 2022-12-14 10:35:41 +01:00
Jan SkovgaardandSebastiaan Janssen 39e59efd22 Accessibility: Fix - Missing table description: A data table is present with no description associated to it (#13117)
(cherry picked from commit 97fa4d76dc)
2022-12-14 10:33:22 +01:00
Asbjørn Riis-KnudsenandSebastiaan Janssen ce9766eb69 Skip populating the PropertyTypeGroup alias column if it is already populated (#13109)
(cherry picked from commit 50d361c4e6)
2022-12-14 10:32:05 +01:00
Bjarne FyrstenborgandSebastiaan Janssen 3c89b5271c Add input id to args in toggleValue event (#13108)
(cherry picked from commit a7368542d8)
2022-12-14 10:25:58 +01:00
JesseandSebastiaan Janssen a3c259482c added fix for ncNodeName filter in list view (#13086)
(cherry picked from commit e87701c482)
2022-12-14 10:24:22 +01:00
bakersbakebreadandSebastiaan Janssen ded4424b98 add setDirty() logic to remove actions on mediaPicker3 property editor
(cherry picked from commit 3377a7c96b)
2022-12-14 10:22:52 +01:00
TiffanyandSebastiaan Janssen 1c12e96c65 Fixed user invited badge color
(cherry picked from commit 5209840597)
2022-12-14 10:18:19 +01:00
Bjarke BergandGitHub 2d564a11b9 Maintenance page when in upgrade state (#13551)
* Added functionality to show maintenance page and fixed issues with showing custom api controllers and 404 page, when umbraco had been in install or upgrade state

* Fixed Tests

* Fixed typo

* Fixed issue with login screen redirecting to website when in upgrade state, instead of backoffice
2022-12-14 08:14:19 +01:00
Ronald BarendseandGitHub fd7778320a Save using consistent newline and support parsing different newlines (#13569) 2022-12-13 13:32:14 +01:00
BatJanandSebastiaan Janssen faa256dd92 Change prevalue order
(cherry picked from commit 8fe699f26b)
2022-12-13 13:27:14 +01:00
TiffanyandSebastiaan Janssen 90fdd8c5a8 Added h2 for the package details heading
(cherry picked from commit 96da638236)

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
2022-12-13 13:21:54 +01:00
Rachel BreezeandSebastiaan Janssen 5d0d245f69 A11Y added missing iframe title to installer and preview controller.
(cherry picked from commit d32b93349d)
2022-12-13 13:19:29 +01:00
Michael LatoucheandSebastiaan Janssen 0b9e90821e Update datepicker.controller.js
Don't set dirty if date actually not changed

(cherry picked from commit 92ac072559)
2022-12-13 13:17:07 +01:00
Niels LyngsøandGitHub e4d1c65081 Make our default layout stylesheet handle area as flexbox, similar to backoffice styling. (#13534) 2022-12-13 09:35:34 +01:00
Niels LyngsøandGitHub f017c27db8 fix the broken responsiveness css calculation (#13535) 2022-12-13 09:34:18 +01:00
sofietoftandNikolaj 151708c4b5 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:41 +01:00
793272bda1 V10: Umbraco Marketplace (#13511)
* 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>

* 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

* update marketplace url to its final, live url

* re-add files to prevent breaking change

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-12-07 10:44:34 +01:00
Justin NevilleandBjarke Berg f28b4c1279 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:42:06 +01:00
caed5bcb13 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>
2022-12-06 11:32:23 +01:00
248a0c4f19 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:23:54 +01:00
e992da7159 Fix concurrency issue in UmbracoMapper (#13524)
* Add logging to UmbracoMapper

* Add NullLogger to tests

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-12-05 12:25:55 +01:00
Elitsa MarinovskaandGitHub 4aa0378431 Changing the way we create the temp file for SQLite file (#13439) 2022-11-30 16:30:13 +01:00
Jan SkovgaardandGitHub 0d76ecbec8 Accessibility - Fix Packages - Modal - Empty buttons (#13114) 2022-11-30 15:55:26 +01:00
Andy ButlandandGitHub 34086386c7 Updated Forms dependency for JSON schema to the latest version. (#13505) 2022-11-30 13:46:37 +01:00
Andreas ZerbstandGitHub ccab65b12e V10/feature/fixing flaky acceptance test (#13473) 2022-11-30 12:41:16 +01:00
Niels Lyngsøandnikolajlauridsen f4c4c9008b do not set layout gaps (#13496) 2022-11-29 13:36:06 +01:00
Niels LyngsøandGitHub 877f52aec8 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:58:59 +01:00
Mole c9a97984f4 Ensure that all automatic relation types are updated (#13470) 2022-11-28 12:51:48 +01:00
c88ac85861 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>
2022-11-28 11:20:46 +01:00
Mole e366da8c83 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 12:04:44 +01:00
Bjarne FyrstenborgandNikolaj 3a01176ae4 Delete references using custom relation types (#13389)
undefined
2022-11-23 15:48:03 +01:00
Nikolaj dbef11b62b Cherry pick #13404 to v10 2022-11-23 12:36:56 +01:00
Kenn JacobsenandGitHub 63fa6f392c 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
2022-11-23 10:04:21 +01:00
Kenn JacobsenandGitHub bce29f44f8 Fix preview issue for new (empty) variants (#13455)
* Fix save and preview for new (unsaved) variants

* Rework & simplify
2022-11-23 08:34:39 +01:00
Niels LyngsøandGitHub f13a9d419d remove the hidding of catelouge appearance as its not located under advance (#13456) 2022-11-22 10:54:43 +01:00
niekvanderreestandnikolajlauridsen 4ea920825d Cherry pick #13373 to v10/dev 2022-11-22 09:23:04 +01:00
dependabot[bot]andJacob Overgaard bc7e9267d8 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:47 +01:00
Niels LyngsøandGitHub d2c8ecf9ab use custom prop for calculated width (#13451) 2022-11-21 20:08:12 +01:00
Niels LyngsøandGitHub 79b5484d23 Block Grid Editor translations and Area size keyboard navigation (#13450) 2022-11-21 20:07:18 +01:00
Niels LyngsøandGitHub a304d9b7b2 Display media trashed state on custom view for image demo block (#13448) 2022-11-21 16:23:07 +01:00
2a22cece7e 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-21 16:22:49 +01:00
c64850572b 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-21 14:17:47 +01:00
b9d799b21d 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-21 13:22:00 +01:00
b698e4754d 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-21 10:41:57 +01:00
dependabot[bot]andJacob Overgaard c2140cc042 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:46 +01:00
Jacob Overgaard 31f698e9b5 updated package-lock 2022-11-17 14:42:01 +01:00
dependabot[bot]andJacob Overgaard ac0101b601 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:14 +01:00
dependabot[bot]andJacob Overgaard 24c7fddc33 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:10 +01:00
dependabot[bot]andJacob Overgaard 4eb37538d5 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:05 +01:00
Blake WattandJacob Overgaard 7c16fa8171 update block grid panel name (#13325)
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-17 14:13:03 +01:00
dependabot[bot]andJacob Overgaard 4b83ca79df 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 14:12:57 +01:00
4aafbbf669 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>
2022-11-17 11:17:41 +01:00
57ef0917f2 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-17 11:16:01 +01:00
dff3d8a739 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:43:57 +01:00
Niels LyngsøandGitHub 86561d2d2d 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-16 11:52:40 +01:00
b4115132cd 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>
2022-11-16 10:02:06 +01:00
Andy ButlandandGitHub f9e5d6308f Updated references for Forms and Deploy in JSON schema project. (#13411) 2022-11-15 15:24:52 +01:00
Niels Lyngsø fe2cab0daa remove console log 2022-11-14 12:14:25 +01:00
Niels LyngsøandGitHub 47c0bf9884 Block Grid Editor Improvements (#13282) 2022-11-11 22:15:07 +01:00
Kenn JacobsenandGitHub b5842d6a7d Move block grid single area rendering to its own dedicated view (#13359) 2022-11-08 13:34:12 +01:00
Nikolaj GeisleandGitHub 2a952c7374 Add guard statement (#13340) 2022-11-02 13:09:55 +01:00
Mole ed52298099 Fix casing in fileSystemBasePath (#13306) 2022-11-01 08:42:48 +01:00
Bjarke BergandGitHub e0b76acde5 Updated Smidge (#13331) 2022-10-31 08:47:04 +01:00
7204c039ad 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>
2022-10-31 08:06:06 +01:00
nikolajlauridsen 851e5c6302 Merge branch 'release/10.3.2' into v10/dev
# Conflicts:
#	version.json
2022-10-27 14:27:31 +02:00
Nikolaj GeisleandSebastiaan Janssen e7fae144c2 Parse lockId as invariant (#13284)
Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit 272e922020)
2022-10-25 15:17:36 +02:00
Sebastiaan Janssen de2a927f0c Bump version to 10.3.2 2022-10-25 14:40:55 +02:00
Sebastiaan Janssen 0258f247eb Unbreak breaking change in #13066 (#13288)
(cherry picked from commit e4741b0c64)
2022-10-25 14:40:04 +02:00
patrickdemooij9andSebastiaan Janssen 8954b7f745 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)
2022-10-25 14:39:39 +02:00
Sebastiaan JanssenandGitHub e4741b0c64 Unbreak breaking change in #13066 (#13288) 2022-10-25 14:18:50 +02:00
Sebastiaan Janssen e7baa03987 Merge branch 'v10/contrib' into v10/dev 2022-10-25 12:57:30 +02:00
272e922020 Parse lockId as invariant (#13284)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-25 09:18:38 +02:00
13e7534b43 Remove timeouts (#13285)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-24 14:59:56 +02:00
73bbff0a01 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-24 13:45:11 +02:00
Daniël KnippersandJoe Glombek e2636fea2a Only attempt to find template when TemplateId is not null or default 2022-10-24 11:47:28 +01:00
facadac318 Add translation acceptance test (#13280)
* Add translation acceptance test

* Bump testhelpers version

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-10-24 07:35:01 +02:00
georgebidandGitHub 66cea99807 V10/bugfix/add user error suggestion #67 (#13259) 2022-10-22 17:17:07 +02:00
Sebastiaan Janssen 0089446381 Merge branch 'v10/dev' into v10/contrib 2022-10-22 16:30:37 +02:00
Jari LarsenandGitHub 226faca53c Umbraco logo test (#13267) 2022-10-22 13:01:18 +02:00
Jannik AnkerandGitHub 3d3fbd34ca Fixes #12127 - sets z-index on block list actions element (#13179)
* Sets z-index on block list actions element

Should solve #12127 https://github.com/umbraco/Umbraco-CMS/issues/12127

* #12127 : introduces variable for block actions z-index
2022-10-21 14:51:34 +02:00
Poornima NayarandOwain Williams d0a58392c6 Left aligned message - "This index cannot be rebuilt because it has no assigned IIndexPopulator" 2022-10-21 10:26:35 +01:00
nikolajlauridsen 86fb24ad32 Bump version 2022-10-20 15:21:25 +02:00
Mole fdbf3df057 Add PrivateAssets="all" to mangement api project reference (#13249) 2022-10-20 15:20:49 +02:00
MoleandGitHub b6af5decea Add PrivateAssets="all" to mangement api project reference (#13249) 2022-10-20 15:19:13 +02:00
a696d70815 Add default BlockGrid partial views to disk (#13227)
* Add migration that adds BlockGrid files to disk

* Add partial views to disk when creating sample

* Refactor upgrade to use IPartialViewPopulator

* Add blockgrid default rendering partial views when creating a new project from template

* Remove views from static assets

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-10-19 14:13:56 +02:00
Nikolaj d868263be4 Bump version 2022-10-19 09:23:08 +02:00
Andreas ZerbstandGitHub 071042fcb6 Merge pull request #13233 from umbraco/v10/cherry-pick/acceptance-test-stabilazation
V10: cherry pick acceptance test stabilazation from v11
2022-10-19 08:50:19 +02:00
Zeegaan 08982709b3 Revert "V11: fix failing acceptance tests (#13204)"
This reverts commit ea783bbc
2022-10-19 07:52:14 +02:00
Zeegaan cb9c165794 Add back macro locator 2022-10-19 07:51:24 +02:00
Zeegaan 61415b5c31 Add back the v10 locator that was updated in v11 2022-10-19 07:46:15 +02:00
ZeegaanandNikolaj Geisle 7ba9484705 Added proper save assert instead of checking on the route 2022-10-18 20:57:50 +02:00
Nikolaj Geisle 514497ffab Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts 2022-10-18 20:57:45 +02:00
Nikolaj Geisle 39f349fc99 Bumb playwright-testhelper version 2022-10-18 20:57:42 +02:00
Nikolaj Geisle ad67616f66 Reset maximum timeout to 30s 2022-10-18 20:57:41 +02:00
Nikolaj Geisle 8f70276cf7 Update maximum test time-out 2022-10-18 20:57:40 +02:00
Nikolaj Geisle e8456e36b2 Bumb testhelpers package 2022-10-18 20:57:40 +02:00
Nikolaj Geisle fff2b54203 Remove whitespace from response 2022-10-18 20:57:34 +02:00
Nikolaj Geisle 17de2ff98e Bumb testhelpers version 2022-10-18 20:57:34 +02:00
Nikolaj Geisle 01b24e238c Update test-helpers version 2022-10-18 20:57:33 +02:00
Nikolaj Geisle 477f4724c7 Dont remove whitespace 2022-10-18 20:57:33 +02:00
Nikolaj Geisle 3f07612306 Update playwright-testhelpers version 2022-10-18 20:57:32 +02:00
Nikolaj Geisle cf68d499ef Assert that the item is loaded before trying to click rollback 2022-10-18 20:57:29 +02:00
Nikolaj Geisle 84eecf5ee4 Close success notification 2022-10-18 20:57:25 +02:00
Nikolaj Geisle f8f9646e62 Add proper expect to download button 2022-10-18 20:57:25 +02:00
Nikolaj Geisle c071fc03ba Update testhelpers version 2022-10-18 20:57:24 +02:00
Nikolaj Geisle d5278ca9fe Dont commit playwright.config.ts 2022-10-18 20:57:24 +02:00
Nikolaj Geisle c3964c2183 Update tests to close success notifications 2022-10-18 20:57:23 +02:00
Nikolaj Geisle 58fb223a45 Close success notifications after they pop up 2022-10-18 20:57:22 +02:00
Nikolaj GeisleandZeegaan ea783bbc41 V11: fix failing acceptance tests (#13204)
* Fix macro in RTE test

* Update test-helper version

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-18 20:57:09 +02:00
MoleandGitHub 629cc631c6 V10.4: Re-enable block grid editor (#13231)
* Revert "Disable BlockGridEditor (#13229)"

This reverts commit 4e9aa8dac2.

* Re-do xml comments fix
2022-10-18 14:59:08 +02:00
nikolajlauridsen 75f628b5da Merge branch 'release/10.3' into v10/dev 2022-10-18 13:40:46 +02:00
4e9aa8dac2 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>
2022-10-18 12:53:32 +02:00
Niels LyngsøandGitHub af468b6f28 Resync editors if content model changed (#13230) 2022-10-18 12:47:08 +02:00
Elitsa Marinovskaandnikolajlauridsen 5e96011140 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
2022-10-18 08:23:32 +02:00
Elitsa MarinovskaandGitHub 733f0b8e09 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
2022-10-18 08:22:27 +02:00
Niels LyngsøandGitHub 2993f1bb6d highlight areas in dragging-mode for modern browsers (#13224) 2022-10-18 08:21:54 +02:00
Sebastiaan Janssen 44253b22db Merge branch 'v10/dev' into v10/contrib 2022-10-17 15:30:53 +02:00
Niels LyngsøandGitHub 96bf197642 move below center, to make room (#13222) 2022-10-17 14:35:59 +02:00
8d8e4e0b24 10.3.0-RC: Change grid area input to number + change generic label (#13203)
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
2022-10-17 14:02:25 +02:00
Niels LyngsøandGitHub 37424a63ec make Area fit within block row (#13221) 2022-10-17 13:55:22 +02:00
e22c7ea0d6 Merge BjarneF fix into 10.3 (#13220)
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
2022-10-17 12:47:18 +02:00
41737a35d9 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>
2022-10-13 14:49:48 +02:00
ed66fe1277 Add data-element to umb property so we can find it (#13199)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-13 10:30:27 +02:00
2fa61fe811 Add data-element to umb property so we can find it (#13199)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-13 10:29:50 +02:00
Kenn JacobsenandGitHub 0a925fd3ba Add documentation for default block grid partial views in the rendering extension methods (#13184) 2022-10-13 10:02:27 +02:00
Elitsa MarinovskaandNikolaj 0fe2c225cb 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)
2022-10-13 09:14:56 +02:00
Elitsa MarinovskaandGitHub cdc994dd8e 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)
2022-10-13 08:59:53 +02:00
Niels LyngsøandGitHub a0931d2042 area permission min-max inputs width increase (#13195) 2022-10-13 08:43:43 +02:00
Niels LyngsøandGitHub ff75fcd36e remove pointer-events from Image, to make drag n' drop work on firefox. (#13193) 2022-10-13 08:42:49 +02:00
Niels LyngsøandGitHub ab8d94b466 move clear:both; to the flexbox example (#13194) 2022-10-13 08:41:31 +02:00
Nikolaj GeisleandZeegaan 76b54c4b63 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>
2022-10-13 08:27:14 +02:00
Nikolaj GeisleandZeegaan 63af4c487c Pass the node property to umb-property & umb-property-editor (#13151)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-13 08:27:11 +02:00
Zeegaan 4ee827052e Merge remote-tracking branch 'origin/release/10.3' into release/10.3 2022-10-13 08:26:34 +02:00
MoleandZeegaan 213dd7114d Add missing ForceLeft and ForceRight (#13190) 2022-10-13 08:26:23 +02:00
Mole 0b3a06ff0d 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
2022-10-13 08:26:17 +02:00
MoleandGitHub 9f6d5e9543 Add missing ForceLeft and ForceRight (#13190) 2022-10-13 08:24:50 +02:00
MoleandGitHub 29ae87ec61 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
2022-10-13 08:17:02 +02:00
92df5d9501 Packages Modal - Further Fixes for Modal Trap (#13172)
* Fixes to focus trap within the modal

* Removing duplicate code

* Adding focus to previous element

* changed hardcoded color to existing less variable

Co-authored-by: Michael <michael@crossingpaths.be>
2022-10-13 01:02:23 +02:00
Jacob OvergaardandBjarke Berg 6e7ecd0a77 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)
2022-10-12 12:40:02 +02:00
Jacob OvergaardandGitHub 4a412bb432 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
2022-10-12 12:39:11 +02:00
Nikolaj d13a55762a Re-add IsPackable to Umbraco.Tests.Integration 2022-10-12 10:30:31 +02:00
Nikolaj 3a08ab9b0b Re-add IsPackable to Umbraco.Tests.Integration 2022-10-12 10:29:46 +02:00
Kenn JacobsenandGitHub b8c73e7550 Add sync rendering extensions for block grid and async ones for block list (#13168) 2022-10-12 10:06:43 +02:00
BatJanandMichael Latouche c29679fa14 Remove old unused legacy files 2022-10-12 03:51:44 +02:00
patrickdemooij9andGitHub 3802097a32 Use the actual save function for saving the copy (#13066)
* Use the actual save function for saving the copy

* PR feedback
2022-10-12 02:59:38 +02:00
4deceb43eb 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>
2022-10-11 15:57:01 +02:00
Andreas ZerbstandGitHub 0d290c1ab3 Updated: added more time to waitForTimeout so the pipelines have time to load (#13164) 2022-10-11 13:53:45 +02:00
51968f3fba Pass the node property to umb-property & umb-property-editor (#13151)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-10 16:15:53 +02:00
Kenn JacobsenandZeegaan 7777ba40fd Fix broken selectable state for list view items (#13148) 2022-10-10 13:00:40 +02:00
Kenn JacobsenandGitHub 9897208838 Fix broken selectable state for list view items (#13148) 2022-10-10 12:58:50 +02:00
Ronald BarendseandGitHub 049ea6dca5 Publish E2E application logs (#13128)
* Publish E2E application logs

* Stop app after running E2E tests

* Update GenerateAppsettingsSchema task

* Enable console logging in Release mode

* Cleanup variables and enable logging in Linux docker

* Remove --yes from npx commands

* Set custom Umbraco settings (disable keep-alive, health checks, etc.)

* Update Docker image tags/versions

* Change PowerShell@2 task to pwsh and write results to artifact staging directory

* Ignore Playwright .env file
2022-10-10 09:09:59 +02:00
Bjarke Berg b5262d74eb Merge remote-tracking branch 'origin/release/10.3' into v10/dev 2022-10-07 10:03:11 +02:00
Bjarke Berg fbe5ecedf9 Add dependencies that we force an update to, even that we do not use them explicitly and they seems to be taken from the framework instead of from Nuget 2022-10-07 10:02:33 +02:00
Anders BjernerandNathan Woulfe 461989a599 Fixed accessibility issues with notifiation close buttons 2022-10-06 09:40:16 +10:00
BatJanandNathan Woulfe 21571b54ef Fixes umbraco/Umbraco-CMS.Accessibility.Issues#60 2022-10-06 09:32:05 +10:00
nikolajlauridsen c741f2fc20 Merge branch 'release/10.3' into v10/dev 2022-10-05 18:19:02 +02:00
Nikolaj 0dc577b45f Remove --no-build from dotnet pack
Should fix statix assets restore problem
2022-10-05 15:42:34 +02:00
Nikolaj e90c9e416d Bump version 2022-10-05 14:25:15 +02:00
367a4b9727 Block Grid Editor (#12826)
* Refactor block list/grid property value editors for code reuse

* Prettify block grid editor data conveter a bit

* correct appearance and colors

* validation should only kick in if value is higher than 0 and not null

* Add copyright notice to code, a little formatting and file scoped namespaces where applicable

* custom views

* custom views for blocks

* Refactor block list min/max validation and reuse for block grid

* Prettify extraction of nested content-and-settings references for block grid

* Fix bad naming

* fix casing

* Refactor block list notification handler and reuse for block grid

* context sensitive ui for Blocks

* Refactor notification handlers for block list and block grid incl. unit tests

* Formatting and review

* Bump number of expected data editors in unit test

* initial progress on column options editor

* column span options UI

* column span UI adjustments

* context aware ui adjustments

* minor border improvement

* get and pick layout stylesheet

* remove random x

* make highlight border standout more

* dedicated context bar

* UI improvements

* remove annoying indication

* copy paste

* UI improvements

* remove div.umb-block-grid__block--view from partial

* show block ui, only hide when hovering area.

* area actions

* UI Adjustments

* Block grid editor localization (#12915)

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>

* fix case of empty value

* use right index

* place border on top of column indication

* heroblock

* userFlowWhenBlockWasCreated

* shorter messages

* overal improvements

* force left/right drag feature

* stylesheet picker localization

* localizations

* space

* unnesecary removal of space

* notes on masonry

* validation form parent skipping + better snapping when drag n drop

* remove icons

* make rows go as minimal as posible

* scale and drop indications

* use item width to determin forceLeft or forceRight

* clean up

* Make clipboard filtering work with block arrays

* readonly mode

* important note

* ask to revert failed paste

* dont allow for backdrop click

* changed wording

* more area actions outside grid container

* droppable indication

* implemented minimal responsive solution.

* add additional data fields about grid clumns

* improved fallback columns width + rows height

* make root element class `umb-block-grid`

* align layout with position relatives, to align visual experience.

* use clientX not screenX

* rename area classes so they dont include the word 'block'

* more renaming

* commit flexbox layout css to repo

* fixes

* fix typo

* only show a broader inline create button if the block is full width.

* simplify css

* remove headline block hover effect

* use some font, to make it look better.

* Drag and drop correctiions/limits

* clean up

* remove log

* make assumptions about proposed distance of target

* slightly white border on validation message for areas to make it standout

* drag n drop seems good at this stage

* force left and right buttons and indication

* correct if

* revert scale handler ui

* If columnSpans is empty we fall back to full width

* Access other PreValues from a PreValue Editor

* maybe temprorary turn of distance drag n' drop condition

* setDirty

* area alias was missing in razor and needed help text

* forceleft forceright translations

* forceLeft / forceRight razor

* correct translation +
remove data- on ng-click

* force placement when moving over edge

* remove unnesecary wrapper element

* show-validation

* red text, might be hard to see, lets see.

* for safety have the border-raduis correct

* better wordings

* Use mouse position to judge if the drop is good before or after.

* fit placeholder when item is begin dragged away

* initial step for finding nearest relation when drag-hovering nothing

* Much better drag n drop experience, must be tested further to prove its not breaking some cases.

* title for scale handler

* new approach + massive drag n drop clean up

* avoid complex CSS transfering of props, instead add the prop in HTML

* adjust placeAfter when in vertical direction mode

* do not scale bigger than the available space to the right

* clean css

* fix numbers

* Fix the case of flickering when hitting an empty area.

* correct placement of code

* package lock

* Adjustment for PreValue Area allowances

* comment on fit in line feature

* fixing scale and drag n drop potential issues

* clean up

* only disallow above max

* outcomment unused code

* clean up

* drag n drop above or below container

* fix for Firefox

* Do not edit block if there is no properties in content

* angularJS form for Entries, to correct validation

* parse layout columns, used to know if block is full width of the layout

* use inherited layout columns

* add this to the example html

* flexbox fix

* highlight if empty area

* comments for undefined column spans

* bring back approvedContainer lock period.

* fix

* Do not edit something without properties

* Remove Force, as thats confusing to read.

* correct localization key

* minor corrections

* Fit within context columns

* Conceptual, inline editor for Grid.

* fix casing

* consider related position in directional conditions

* set default max row span to 1

* update columnSpanOption check for sync

* move Editor to group of Rich Text

* more shift autoScroll

* assume layout columns comes as string

* fix variable name

* force left/right indication

* Inject Areas directly in slot, to enable custom view manipulations of such.

* fix sortableJS mis dropping items

* Overwrite create label

* ability to overwrite root layout create label

* Simplify PreValue editor by hidding options that is not in effect.

* Setup new areas as half width if possible

* Grouping blockTypes

* remove flexbox stylesheet

* Chose groups for area allowance

* ensure a good default width

* improve block active state

* Better contextual sizing

* Comment clean up

* Remove The StarterKit from branch

* Unique group identification for the property editor sortable

* only show avaiable block groups in picker.

* Indication of taget area

* Fallback to root grid columns

* use root layout grid columns, so dont update when layoutColumns change

* Ability to remove block group

* clean up references when removing Group or single Block

* fix drop in same group

* Block picker use contexual create label as headline

* adjust area highlight

* Prevalue editor

* structuralOptions

* Move pre values into tabs for better overview and scope

* Let area grid columns fallback to root grid columns, and let both default to "12" instead of "initial"

* remove input close tag

* Allow in areas

* Move build-in custom views

* only show property-into-button on hover when in group-panel__header

* some height for the show buttons

* filter available block type based on allowInAreas

* remove OnlySpecifiedAllowance

* unsupported block if trouble happend

* move allow at root to allowance group

* easily drop at top or below area if outside. If more than 100px outside then see if there is a parent layout to move into.

* block group validation

* shortcut for opening Areas if areas are defined

* scale label for Areas editor

* Added Legacy name on the old grid layout

* Remove files that come with the starter kit

* Sorting: takeover container detection

* Refactor models + remove unused properties

* Endpoint for creating block grid demo element types

* CTA for getting Block Grid demo blocks

* Refactor block grid sample element creation

* Fix Constants-PropertyEditors spacing

* Fixed unit tests

* Get sample configuration

* Labels for sample blocks

* Improve drag, to swap across unallowed area/root

* improved empty threshold

* hide the after inline-create-button if block is located at right side of area/layout

* clean up

* translations

* danish translations

* move outside edge for forceRight

* Update src/Umbraco.Web.Common/Extensions/BlockGridTemplateExtensions.cs

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

* Review comments

* Remove leftover TODO

* big cleanup

* Hide Sample CTA when installed

* clean up

* correct styling for wrapper + moving Block UI to z-index 3 for visiblity on top of other block

* slightly adjusting inline-create-buttons to avoid collisions

* correct localization for force left/right buttons

* gitignorer update

* Clean up nesting of classes in BlockGridConfiguration

* change gitignorer to include App_Plugin folder

* move default layout stylesheet

* remove specific App_plugin folder

* package-lock

* update sample custom views paths

* add custom views for sample

* Adding sample custom views

* Move sample partial Views and custom views

* Update views to not use ModelsBuilder

* Move sample custom views to wwwroot

* Updated Sample CTA text

* Use localize directory

* Ensure groupKey for items without such to work.

Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Warren Buckley <warren@umbraco.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-10-05 13:50:26 +02:00
efb994ecf7 Adds a parameter to BeginUmbracoForm to allow the disabling of the creation of an antiforgery token. (#13037)
* Addes a parameter to BeginUmbracoForm to allow the disabling of the creation of an antiforgery token.

* Updated project references for Forms and Deploy in the JsonSchema project.

* Revert "Updated project references for Forms and Deploy in the JsonSchema project."

This reverts commit a749b45ab8.

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-05 12:56:42 +02:00
a745250d39 Removing can connect to database check so that Umbraco errors out on … (#13118)
* Removing can connect to database check so that Umbraco errors out on startup rather than trying to re-install when unable to connect to database.

* Revert breaking change

* Support installs of missing databases if the provider CanForceCreateDatabase. Else not

Co-authored-by: Austin Gilbert <AGilbert@rbaconsulting.com>
2022-10-05 12:44:18 +02:00
Sebastiaan Janssen b5f1ad5396 Merge branch 'v10/dev' into v10/contrib 2022-10-05 12:32:13 +02:00
Ronald BarendseandGitHub bc21c64617 v10: Cleanup project files (#13111)
* Backport project cleanup from #12907

* Remove empty Directory.Build.props

* Fix GenerateAppsettingsSchema target

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

* Add NRT to-do comment

* Explicitly generate HTTPS development certificate for E2E test
2022-10-05 12:11:51 +02:00
Bjarne FyrstenborgandGitHub 43b964c6c0 Adjustment of telemetry data slider (#13092)
* Set specific width of container to avoid slider flickering when browser add scrollbar due the telemetry data description

* Round value to nearest integer when slider use smooth behaviour
2022-10-05 11:54:17 +02:00
0feb947048 V10/bugfix/fix acceptance test (#13106)
* Fixed test for tab 'Drags and drops a property in a tab'

* Fixed test for macro 'Create macro'

* Fixed test for dataTypes 'Tests Approved Colors', 'Tests Textbox Maxlength', 'Test Url Picker'

* Fixed: Added more waitForTimeout on the test Tests Approved Colors.

* Fixed test for packages 'Create a simple package' test

* Removed unnecessary waitForTimeout

* Changed waitForTimeout to waiting until an element isVisible

* bumped test-helper packed to 1.0.2

* Removed duplicate isSuccessNotificationVisible

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-10-05 08:26:02 +02:00
ae6bee7b0b V10: Dont delete member on failed autolink (#12996)
* Disapprove member instead of delete if failed autolink

* Update to not disable the member when external login fails, but move the logic to protected method, to make it easy to extend.

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-10-05 08:19:22 +02:00
Andreas ZerbstandGitHub 99c7f966bd Merge pull request #13095 from umbraco/v10/feature/export-test-artifact
V10: Export test artifacts
2022-10-04 14:24:08 +02:00
cd748cd7c8 New backoffice: models builder dashboard controller (#13050)
* Add OutOfDateType model

* Add ModelsBuilderDashboardControllerBase

* Add BuildModelsController.cs

* Add StatusModelsBuilderDashboardController

* Change to return created and not OK

* Remove unused usings

* Add GetModelsBuilderDashboardController

* Add OpenApi attributes

* Fix formatting

* Fix up dependency injection for ModelsBuilderSettings

* Fix up naming and routing

* Fix up OpenApi attributes

* Remove ability to send raw HTML in dashboard

* Remove obsolete property

* Dont include dashboard in the name

* Async controllers

* Return ActionResults

* Fix up OpenApi contract

* Fix missing usings

* Update src/Umbraco.Cms.ManagementApi/Controllers/ModelsBuilderDashboard/ModelsBuilderControllerBase.cs

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

* use VersionedApiBackOfficeRouteAttribute for routing

* Fix up open api spec

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-10-04 13:11:30 +02:00
72fd393272 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>
2022-10-04 11:34:55 +02:00
31cb328c3b Use less memory when generating a GuidUdi (#13090)
* Use less memory when generating a GuidUdi

* PR feedback

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2022-10-04 01:49:59 +02:00
Sebastiaan Janssen 71276b7b4d Merge branch 'v10/dev' into v10/contrib 2022-10-03 13:43:27 +02:00
5115af0a31 Revert "Removing X-XSS-Protection healthcheck" (#13096)
This reverts commit 696475ebf2.

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-03 08:37:09 +02:00
Zeegaan 6eb57302fb Give proper variable name 2022-10-03 07:38:49 +02:00
Zeegaan 9e82bc5a46 Remove unused pipelines variable 2022-10-03 07:37:47 +02:00
Zeegaan 2a506320f1 Remove echo from build 2022-10-03 07:36:40 +02:00
Zeegaan 212c036052 Refix user test 2022-10-03 07:35:56 +02:00
Karl ButlerandMichael Latouche bdbf9122c9 Fixes umbraco/Umbraco-CMS.Accessibility.Issues #63 and #61 2022-10-03 02:53:48 +02:00
Patrick de MooijandMichael Latouche 97ac1ae629 Added nullability attribute to IsNullOrWhitespace 2022-10-03 00:05:18 +02:00
Bjarne FyrstenborgandMichael Latouche aa9a7e415e Don't use legacy icon for action delete 2022-10-02 23:18:02 +02:00
bakersbakebreadandMichael Latouche d6a1b69ead Refactor event handler away from keyup to ng-change 2022-10-02 22:09:17 +02:00
Zeegaan f0fe5261f2 Add echoing 2022-09-30 13:38:14 +02:00
Zeegaan cde1a27ff4 Add proper failing test 2022-09-30 13:37:38 +02:00
Zeegaan 74a2dd88c3 Add failing test 2022-09-30 12:03:05 +02:00
Zeegaan 89c5ef9582 Update yml to use powershell to check folder 2022-09-30 12:01:54 +02:00
8c61e9e00b 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>
2022-09-30 11:45:26 +02:00
patrickdemooij9andGitHub ae5a8496bb Use char instead of string for DetectJson (#13019)
* Use char instead of string for DetectJson

* Use faster method

* Change DetectIsJon method
2022-09-30 01:39:54 +02:00
Bjarne FyrstenborgandGitHub 826dbe7d62 Fix comment of view property in ConfigurationFieldAttribute (#13077)
* Fix comment of view property in `ConfigurationFieldAttribute`

* Update description of key property as well
2022-09-29 11:07:56 +02:00
89f5151ddf 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>
2022-09-29 10:49:33 +02:00
Justin NevilleandMichael Latouche 3d88ed7ab2 Fix issue 13023 - Cannot read properties of undefined (reading 'allowedActions') 2022-09-29 01:51:33 +02:00
Justin NevilleandMichael Latouche 48269143d5 Redirect to a return URL if one is present on the querystring when logging into the back office 2022-09-29 01:09:41 +02:00
Austin GilbertandMichael Latouche 696475ebf2 Removing X-XSS-Protection healthcheck 2022-09-28 23:55:41 +02:00
Jeavon LeopoldandMichael Latouche 17101da620 Bump Smidge up to v4.1.1 2022-09-28 22:43:51 +02:00
Bjarne FyrstenborgandMichael Latouche 0e25d06698 Use pattern matching to check if items is not JArray 2022-09-28 21:54:54 +02:00
134b193c74 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>
2022-09-28 13:37:59 +02:00
Nikolaj GeisleandGitHub 3752f51625 Make Searchers endpoint return ActionResult (#13068) 2022-09-28 13:00:27 +02:00
Ronald Barendse 7890a265ab Internalize Umbraco.Cms.ManagementApi references 2022-09-27 23:43:07 +02:00
Ronald Barendse b0ea7bc076 Add BuildProjectReferences=false to dotnet pack 2022-09-27 17:23:56 +02:00
Ronald Barendse 418db7d325 Update build script 2022-09-27 17:07:24 +02:00
a0e51e3b91 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>
2022-09-27 11:30:59 +02:00
Justin NevilleandMichael Latouche 90cabb5e2b Fix issue toggling boolean between true/false after Save without refreshing 2022-09-27 02:01:16 +02:00
Busra SengulandGitHub 24b338a7a3 Fixes #12972 for validating legacy member passwords (#12973)
* Fixes #12972 for validating legacy member passwords

* Removed unused variable

* removed unused variable
2022-09-27 00:37:59 +02:00
MoleandGitHub 476692c4a9 Merge pull request #13061 from umbraco/merge/10.2.1
Merge/10.2.1
2022-09-26 12:54:51 +02:00
Nikolaj e97354dff9 Merge branch 'release/10.2.1' into merge/10.2.1
# Conflicts:
#	version.json
2022-09-26 12:53:19 +02:00
Mads RasmussenandNikolaj 25a20cf741 Add null check for variants in Grid Layout (#13060)
This fixes a regression from 10.2.0 where the `variants` property was removed.
2022-09-26 12:33:20 +02:00
Mads RasmussenandGitHub a342e4747f Add null check for variants in Grid Layout (#13060)
This fixes a regression from 10.2.0 where the `variants` property was removed.
2022-09-26 12:21:08 +02:00
MoleandGitHub 7493e5e1fd Add spellcheck false to password inputs (#13059) 2022-09-26 11:25:59 +02:00
Kenn JacobsenandGitHub e1d438701b Make sure swagger tags and operations are sorted alphabetically (#13055) 2022-09-24 09:50:32 +02:00
4b39cfe913 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>
2022-09-23 14:36:02 +02:00
c903c8a1a0 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>
2022-09-23 14:03:16 +02:00
Kenn JacobsenandGitHub 12a341f67d New endpoint for web profiling dashboard (#13038)
* Endpoint for web profiling dashboard

* Add profiling API contract
2022-09-22 13:41:26 +02:00
9a9bd6e480 Missing methods from IMemberService (#13022)
* Add back methods to interface

* Add default implementations to avoid breaking changes

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-09-22 10:51:48 +02:00
SeanandNikolaj b7f4f95f4b pass in parameters needed to member service (#13020) 2022-09-22 10:51:16 +02:00
Jacob OvergaardandNikolaj 4b25beea8b improve pip classList add/remove with no intermediary variable 2022-09-22 10:43:28 +02:00
Jacob OvergaardandNikolaj 3f6fc6f761 add an extra check to ensure the pips exist before adding a class to them 2022-09-22 10:43:12 +02:00
Mads RasmussenandGitHub b9f58a7bc4 Merge pull request #13044 from umbraco/bugfix/ab22651-slider-pips
Fix regression of active pips handling with noUiSlider
2022-09-22 10:22:50 +02:00
Kenn JacobsenandGitHub 986635c8a0 UmbracoPath has been removed from the official schema store, remove temporary workaround from our schema generator as well (#13043) 2022-09-22 10:18:40 +02:00
Andy ButlandandZeegaan 68f9a1e68c Updated project references for Forms and Deploy in the JsonSchema project. (#13047) 2022-09-22 07:53:37 +02:00
Andy ButlandandGitHub 4e6e0d6e14 Updated project references for Forms and Deploy in the JsonSchema project. (#13047) 2022-09-22 07:50:45 +02:00
Erik-Jan WestendorpandGitHub a95f4504eb Translate "User permissions for languages" feature to español (#12975)
* Translate 'selectLanguages' to Español

* Translate 'languagesHelp' to español

* Translate 'allowAccessToAllLanguages' to spanish
2022-09-22 01:22:34 +02:00
Erik-Jan WestendorpandGitHub 2f84d3071a Translate "User permissions for languages" feature to dutch (#12971)
* Translate 'sectionsHelp' to Dutch

* Translate 'selectLanguages' to Dutch

* Transkate 'allowAccessToAllLanguages' to Dutch
2022-09-22 01:10:17 +02:00
Sebastiaan Janssen 4effe1d462 Bump version to 10.2.1 2022-09-21 16:21:57 +02:00
Bjarne FyrstenborgandSebastiaan Janssen 0142ade713 Ensure consistent margin on headings in tree root (#12992)
(cherry picked from commit 88bfef9e0d)
2022-09-21 16:18:55 +02:00
Bjarne FyrstenborgandGitHub 88bfef9e0d Ensure consistent margin on headings in tree root (#12992) 2022-09-21 16:10:40 +02:00
Mads RasmussenandJacob Overgaard 3139ad99e0 Only contain style instead of full layout (#13033) 2022-09-21 15:58:51 +02:00
Jacob Overgaard 348f3e71ea improve pip classList add/remove with no intermediary variable 2022-09-21 15:37:57 +02:00
Jacob Overgaard 65d065fb54 add an extra check to ensure the pips exist before adding a class to them 2022-09-21 14:59:54 +02:00
Sebastiaan Janssen cbfeba0807 Fix CodeQL duplicate "permissions" node and reformat 2022-09-20 16:03:57 +02:00
Mads RasmussenandJacob Overgaard 9827e18186 Only contain style instead of full layout (#13033) 2022-09-20 13:54:54 +02:00
Mads RasmussenandGitHub 92cde25a3e Only contain style instead of full layout (#13033) 2022-09-20 13:54:06 +02:00
Kenn JacobsenandGitHub a390ad1c3c UmbracoPath should no longer be configurable (#13032)
* UmbracoPath should no longer be configurable

* Remove UmbracoPath configuration from all tests
2022-09-20 13:19:18 +02:00
d872d6228f 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>
2022-09-20 12:40:50 +02:00
Sebastiaan Janssen 732373b694 Merge branch 'v10/dev' into v10/contrib 2022-09-20 10:51:14 +02:00
954d3ecc86 v10: add Umbraco UI Library to the backoffice (#13031)
Co-authored-by: Warren Buckley <warren@umbraco.com>
2022-09-20 09:58:59 +02:00
48954bb36a New Backoffice - Exposing hardcoded Open API contract (#12953)
* Only expose swagger ui when in development

* Only expose swagger ui when in development + Test confirming the contract is respected + contract

* Rollback test code

* Fix up formatting

* Add reference to managementapi in integration tests.

* Revert "Add reference to managementapi in integration tests."

This reverts commit 67e2bf8277.

* Fix integration tests

* Add reference to management api in integration tests

* Fix up schema

* Fixed tests

* Fix test.. do not execute that composer twice

* Revert "Updated dependencies and fixed new NRT issues"

This reverts commit b2b2903a6e.

* Added debug info to test, to debug on azure pipeline

* Try and fix OpenApi test

* Only run test in release

* Try fixing OpenApi.json

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2022-09-20 09:50:34 +02:00
Sebastiaan Janssen b72a2c7fdc Merge branch 'v10/dev' into v10/contrib 2022-09-20 09:11:54 +02:00
Sebastiaan Janssen 8d5fb41ab7 Revert "Updated dependencies and fixed new NRT issues"
This reverts commit b2b2903a6e.
2022-09-20 09:08:28 +02:00
Sebastiaan Janssen 85e31bd12d Merge branch 'v10/dev' into v10/contrib
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
2022-09-19 16:48:36 +02:00
Bjarke BergandSebastiaan Janssen b2b2903a6e Updated dependencies and fixed new NRT issues
(cherry picked from commit 803c044b60)
2022-09-19 16:21:50 +02:00
Jacob OvergaardandSebastiaan Janssen 1fe4c5169c V10: Fix to allow dragged images in the rich text editor to be correctly uploaded (#13016)
* 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

* Use content root instead of web root for uploaded images

* Un-break a breaking change

* handle special parsing of AngularJS json response

* change htmlId selector to support html id's with numbers

* remove bad test case

* test IsFullPath without tricky UNC paths that are not useful

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
(cherry picked from commit d18dc92137)
2022-09-19 16:21:20 +02:00
Jacob OvergaardandSebastiaan Janssen 963d0018c2 update npm packages
@microsoft/signalr: 6.0.9
ace editor: 1.10.1
clipboard: 2.0.11
jquery: 3.6.1
jquery-ui: 1.13.2
moment.js: 2.29.4
nouislider: 15.6.1
underscore: 13.13.4
wicg-inert: 3.1.2

dev updates: karma, jasmine, less and postcss

(cherry picked from commit ad1c945bb1)
2022-09-19 16:20:55 +02:00
Kenn JacobsenandSebastiaan Janssen 07b7ef200a Add custom PrependBasePathFileProvider to handle media files with special characters (#12936)
(cherry picked from commit e9883ea063)
2022-09-19 16:20:44 +02:00
MoleandSebastiaan Janssen 22576edd70 Backoffice api: Refactor controllers (#12934)
* Refactor install controller

* Removed unused InstallationTypeTarget

* Add ApiVersion to controllers

* Refactor upgrade controller

* Add missing RequireRuntimeLevelAttribute

(cherry picked from commit a356cf4f40)
2022-09-19 16:20:23 +02:00
Nikolaj GeisleandSebastiaan Janssen 352da6c529 V10: Update examine dependency (#12982)
* Update Examine.Lucene to newest version

* Update other projects

(cherry picked from commit 09e2b04f91)
2022-09-19 16:19:44 +02:00
nikolajlauridsenandSebastiaan Janssen 79c67338e7 Ensure new projects use the correct apssettings key for AllowEditInvariantFromNonDefault
(cherry picked from commit ae516b28db)
2022-09-19 16:19:23 +02:00
NikolajandSebastiaan Janssen 788f8c6ab3 Undo breaking change
(cherry picked from commit 5bb38b39c9)
2022-09-19 16:19:02 +02:00
Nikolaj GeisleandSebastiaan Janssen 0c84b1a051 Extend error message with possible solution (#12962)
Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit 82934838cc)
2022-09-19 16:18:52 +02:00
MoleandSebastiaan Janssen 48c981d31f Hotfix: Move allow edit invariant from non default setting to content settings (#12960)
* Use ContentSettings instead of SecuritySettings for AllowEditInvariantFromNonDefault

* Make it backwards compatible

(cherry picked from commit 3846c75cc6)
2022-09-19 16:18:41 +02:00
Sebastiaan Janssen aa7a7c4691 Fix tree root font being larger than it used to be
(cherry picked from commit 2ad6633d47)
2022-09-19 16:18:32 +02:00
Bjarke BergandSebastiaan Janssen 0a77775bb1 Fixed InstallAuthorizeAttribute and simplified other things
(cherry picked from commit da24ae9180)
2022-09-19 16:18:19 +02:00
NikolajandSebastiaan Janssen 3ab57ce691 Bump version
(cherry picked from commit d038f860bd)
2022-09-19 16:18:07 +02:00
Nikolaj GeisleandSebastiaan Janssen 7d0be19199 Add PagedViewModel (#12955)
Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit 9a2ead4381)
2022-09-19 16:17:47 +02:00
Bjarke BergandSebastiaan Janssen 5500f87223 Limit what API does when not in used in Install level
(cherry picked from commit 7b00c0d3e9)
2022-09-19 16:17:39 +02:00
Nikolaj GeisleandSebastiaan Janssen 7852220827 Use staticserviceprovider to provide service (#12939)
Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit 89d1d7cd9c)
2022-09-19 16:16:45 +02:00
MoleandSebastiaan Janssen 669f8ff5ba Backoffice Api: Server Controller (#12932)
* Add initial implementation using 1 controller pr. action

* Add OpenApiTag attribute

Otherwise the endpoints won't be grouped correctly

* Use correct response type

* Move ApiVersion to endpoint controllers

* Add ServerController suffix to endpoint controllers

(cherry picked from commit 9cf7e965a9)
2022-09-19 16:16:32 +02:00
Jacob OvergaardandSebastiaan Janssen 126a2593ee remove styling from installer (#12923)
This styling is now being imported from components/umb-range-slider.less and is no longer needed here

Previously fixed in 52672d2c2b

Ref https://github.com/umbraco/Umbraco-CMS/pull/12807/files/52672d2c2ba046f1da431388ec95b21b30965f08#r957799952

(cherry picked from commit 87ced87ddd)
2022-09-19 16:16:22 +02:00
Nikolaj GeisleandSebastiaan Janssen 6b967a9693 Add virtual SetUpTestConfiguration method (#12928)
(cherry picked from commit 2cef243056)
2022-09-19 16:16:12 +02:00
Kenn JacobsenandSebastiaan Janssen 147c60f04b Performance improvement: Reusable data editors (#12921)
* Introduce opt-in option for reusable data editors

* Verified RTE as reusable

* Make attribute property naming more explicit + update comments

* Test file upload and image cropper

* Add unit tests

(cherry picked from commit 44122c6509)
2022-09-19 16:16:03 +02:00
Sebastiaan Janssen 6302630d39 Revert "Break word for limited width content"
This reverts commit 448836ee2d.

(cherry picked from commit 07fba1eb84)
(cherry picked from commit 5fc6fa58c0)
2022-09-19 16:15:52 +02:00
Mayur DandSebastiaan Janssen 31dc7fa458 Fix #12770 (#12865)
* change "umbraco" to "Umbraco" in translation files.

* Replace "<i>" and "<b>" tag with "<em>" and "<strong>"

(cherry picked from commit fa8bb3f1da)
(cherry picked from commit de0294d163)
2022-09-19 16:15:43 +02:00
Sebastiaan Janssen 48bd4a5f27 Grammar (do -> does) and some extra text
(cherry picked from commit 9bd6500bc7)
2022-09-19 16:15:32 +02:00
Sebastiaan Janssen 87c06f5f98 Back to 10.2.0-ish 2022-09-19 16:14:16 +02:00
Jacob Overgaard 8de26c6098 Revert "Merge remote-tracking branch 'origin/v11/dev' into v11/dev"
This reverts commit 40df989c9f, reversing
changes made to 803c044b60.
2022-09-19 12:41:26 +02:00
Bjarke Berg 40df989c9f Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-09-19 12:36:52 +02:00
Bjarke Berg 803c044b60 Updated dependencies and fixed new NRT issues 2022-09-19 12:36:45 +02:00
Kenn JacobsenandGitHub ef15da3f6e Bypass model validation for rendering models (#12999)
undefined
2022-09-19 11:03:16 +02:00
Bjarke Berg c1010e5239 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-09-19 10:51:18 +02:00
d18dc92137 V10: Fix to allow dragged images in the rich text editor to be correctly uploaded (#13016)
* 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

* Use content root instead of web root for uploaded images

* Un-break a breaking change

* handle special parsing of AngularJS json response

* change htmlId selector to support html id's with numbers

* remove bad test case

* test IsFullPath without tricky UNC paths that are not useful

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-09-19 10:29:12 +02:00
0b1295d05b Missing methods from IMemberService (#13022)
* Add back methods to interface

* Add default implementations to avoid breaking changes

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-09-19 10:26:10 +02:00
Mike MaseyandMichael Latouche 6f9bf59e04 fix: focus state for search and help icons 2022-09-18 15:03:19 +02:00
SeanandGitHub 6967fadf3d pass in parameters needed to member service (#13020) 2022-09-17 12:00:06 +01:00
MoleandGitHub 6298fb338e Merge pull request #13014 from umbraco/v10/feature/september-dep-updates
v10: Update JS dependencies
2022-09-16 15:06:13 +02:00
Jacob Overgaard ad1c945bb1 update npm packages
@microsoft/signalr: 6.0.9
ace editor: 1.10.1
clipboard: 2.0.11
jquery: 3.6.1
jquery-ui: 1.13.2
moment.js: 2.29.4
nouislider: 15.6.1
underscore: 13.13.4
wicg-inert: 3.1.2

dev updates: karma, jasmine, less and postcss
2022-09-16 14:04:23 +02:00
Bjarne FyrstenborgandGitHub eddf0ad61e Only show table when any filtered result (#12993)
* Only show table when any filtered result

* Show table when any filtered dictionary items
2022-09-16 02:45:10 +02:00
patrickdemooij9andGitHub 6d27454ed2 Added nullable helper for IfNullOrWhiteSpace (#12979)
* Added nullable helper for IfNullOrWhiteSpace

* Remove for str as that one could be an empty string
2022-09-16 01:14:23 +02:00
Erik-Jan WestendorpandGitHub b84ccea96f Add label-key to prevent cleanup button (#12990)
* Add label-key

* Translate 'historyCleanupEnableCleanup' to Dutch

* Add 'historyCleanupEnableCleanup' to en_us.xml
2022-09-14 13:36:36 +02:00
Kenn JacobsenandGitHub e9883ea063 Add custom PrependBasePathFileProvider to handle media files with special characters (#12936) 2022-09-13 09:11:46 +02:00
MoleandGitHub a356cf4f40 Backoffice api: Refactor controllers (#12934)
* Refactor install controller

* Removed unused InstallationTypeTarget

* Add ApiVersion to controllers

* Refactor upgrade controller

* Add missing RequireRuntimeLevelAttribute
2022-09-13 08:04:45 +02:00
Nikolaj GeisleandGitHub 09e2b04f91 V10: Update examine dependency (#12982)
* Update Examine.Lucene to newest version

* Update other projects
2022-09-12 18:48:30 +02:00
Bjarke Berg 74c45ee60d Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs
#	src/Umbraco.Core/Models/Mapping/DictionaryMapDefinition.cs
#	src/Umbraco.Web.BackOffice/Install/InstallApiController.cs
#	version.json
2022-09-12 16:47:20 +02:00
Anders BjernerandGitHub 902f126e6b Added support for virtual backoffice icons (#12833) 2022-09-09 12:50:21 +02:00
CyberReiterandGitHub 4df012e8e9 Skip move logic if the parent is staying the same (#12937)
* v10/feature/skip-move-logic: add logic to skip move logic when parentId would be the same as before

* v10/feature/skip-move-logic: remove unnecessary checks

* remove check for mediaservice as there is already one in place

* remove unnecessary using

* added parent checks for dictionary items

* changing behaviour for contenttypes, datatypes and mediatypes to show errors on move
2022-09-09 03:06:50 +02:00
Matthew CareandMichael Latouche 1bd0a1f86d Set the first app to active if no active apps
Add support for a block list item which only contains settings
2022-09-09 02:13:30 +02:00
ChadandGitHub fdc1b02b4f Fix Nucache rebuilding more type caches than necessary (#12785) 2022-09-08 13:17:54 +02:00
nikolajlauridsen d5be2fb89c Merge branch 'release/10.2.0' into v10/dev
# Conflicts:
#	version.json
2022-09-08 10:34:53 +02:00
Sebastiaan Janssen 5f42cf0cf7 Revert "Replace uppercase chars to make behaviour consistent"
This reverts commit 68cf801689.
2022-09-08 09:47:00 +02:00
Bjarne FyrstenborgandSebastiaan Janssen 68ff7b234d Replace uppercase chars to make behaviour consistent
(cherry picked from commit 68cf801689)

# Conflicts:
#	src/Umbraco.Core/Extensions/RequestHandlerSettingsExtension.cs
2022-09-08 09:44:53 +02:00
nikolajlauridsen ae516b28db Ensure new projects use the correct apssettings key for AllowEditInvariantFromNonDefault 2022-09-08 08:46:01 +02:00
Mole 4683c4a073 Hotfix: Move allow edit invariant from non default setting to content settings (#12960)
* Use ContentSettings instead of SecuritySettings for AllowEditInvariantFromNonDefault

* Make it backwards compatible
2022-09-07 14:47:20 +02:00
Nikolaj 4acabfae79 Merge remote-tracking branch 'origin/release/10.2.0' into release/10.2.0 2022-09-07 14:45:15 +02:00
Nikolaj 5bb38b39c9 Undo breaking change 2022-09-07 14:44:47 +02:00
82934838cc Extend error message with possible solution (#12962)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-09-07 14:43:26 +02:00
MoleandGitHub 3846c75cc6 Hotfix: Move allow edit invariant from non default setting to content settings (#12960)
* Use ContentSettings instead of SecuritySettings for AllowEditInvariantFromNonDefault

* Make it backwards compatible
2022-09-07 14:38:54 +02:00
Sebastiaan Janssen 2ad6633d47 Fix tree root font being larger than it used to be 2022-09-07 14:08:33 +02:00
Bjarke Berg da24ae9180 Fixed InstallAuthorizeAttribute and simplified other things 2022-09-07 11:37:58 +02:00
Nikolaj d038f860bd Bump version 2022-09-07 09:20:08 +02:00
Nikolaj a83bb2f767 Bump version to non-rc 2022-09-07 09:19:22 +02:00
Bjarke BergandNikolaj e09dc75e4f Limit what API does when not in used in Install level 2022-09-07 09:18:46 +02:00
Nikolaj d8fafcfeeb Merge remote-tracking branch 'origin/release/10.1.1' into v10/dev
# Conflicts:
#	version.json
2022-09-07 09:17:07 +02:00
Erik-Jan WestendorpandGitHub a0d673262c Translate content apps to spanish (#12950)
* Add apps area to Spanish language file

* Translate apps
2022-09-06 16:10:09 +02:00
9a2ead4381 Add PagedViewModel (#12955)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-09-06 14:07:47 +02:00
Bjarke Berg 7b00c0d3e9 Limit what API does when not in used in Install level 2022-09-05 21:12:41 +02:00
Bjarke Berg 67dbc6af26 Bump Version 2022-09-05 21:05:59 +02:00
Mayur DandGitHub 1f5d58b1a9 Fix: Media Picker creates duplicated folders (#12918) (#12948)
* fix: Media Picker creates duplicated folders (#12918)

* Fix: Media section multiple content creation (#12918)
2022-09-05 02:17:46 +02:00
AlexandMichael Latouche df3777f976 Update add-issues-to-review-project.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-05 01:45:07 +02:00
Erik-Jan WestendorpandMichael Latouche 7bb5fbf268 Translate languages area 2022-09-04 04:33:08 +02:00
Bjarne FyrstenborgandGitHub 8f4d8d60b0 Use SVG logo in installer/upgrader (#12922)
* Use SVG logo in upgrader

* Adjust logo in app header and boot failed as well

* Remove width and height from CSS

* Update sizes

* Set image size

* Disable draggable of logo
2022-09-02 15:28:39 +02:00
89d1d7cd9c Use staticserviceprovider to provide service (#12939)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-09-02 14:20:02 +02:00
Sebastiaan JanssenandGitHub 17d72f9436 Update 01_bug_report.yml 2022-09-02 09:33:09 +02:00
MoleandGitHub 9cf7e965a9 Backoffice Api: Server Controller (#12932)
* Add initial implementation using 1 controller pr. action

* Add OpenApiTag attribute

Otherwise the endpoints won't be grouped correctly

* Use correct response type

* Move ApiVersion to endpoint controllers

* Add ServerController suffix to endpoint controllers
2022-09-01 14:01:49 +02:00
Jacob Overgaard dc709c20ce remove styling from installer (#12923)
This styling is now being imported from components/umb-range-slider.less and is no longer needed here

Previously fixed in 52672d2c2b

Ref https://github.com/umbraco/Umbraco-CMS/pull/12807/files/52672d2c2ba046f1da431388ec95b21b30965f08#r957799952
2022-08-31 13:32:40 +02:00
Jacob OvergaardandGitHub 87ced87ddd remove styling from installer (#12923)
This styling is now being imported from components/umb-range-slider.less and is no longer needed here

Previously fixed in 52672d2c2b

Ref https://github.com/umbraco/Umbraco-CMS/pull/12807/files/52672d2c2ba046f1da431388ec95b21b30965f08#r957799952
2022-08-31 13:30:40 +02:00
Nikolaj GeisleandGitHub 2cef243056 Add virtual SetUpTestConfiguration method (#12928) 2022-08-31 13:24:16 +02:00
Kenn JacobsenandGitHub 44122c6509 Performance improvement: Reusable data editors (#12921)
* Introduce opt-in option for reusable data editors

* Verified RTE as reusable

* Make attribute property naming more explicit + update comments

* Test file upload and image cropper

* Add unit tests
2022-08-31 11:03:34 +02:00
Erik-Jan WestendorpandMichael Latouche 5f4f16957f Translate 'settingsGroup' treeHeader to Spanish 2022-08-30 19:09:56 +02:00
neilnaveenandMichael Latouche fcd1c22bf8 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2022-08-30 18:52:08 +02:00
Sebastiaan Janssen 5fc6fa58c0 Revert "Break word for limited width content"
This reverts commit 448836ee2d.

(cherry picked from commit 07fba1eb84)
2022-08-30 13:23:44 +02:00
Sebastiaan Janssen 07fba1eb84 Revert "Break word for limited width content"
This reverts commit 448836ee2d.
2022-08-30 13:23:15 +02:00
Mayur DandSebastiaan Janssen de0294d163 Fix #12770 (#12865)
* change "umbraco" to "Umbraco" in translation files.

* Replace "<i>" and "<b>" tag with "<em>" and "<strong>"

(cherry picked from commit fa8bb3f1da)
2022-08-29 13:26:20 +02:00
Sebastiaan Janssen 9bd6500bc7 Grammar (do -> does) and some extra text 2022-08-29 13:23:49 +02:00
MoleandGitHub 748fb7d1f7 Implement new backoffice installer (#12790)
* Add new BackOfficeApi project

* Add swagger

* Add and route new install controller

* Add new install steps

* Add Setup endpoint

* Add missing RequiresExecution methods

* Fix nullability of databasemodel

* Move user information to separate model

* Remove ping method

* Add view models install data

* Move mapping folder

* Move ViewModels

* Add settings endpoint

* Remove unused binderprovider

* Postfix RequiresExecution with async

* Update NewDatabaseUpgradeStep to not depend on install step

* Add installstep collection

* Move registration into backoffice project

* Add InstallService

* Use service in controller

* Add upgrade to install service and use in controller

* Correctly check is database is configured

* Reorganize

* Reorganize into new core and infrastructure

* Rename steps

* Rename BackofficeApi to MangementApi

* Make install step an interface instead of abstract class

* Rename InstallStep to create CreateUserStep

* Move restart runtime and sign in user into install steps

* Move install service into new core project

* Map controllers in composer

* Restrict access to installcontroller based on runtime level

* Use FireAndForget when logging install

* Use actionresult instead of iactionresult

* Set new projects as not packable

* Link to backoffice in 201 response when installed

* Register installations

* Add custom backoffice routing template token

* Move umbraco path trimming out of application convention

* Make it easier to route to backoffice api

* Make swagger version aware and move behind backoffice path

* Obsolete old install classes

* Move maps into single file

This is all mappint to/from viewmodels in some manner

* Remove usage of InstallSetupResult

* Move new projects to the src folder

* Remove InstallationType from IInstallStep

This upgrade steps should implement their own IUpgradeStep interface

* Remove upgrade from service and controller

This should be its own service and controller

* Add xml docs

* Remove internals visible to

* Disable package validation for new projects

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

* Add ValidateDatabase endpoint

* Remove project references to new backoffice

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

* Obsolete installationtype

* Add DatabaseSettingsFactory tests

* Add InstallServiceTests

* Fix InstallServiceTests

* Test RequireRuntimeLevelAttribute

* Implement new backoffice upgrader (#12818)

* Add UpgradeSettingsModel and viewmodel

* Add upgrade/settings endpoint

* Implement upgrade steps

* Add upgrade step collection

* Add UpgradeService

* Add authorize endpoint to UpgradeController

* Fix interface

* Add upgrade service tests

* Remove runtime check in databaseinstallstep

* Move RequireRuntimeLevel to controller

* Add a readme to the new backoffice part

* BackOffice not Backoffice

* Add conditional project references

* Fixes based on review

* Fix up

* Move running of steps into its own method in UpgradeService

* Make services transient

* More fixup

* Log exceptions when running steps
2022-08-29 09:50:48 +02:00
Bjarke Berg aaa0b38701 Merge remote-tracking branch 'origin/release/10.2.0' into v10/dev 2022-08-29 08:26:58 +02:00
Bjarne FyrstenborgandMichael Latouche 68cf801689 Replace uppercase chars to make behaviour consistent 2022-08-27 02:23:26 +02:00
a105b3b770 v10: make block editors supports stateful label expressions (#12909)
* mark ncNodeName as stateful allowing it to update the node name asynchronously and implement several checks for caching and fallthroughs

* ensure that the blocklist block component watches and updates stuff on the blockObject

* add $interpolate to the blockList Property Editor to interpolate the label with the saved state

* replace static label with the blockHtmlCompile directive to ensure labels are updated dynamically

* add failsafe in case block is not instantiated

* replace manual udi separation with the parse function from the udiParser service

* simplify watching, to avoid overwritting data object.

* virtual block label rendering

* destroy label scope

* add extra information for label doc

* revert previously used functions and add deprecation notices to them

* remove getBlockLabel, as it's not being used or publicly available.

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-08-26 15:09:34 +02:00
Ronald Barendse 6dab24265a Fix duplicate Directory.Build.props import 2022-08-26 09:19:55 +02:00
Ronald Barendse 143fbef3d7 Use .NET 7.x in CodeQL build 2022-08-26 09:18:17 +02:00
Anders BjernerandMichael Latouche 47f77b60a6 Added support for disabling tabs in <umbTabsNav /> elements 2022-08-26 03:26:23 +02:00
Erik-Jan WestendorpandGitHub b55f50c34a Translate TreeHeaders to Spanish (#12902)
* Translate 'logViewer' to Spanish

* Translate 'relationTypes' to Spanish
2022-08-26 02:30:34 +02:00
Kenn JacobsenandBjarke Berg 785c4440f3 Fix memory leaks (#12900)
* Fix leak for PublicAccessEntry

* Fix memory leak for PropertyTypeCollection

* Don't clone the lazy property group ID when caching property types, it is explicitly assigned at runtime

(cherry picked from commit 10b8f63052)
2022-08-25 15:31:36 +02:00
Kenn JacobsenandGitHub 10b8f63052 Fix memory leaks (#12900)
* Fix leak for PublicAccessEntry

* Fix memory leak for PropertyTypeCollection

* Don't clone the lazy property group ID when caching property types, it is explicitly assigned at runtime
2022-08-25 15:30:56 +02:00
Bjarke BergandGitHub 8f6e28e0ad Fixed issue with saving member groups, that was not persisted, if only the member groups was changed. (#12905) 2022-08-25 12:31:10 +02:00
Andreas ZerbstandGitHub 4478f27a83 Merge pull request #12889 from umbraco/v10/feature/new-media-tests
Added new media tests
2022-08-25 09:10:43 +02:00
Zeegaan a5237def31 Update umbraco-cypress-testhelpers version 2022-08-25 08:19:36 +02:00
Daniël KnippersandMichael Latouche 62423143bd Update appsettings-schema: remove {Member,User}Password from Umbraco:CMS
They are located in Umbraco:CMS:Security and are read from that location.
Setting any values in Umbraco:CMS does not actually work but
intellisense shows up so the user thinks it will work.
2022-08-25 01:19:43 +02:00
Mikael LindemannandGitHub 0f3feb1773 #12802 Fix partial view model type replacements (#12831) 2022-08-25 00:47:43 +02:00
bfbc2abca8 V10/bugfix/variant permissions segments (#12890)
* Remove null check from MapperContext.SetCulture and .SetSegment

We need to be able to set these to null, since null = invariant / default segment

* show segment label on property

* Add ContentVariation to ContentPropertyDisplay

* Add ContentVariation to DocumentTypeDisplay

* Change variations to be on ContentTypeBasic.cs

* don't cache value

* show correct label and unlock text for culture and segment variations

* make lock overlay take up less space

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-08-24 16:19:38 +02:00
439878883a V10/bugfix/variant permissions segments (#12890)
* Remove null check from MapperContext.SetCulture and .SetSegment

We need to be able to set these to null, since null = invariant / default segment

* show segment label on property

* Add ContentVariation to ContentPropertyDisplay

* Add ContentVariation to DocumentTypeDisplay

* Change variations to be on ContentTypeBasic.cs

* don't cache value

* show correct label and unlock text for culture and segment variations

* make lock overlay take up less space

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-08-24 16:18:40 +02:00
2431a21de1 V10/bugfix/variant permissions segments (#12890)
* Remove null check from MapperContext.SetCulture and .SetSegment

We need to be able to set these to null, since null = invariant / default segment

* show segment label on property

* Add ContentVariation to ContentPropertyDisplay

* Add ContentVariation to DocumentTypeDisplay

* Change variations to be on ContentTypeBasic.cs

* don't cache value

* show correct label and unlock text for culture and segment variations

* make lock overlay take up less space

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-08-24 16:17:56 +02:00
Zeegaan f8e3a77237 Update to version 71 2022-08-24 14:04:34 +02:00
Bjarke Berg 026ece2132 Merge remote-tracking branch 'origin/v10/dev' into release/10.2.0 2022-08-24 13:59:03 +02:00
Mads RasmussenandBjarke Berg b4f2de79b8 Bugfix: Variant permission languages needs a clear cache to work fully for current user (#12875)
* emit event when user group is saved

* clear current user cache when languages and user groups are saved

(cherry picked from commit 128dd42b47)
2022-08-24 13:53:28 +02:00
Mads RasmussenandGitHub 128dd42b47 Bugfix: Variant permission languages needs a clear cache to work fully for current user (#12875)
* emit event when user group is saved

* clear current user cache when languages and user groups are saved
2022-08-24 13:52:39 +02:00
Zeegaan bd40575c32 Added new media tests 2022-08-24 12:29:23 +02:00
Sebastiaan Janssen 38f144fa08 Merge branch 'v10/dev' into v10/contrib 2022-08-23 16:44:12 +02:00
Mole e7d6b9ef7a Add ClaimsPrincipalFactory and ensure that claims are flowed from the MemberIdentityUser (#12877) 2022-08-23 14:17:44 +02:00
Warren BuckleyandGitHub 523aa6c12e V10 Fixup GitHub CodeSpaces / VSCode Remote Container (#12882)
* Remove SQL Server part of the CodeSpace - we have SQLite to use

* Update to use .NET 6 and simplified docker stuff

https://github.com/microsoft/vscode-dev-containers/

* Need to set the SQLite Connection string env variable

* Path to SLN has changed to the root of the repo

* Fix up launch and VSCode tasks
2022-08-23 14:12:45 +02:00
MoleandGitHub f3a1c89066 Add ClaimsPrincipalFactory and ensure that claims are flowed from the MemberIdentityUser (#12877) 2022-08-23 14:12:05 +02:00
1b5225f4cd V11/feature/update to dotnet 7 (#12712)
* Update projects to .NET 7

* Fix nullability errors

* Fix up pipelines to run 7.0

* Update langversion to preview

* Revert "Fix up pipelines to run 7.0"

This reverts commit d0fa8d01b8.

* Fix up pipelines again, this time without indentation changes

* Include preview versions

* Versions not Version

* Fix ModelTypeTests

* Fix MemberPasswordHasherTests

Microsoft wants to use SHA512 instead of SHA256, so our old hashes will return SuccessRehashNeeded now

* Use dotnet cli instead of nuget restore

* Update src/Umbraco.Web.UI/Umbraco.Web.UI.csproj

* Update dependencies

* Fix nullability issues

* Fix unit test

* Fix nullability in ChangingPasswordModel

OldPassword can be null, if we're changing the password with password reset enabled. Additionally, we might as well use the new required keyword instead of supressing null.

* Use required keyword instead of supressing null

* Fix up pipelines again

* fix up spelling-error

* Use dotnet cli instead of nuget restore

* Fix up another NuGet command

* Use dotnet version 7 before building

* Include preview versions

* Remove condition

* Use dotnet 7 before running powershell script

* Update templates to .net 7

* Download version 7 before running linux container

* Move use dotnet 7 even earlier in E2E process

* Remove dotnet 7

* Reintroduce .NET 7 task

* Update linux docker container and remove dotnet 7 from yml

* Fix up dockerfile with ARG

* Fix up docker file with nightly builds of dotnet 7

* Reintroduce dotnet 7 so windows can use it

* Use aspnet 7 in docker

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-08-23 11:31:05 +02:00
b6e0e2df56 Content modal heading fix (#12797) (#12880)
* Fixes to modal and group headings

* updated modal headings for h1 and h2

* Updated line-height

Changed line-height: 0 to line-height: 1.3 and added margin: 0

Co-authored-by: Tiffany Prosser <tiffany.prosser1@gmail.com>
2022-08-23 11:06:29 +02:00
7e7658314c Content modal heading fix (#12797) (#12880)
* Fixes to modal and group headings

* updated modal headings for h1 and h2

* Updated line-height

Changed line-height: 0 to line-height: 1.3 and added margin: 0

Co-authored-by: Tiffany Prosser <tiffany.prosser1@gmail.com>
2022-08-23 10:51:45 +02:00
nikolajlauridsen ea2ecab238 Add RC to version 2022-08-23 09:52:42 +02:00
Mayur DandGitHub fa8bb3f1da Fix #12770 (#12865)
* change "umbraco" to "Umbraco" in translation files.

* Replace "<i>" and "<b>" tag with "<em>" and "<strong>"
2022-08-23 00:31:49 +02:00
Bjarke BergandGitHub d96c9a77cf Better exception message when using ALTER TABLE and SQLite (#12848)
* Added NotSupportedException when using Alter Table and SQLite. This is considered better than the underlying sql error.

* use Environment.NewLine
2022-08-22 15:48:17 +02:00
MoleandGitHub f8e20a9db9 V10: Fix foreign key constraints when using external login provider for members (#12872)
* Move role saving out of UpdateMemberProperties

* Add missing delete clauses

* Fix token for users too

* Fix deleting user
2022-08-22 15:18:12 +02:00
Bjarke BergandGitHub d63e7277cb Merge pull request #12871 from umbraco/v10/bugfix/fix-assertion-in-tabs-acceptance-tests
Fix assertion in tabs acceptance tests
2022-08-22 10:16:59 +02:00
Zeegaan 73a56d2fe5 Fix up assertions 2022-08-22 09:45:55 +02:00
Kenn JacobsenandGitHub 264a1565ca Make the error message friendlier when attempting to use unsupported sorting in listviews (#12846)
* Make the error message friendlier when attempting to use unsupported sorting in listviews

* Revert automatic code formatting

* Review changes
2022-08-22 09:29:24 +02:00
Bjarke Berg 610059919c Merge remote-tracking branch 'origin/v10/dev' into v10/dev 2022-08-22 08:14:20 +02:00
Bjarke Berg 72d3e6f17e Fix version of nightly builds 2022-08-22 08:14:11 +02:00
Ronald BarendseandGitHub 1ac68f8e4c Merge pull request #12863 from umbraco/feature/codeqlv2
Upgrade CodeQL from v1 to v2
2022-08-19 15:16:04 +02:00
Bjarne FyrstenborgandGitHub 753cf35d6b Use umb-icon component in tracked references to support custom SVG icons (#12766) 2022-08-19 15:07:55 +02:00
Bjarne FyrstenborgandGitHub 1024b26cec Fix umb-range-slider merging overlapping tooltips (#12777)
* Formatting CSS using Less syntax

* Fix merging overlapping tooltips from noUiSlider v15.5.0+
2022-08-19 15:03:56 +02:00
Jacob Overgaard 173c231859 upgrade setup-dotnet to v2 2022-08-19 14:36:19 +02:00
Jacob Overgaard c7813aa354 upgrade codeql tasks to v2 2022-08-19 14:35:43 +02:00
Jacob Overgaard c4c27ec72b add GITHUB_TOKEN restrictive permissions 2022-08-19 14:35:21 +02:00
Jacob OvergaardandGitHub 65c828390c CodeQL should not scan compiled assets (#12861)
* add the Umbraco.Cms.StaticAssets folder to ignored paths for the codeql scanner

* exclude only the 'wwwroot' folder since other assets could be valid to scan
2022-08-19 11:10:45 +02:00
patrickdemooij9andGitHub 56e282946f Added copy functionality for data types (#11867)
* Added copy functionality for data types

* Fix errors

* Add logic to default interface

* PR Feedback

* PR feedback

* Fix error
2022-08-19 10:19:36 +02:00
Tiffany ProsserandGitHub f33b724c8e Content modal heading fix (#12797)
* Fixes to modal and group headings

* updated modal headings for h1 and h2

* Updated line-height

Changed line-height: 0 to line-height: 1.3 and added margin: 0
2022-08-19 01:56:56 +02:00
Bjarke Berg 100ebf5c7f Update version and disable package validation for now 2022-08-18 14:53:52 +02:00
Bjarke Berg 4f4bdba214 Revert "Revert breaking changes"
This reverts commit ac4fb6acf1.
2022-08-18 14:40:11 +02:00
Bjarke Berg e9f9b8aee1 merge v10 to v11 2022-08-18 14:38:49 +02:00
Bjarke Berg ac4fb6acf1 Revert breaking changes 2022-08-18 12:41:06 +02:00
Sebastiaan Janssen 26d83381f2 Merge branch 'v10/contrib' into v10/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/installer/steps/user.html
#	src/Umbraco.Web.UI.Client/src/less/installer.less
2022-08-18 11:23:08 +02:00
Sebastiaan Janssen ee3ad8bdfb Revert "Issue 12709: fixed issue with reloading of dashboard tabs. (#12730)"
This reverts commit 21e5de462d.
2022-08-18 10:23:09 +02:00
Tobias MønsterandGitHub c8522b9b81 Makes active pip text darker to contrast with non-active pips (#12807)
* Makes active pip text darker to contrast with non-active pips

* Adds active class to slider component and updates functionality to accommodate multiple pips

* Update umbrangeslider.directive.js

* Adds click handler,accommodates decimal values and moves styles to single file
2022-08-18 09:06:04 +02:00
Bjarke BergandGitHub e956efa7f9 Merge pull request #12856 from umbraco/v10/bugfix/external_login_token_table
V10: Fix external login token table
2022-08-17 16:53:17 +02:00
Nikolaj 838f4199c8 Only recreate token if it has changed. 2022-08-17 14:36:09 +02:00
MoleandGitHub 5c09af11dc Clean solution file (#12830)
* Remove docs folder

* Re-add docfx files

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

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

* Add version.json to the solution file
2022-08-17 13:08:07 +02:00
Nikolaj e2f5c93528 Ensure that LoginTokens gets marked as dirty
Might want to experiment with only removing/updating if the value is different
2022-08-16 15:47:01 +02:00
Kenn JacobsenandGitHub 61f8007c6b Only expose server vars for password policy rules and max file size for authenticated users (#12839)
* Only expose server vars for password policy rules and max file size for authenticated users

* Fix min password length for reset password flow
2022-08-16 10:10:51 +02:00
Kenn JacobsenandGitHub de73ba7256 Fix JS error when clicking a reset password link twice (#12845) 2022-08-16 09:29:52 +02:00
Warren BuckleyandGitHub 2f5759dba2 Display package version in Installed Packages (#12784)
* Adds the package version from Package Manifest - (JSON or ManifestFilter C#)

Used to see what version of a package installed & make package devs aware that they can set this, as we use this in the package telemetry service

* Prefix with word Version for cases where 'Unknown' is displayed
2022-08-15 11:29:41 +02:00
Andy ButlandandGitHub 98c9124735 Refactored logic for calculating the first run time for a recurring hosted service. (#12828)
* Refactors the logic for calculating the first run time for a recurring task for easier re-use by similar hostservices.

* Renamed method to match wider usage.
2022-08-12 10:14:15 +01:00
Johannes LantzandGitHub f43912722b Added dictionary filter by name (#12765)
* Added dictionary filter by name

* Added en translation for no filter dictionaries

* Removed inital table sort of dicionary items
2022-08-12 01:12:13 +02:00
c7501bd47b Fix broken rollback feature (#12808)
Co-authored-by: kjac <kja@umbraco.dk>
2022-08-10 08:45:05 +02:00
Bjarke BergandGitHub 00ffe7a6b3 Only expose the filename when uploading content types (#12813) 2022-08-09 16:27:46 +02:00
Lucas Bach BisgaardandMichael Latouche 1b3ccf8521 Add attr directive that lock the focus inside the modal 2022-08-07 23:29:08 +02:00
Bjarke Berg 274e7c5302 Use user key as alias instead of username 2022-08-05 10:48:45 +02:00
Warren BuckleyandGitHub faf4320eb5 Add new UmbracoBuiilder extension methods to discover and set an IUmbracoTreeSearcherFields (#12751) 2022-08-04 11:21:36 +02:00
Bjarke BergandGitHub 99dfeddf97 Replaced usage of new Random().Next(..) with RandomNumberGenerator.GetInt32 (#12759) 2022-08-04 10:26:51 +02:00
Mads RasmussenandGitHub 8802b58849 Merge pull request #12605 from umbraco/v10/feature/variant-permissions
Feature: Variant Permissions (Readonly access)
2022-08-03 14:15:49 +02:00
Nikolaj e1affc5e6c Fix version 2022-08-03 13:48:20 +02:00
Nikolaj 1697f0b680 Merge branch 'release/10.1.0' into v10/dev
# Conflicts:
#	version.json
2022-08-03 13:45:48 +02:00
Bjarke Berg c52e8c5e81 Changed so new projects by default has AllowEditInvariantFromNonDefault as true 2022-08-03 12:54:37 +02:00
Mads Rasmussen 6061fda8b4 disable "Remove All" property action for users with readonly access 2022-08-03 12:23:06 +02:00
Mads Rasmussen 31279b96cf Merge branch 'v10/dev' into v10/feature/variant-permissions 2022-08-03 11:22:35 +02:00
MoleandGitHub 3972538fd5 Fix docfx generation (#12775)
* Fix some XML docs

* Re add unused using in SqlSyntaxProviderBase to magically fix docfx

I have no idea why this works, but it does

* Fix nullref exception
2022-08-03 11:00:30 +02:00
Nikolaj 0c8e22d29d Revert "edit pipelines for release"
This reverts commit 920e952e6a.
2022-08-03 10:45:11 +02:00
Nikolaj 866ed01b58 Bump version 2022-08-03 10:14:12 +02:00
Ambert van UnenandMichael Latouche 961e0a4f7b Added translation 2022-08-03 00:19:45 +02:00
Ronald Barendse 8077f45f0f Keep CopyRazorGenerateFilesToPublishDirectory and update comments 2022-08-02 17:19:09 +02:00
Ronald Barendse c5654f0311 Keep CopyRazorGenerateFilesToPublishDirectory and update comments 2022-08-02 16:50:52 +02:00
Ronald BarendseandGitHub eae7d7919c Merge pull request #12769 from umbraco/v10/feature/packagevalidation
Enable package validation
2022-08-02 14:10:45 +02:00
Bjarke Berg 47c1f7b22b Added CompatibilitySuppressions.xml to Examine.Lucene project 2022-08-02 13:39:21 +02:00
Bjarke Berg 4f4c06a242 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/packagevalidation 2022-08-02 13:11:57 +02:00
Bjarke Berg c1dc95ef92 Merge remote-tracking branch 'origin/release/10.1.0' into v10/dev 2022-08-02 13:10:56 +02:00
Bjarke Berg 6ce91eff4e Unbreak breaking changes 2022-08-02 13:10:20 +02:00
Bjarke Berg e5cbd15a7e Do not allow update translations on languages you do not have access to. 2022-08-02 12:50:18 +02:00
Bjarke BergandSebastiaan Janssen 636ee831a4 Force the allowed avatar image types. We do not want to use the Umbraco:Cms:Content:Imaging:ImageFileTypes as this could very well be different for content.
(cherry picked from commit 6ce9ea4950)
2022-08-02 12:41:27 +02:00
Jacob OvergaardandGitHub 75a4044f12 V10: Show more telemetry info on the installer (#12739)
* remove absolute-center class from installer and replace with css grid

* replace tooltips for telemetry with columns and a direct view of what eact telemetry level means

* ensure that inputs will out entire columns and that buttons are aligned as the rest of the system with the CTA on the right side

* update buttons on the database screen to match the user screen

* set min-width on installer for views with only text content

* add border to preconfigured database field

* remove extra headline from telemetry data info text

* change telemetry info text to 'small'

* remove opacity for database settings

* update wording of intro text to the installer

* add unordered list to the detailed telemetry description

* add helper text to indicate that telemetry can be changed later

* change wording from 'analytics' to 'telemetry data'

* add smooth-steps-tap to noUiSlider for telemetry data

* add short text explaining what telemetry is to the installer
2022-08-02 12:32:57 +02:00
Ronald Barendse 30210f5de5 Enable package validation 2022-08-02 12:02:46 +02:00
Mads Rasmussen 30c37ea0f4 Set a dictionary item translation to read-only if the user doesn't have permission to update the language 2022-08-02 11:17:18 +02:00
Bjarke BergandSebastiaan Janssen 6ce9ea4950 Force the allowed avatar image types. We do not want to use the Umbraco:Cms:Content:Imaging:ImageFileTypes as this could very well be different for content. 2022-08-02 11:16:42 +02:00
Bjarke Berg c73cb30c58 Added allowedLanguagesIds to UserDetail 2022-08-01 14:57:25 +02:00
Nikolaj GeisleandGitHub 19b2dee76a change "All sections" to "No sections" (#12708) 2022-07-27 09:31:38 +02:00
Mykyta ZakharovandGitHub 21e5de462d Issue 12709: fixed issue with reloading of dashboard tabs. (#12730)
* Issue 12709: fixed issue with reloading of dashboard tabs.

* Issue-12709: fixed issue with coreBuild.
2022-07-27 00:49:51 +02:00
Jacob OvergaardandSebastiaan Janssen abee27a99f fix: ensure the input field to edit tabs is only shown when active
This fix prevents Firefox (and possibly others) from preventing the click event, which now bubbles up as it should.
2022-07-26 14:35:44 +02:00
Matthew CareandGitHub 9ae0d0507a Adjust label styles to allow wrapping (#12610)
* Prevent asterix having its own line

With certain label lengths the * would end up on its own line
Adjusting width of group builder labels / descriptions to be in line with the width of the content labels
Adjusting the margins / padding which looked out of place

* Single line html

Change html to be on one line due to white-space css properties requiring such

* Label on top

Fix the width of labels when the label is on top

* Add spacing

Add spacing to control groups to account for the removed padding from labels

* Labels on tablet

Fix label width on tablet screen size
2022-07-26 14:01:21 +02:00
Sebastiaan Janssen b9393c655f Merge branch 'v10/dev' into v10/contrib 2022-07-26 10:26:02 +02:00
MigaroezandNathan Woulfe 63ad03f78e #12576 Responsive CSS fixes for packages on very small screens 2022-07-26 17:45:45 +10:00
Sebastiaan JanssenandNikolaj Geisle 3baae5ab53 Check if content has an identity before attempting to get it's ancestors (#12733)
* Check if content has an identity before attempting to get it's ancestors

* Check if we even need to go to the parent

* Fail earlier

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

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

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-07-26 09:24:21 +02:00
e17a190925 Check if content has an identity before attempting to get it's ancestors (#12733)
* Check if content has an identity before attempting to get it's ancestors

* Check if we even need to go to the parent

* Fail earlier

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

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

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-07-25 18:02:40 +02:00
Nikolaj GeisleandGitHub aabb6c2665 Merge pull request #12731 from umbraco/v10/bugfix/restore-quickinstall
v10: restore one-click install
2022-07-25 12:31:49 +02:00
f0ba9c469e Fix previous conversion of SearchAll to async ignoring the SortOrder value from SearchableTree (#12595)
* Fix previous conversion of SearchAll to async ignoring the SortOrder value from SearchableTree

* small refactoring

Co-authored-by: Paul Woodland <paul.woodland@pwnewmedia.com>
Co-authored-by: Michael <michael@crossingpaths.be>
2022-07-25 12:07:56 +02:00
Jacob Overgaard 197ec2ab1b fix: restore quickinstall view in the installer with options to customize the database or skip entirely 2022-07-25 11:33:52 +02:00
b3237c498b Fix StripHtmlTagsMethod by adding Regex (#12607)
* #umbraco12400 fixing StripHtmlTagsMethod by adding Regex

* changing logic by removing .FirstChild calls

* fixing line endings

* final fix

* removing unused using

Co-authored-by: Michael Reiter <michale.reiter@cyber-solutions.at>
Co-authored-by: Michael Reiter <michael.reiter@metro-external.digital>
2022-07-24 00:53:04 +02:00
MigaroezandMichael Latouche b531fccd36 #12617 Add contentForm Dirty reset on successful save for members and media 2022-07-22 01:12:11 +02:00
4b557464c6 Fixed Group Headings in Content (#12702)
* Added secure to the UMB-XSRF-V cookie when global https is true.

* Issue 12551 search bug

Previous optimisation incorrectly filtered the index fields needed to return published results

* Update MemberRepository.cs (#12641)

Ensuring that MemberManager.ConfirmEmailAsync persists, same changes in pull request #12640 but for v9

* Fixed Group Headings in Content

Co-authored-by: Corey Philipp <CPhilipp@dewpoint.com>
Co-authored-by: Matthew Care <matty_care@hotmail.co.uk>
Co-authored-by: gilbertaoe <gilbertaoe@hotmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2022-07-21 03:07:09 +02:00
cecf24aa87 Fixed Missing H1 tag (#12695)
* Added secure to the UMB-XSRF-V cookie when global https is true.

* Issue 12551 search bug

Previous optimisation incorrectly filtered the index fields needed to return published results

* Update MemberRepository.cs (#12641)

Ensuring that MemberManager.ConfirmEmailAsync persists, same changes in pull request #12640 but for v9

* Initial Commit

Amended tree root to be h1 (previously was h5) and amended contextual modal header to be h2 (previously was h1)

Co-authored-by: Corey Philipp <CPhilipp@dewpoint.com>
Co-authored-by: Matthew Care <matty_care@hotmail.co.uk>
Co-authored-by: gilbertaoe <gilbertaoe@hotmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2022-07-21 01:46:55 +02:00
Nikolaj Geisle 9fa3b4e2ef Merge branch 'release/10.1.0' into v10/dev
# Conflicts:
#	version.json
2022-07-20 11:10:25 +02:00
Nikolaj Geisle 338bc2c19c Bumb version 2022-07-20 09:36:26 +02:00
Matt BrailsfordandNikolaj Geisle 08a7a26743 Allow dashboards to also be the "last accessed item" (#12689)
* Allow dashboards to also be the "last accessed item"

* Use tripple =
2022-07-20 09:20:41 +02:00
Ronald BarendseandNikolaj Geisle 2d217d505d Fix integration tests 2022-07-20 08:33:24 +02:00
Ronald BarendseandNikolaj Geisle d2806501d9 Fix integration test ACE Editor mock 2022-07-20 08:33:24 +02:00
Ronald BarendseandNikolaj Geisle fabb49feaf Remove template from warning message 2022-07-20 08:33:24 +02:00
Ronald BarendseandNikolaj Geisle 234552bcab Disable editing partial views and macro files 2022-07-20 08:33:23 +02:00
Ronald BarendseandNikolaj Geisle 40eae24a55 Show editor in read-only mode when using runtime mode production 2022-07-20 08:33:17 +02:00
Ronald BarendseandNikolaj Geisle 930b21f273 Fix editing template and show warning message when using runtime mode production 2022-07-20 08:33:16 +02:00
Ronald BarendseandNikolaj Geisle 9e1e9641a9 Skip saving template file when using runtime mode Production 2022-07-20 08:33:16 +02:00
Ronald BarendseandNikolaj Geisle df5d657380 Swap registration and resolving of IRuntimeModeValidator items to collection builder 2022-07-20 08:33:15 +02:00
Ronald BarendseandNikolaj Geisle e1c80ecd20 Add RuntimeModeValidators() extension method 2022-07-20 08:33:15 +02:00
Ronald BarendseandNikolaj Geisle f11d717522 Add RuntimeModeValidatorCollection and builder 2022-07-20 08:33:14 +02:00
Nikolaj Geisle c4aa718763 Revert "Update templates to .net 7"
This reverts commit 580f8acb5b.
2022-07-19 14:23:19 +02:00
Nikolaj Geisle 580f8acb5b Update templates to .net 7 2022-07-19 14:15:16 +02:00
29e8fd786d Tweaks the composition dialog in the content type editor (#12698)
* Tweaks the composition dialog in the content type editor

- removes the search field if no content types is available
- change the styling on the info text regarding missing content types
- moves the search field closer to the content type list

* fixes filter - needed vm binding, probably due to introducing ng-if and related scope trickery
tweaked css on checkbox list icon to improve alignment

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-07-19 11:35:52 +10:00
c2c87a0d72 Don't allocate new object array instances when indexing (#12710)
* Don't allocate new object array instances when indexing

There's no reason to allocate new object[] array instances for each ValueSet created for the "y" or "n" values going into the index. This just creates a single object[] for each "y" or "n" value which will save on a ton of allocations when re indexing a bunch of content.

There's an easy way to make further allocation reductions too (prob a separate PR) since there is no reason to create new object[] allocations for: CreatorId, WriterId, Level, TemplateId, Culture. Each of these can be returned from a concurrent dictionary since these values are finite and there won't be too many of each so we can just keep an internal dictionary of these object[] instances.

* fixes mistake

* Updates NoValue and YesValue field declarations - was blowing up

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-07-19 10:58:21 +10:00
Sebastiaan JanssenandGitHub 41eb412403 Create issues-first-response.yml 2022-07-18 09:48:13 +02:00
vsilvarandGitHub b27c03f001 Fixed ContentLastChanceFinder not being called for nodes without template (#12002)
This commit also ensure that the domain and culture is set before the ContentLastChanceFinder executes
2022-07-18 08:47:45 +10:00
patrickdemooij9andGitHub 8b97b04d1f Fetch all dictionary items if parentId is null (#12414)
* Fetch all if parentId is null

* PR feedback resolved

* Remove space that sneaked into the commit

* merge with PR changes
2022-07-17 23:52:18 +02:00
Ambert van UnenandMichael Latouche 50a268c70d Update textstring.cshtml 2022-07-17 01:54:18 +02:00
Chriztian SteinmeierandNathan Woulfe 8444bbce4f Update description for maxPropertyWidth
- Consistent casing for first word of descriptions
- css => CSS
- Use "override" instead of "overwrite"
2022-07-16 09:21:56 +10:00
Søren KottalandGitHub f426af1a50 Removes bottom margin from template select box in content node info (#12699) 2022-07-16 09:20:02 +10:00
Nikolaj GeisleandGitHub 78af85941f Merge pull request #12697 from umbraco/v10/feature/runtimemode-production-templates
Disable editing templates when using runtime mode Production
2022-07-15 15:06:25 +02:00
Ronald Barendse f4085efc17 Fix integration tests 2022-07-15 14:17:45 +02:00
Sebastiaan JanssenandGitHub 3e00845429 Create opened-issue-first-comment.yml 2022-07-15 12:49:49 +02:00
Ronald Barendse ae6ee5c3ad Fix integration test ACE Editor mock 2022-07-15 11:07:24 +02:00
Ronald Barendse ddfc2fa902 Remove template from warning message 2022-07-15 10:45:29 +02:00
Ronald Barendse e581fdc90a Disable editing partial views and macro files 2022-07-15 10:34:11 +02:00
Nikolaj GeisleandGitHub f0412bc38f Merge pull request #12693 from umbraco/v10/feature/runtimemodevalidatorcollection
Add RuntimeModeValidator collection builder
2022-07-15 09:40:12 +02:00
Ronald Barendse 97010c2de5 Show editor in read-only mode when using runtime mode production 2022-07-14 23:41:17 +02:00
Ronald Barendse 802f2baaa0 Fix editing template and show warning message when using runtime mode production 2022-07-14 22:48:43 +02:00
Ronald Barendse db90b16cb1 Skip saving template file when using runtime mode Production 2022-07-14 22:41:20 +02:00
Ronald Barendse 1fc64cd4ce Swap registration and resolving of IRuntimeModeValidator items to collection builder 2022-07-14 16:49:49 +02:00
Ronald Barendse 9cec603d46 Add RuntimeModeValidators() extension method 2022-07-14 16:48:52 +02:00
Ronald Barendse 93225a2c34 Add RuntimeModeValidatorCollection and builder 2022-07-14 16:48:01 +02:00
Nikolaj Geisle e92ceae7ee Bumb version 2022-07-14 11:31:24 +02:00
Nikolaj GeisleandGitHub 871bb94a41 Merge pull request #12690 from umbraco/v10/hotfix/remove-docs-dependency-from-nuget-step
edit pipelines for release
2022-07-14 10:16:05 +02:00
Nikolaj Geisle 920e952e6a edit pipelines for release 2022-07-14 10:13:55 +02:00
Bjarne FyrstenborgandGitHub dcb54c1f6e Inherit from OEmbedProviderBase in OEmbed providers (#12379)
* Use OEmbedProviderBase

* Use QueryHelpers.AddQueryString in .NET Core

* Nullable value

* Cleanup usings

* Ensure invariant string

* No need to URL encode when using QueryHelpers.AddQueryString()

* Include WebUtilities

* Cleanup usings

* Revert "Include WebUtilities"

This reverts commit 3cffb740ce.

* Revert "No need to URL encode when using QueryHelpers.AddQueryString()"

This reverts commit 70ca5306ac.

* Revert "Ensure invariant string"

This reverts commit 318ab23f6f.

* Revert "Nullable value"

This reverts commit c39911de06.

* Revert to StringBuilder

* Cleanup usings

* Add more descriptions of providers
2022-07-14 02:18:19 +02:00
sofietoftandGitHub f2ba4b1d4c Removed mention of Umbraco.tv from the Members Dashboard (#12429)
* Removed mention of Umbraco.tv from the Members Dashboard

* Add new key to en.xml

* Update membersdashboardvideos.html

* Update label used in members dashboard.
2022-07-14 00:21:10 +02:00
Matt BrailsfordandGitHub 7d4a9caf6a Allow dashboards to also be the "last accessed item" (#12689)
* Allow dashboards to also be the "last accessed item"

* Use tripple =
2022-07-13 23:08:44 +02:00
Nikolaj Geisle bd2dd3e442 bumb version 2022-07-13 15:36:56 +02:00
Nikolaj Geisle 7f020861c2 Add ActivatorUtilitiesConstructor to ctor 2022-07-13 14:19:41 +02:00
Nikolaj Geisle 66cd2145ad Reinstate old ctor and obsolete 2022-07-13 13:33:42 +02:00
Nikolaj GeisleandSebastiaan Janssen c6f1534148 Change delete action back to move 2022-07-13 13:11:30 +02:00
Nikolaj Geisle 3e464933fc delete unused static leftover from merge 2022-07-13 11:14:51 +02:00
Nikolaj Geisle b8ef3836a1 Fix formatting 2022-07-13 11:14:31 +02:00
Matthew CareandNikolaj Geisle ce568343ab Issue 12551 search bug
Previous optimisation incorrectly filtered the index fields needed to return published results
2022-07-13 11:13:35 +02:00
Nikolaj GeisleandSebastiaan Janssen af7d9db32b Add missing null-check 2022-07-13 10:14:21 +02:00
Sebastiaan Janssen f69f672b2c Merge branch 'v10/contrib' into v10/dev 2022-07-12 14:53:12 +02:00
Sebastiaan Janssen 324f4c7168 Remove accidental merge problem 2022-07-12 14:52:46 +02:00
Sebastiaan Janssen e516e3472c Merge branch 'v10/contrib' into v10/dev 2022-07-12 14:50:50 +02:00
Johan RunstenandGitHub 3778f0da7a Bump ImageSharp to latest version (#12651) 2022-07-12 14:45:40 +02:00
Nikolaj GeisleandGitHub 110d8067ad Merge pull request #12682 from umbraco/v10/contrib
Merge `v10/contrib` into `v10/dev`
2022-07-12 08:23:45 +02:00
Sebastiaan Janssen 7611ba7f73 Remove undefined param 2022-07-11 15:50:58 +02:00
Sebastiaan Janssen 885ec99cc4 Fix breaking change in MenuItemList 2022-07-11 15:43:57 +02:00
Sebastiaan Janssen 942c4b336d Fix formatting/style in DictionaryController 2022-07-11 15:43:57 +02:00
611badfce2 Revert incorrect change in Property.PublishValues (#12680)
* Revert incorrect change in Property.PublishValues

Fix incorrect change made for nullability support which changes the result of the updated expression to `false` instead of `true` when both inputs are `null`.
That is, `null?.InvariantEquals(null) ?? false` becomes `false` but in the previous version it was `true` since the `InvariantEquals` extension method simply calls `string.Equals(v1, v2)` which will return `true` when both inputs are `null`. Due to the `?` operator the `InvariantEquals` method is not called anymore and `?? false` turns the expression to `false`.

* Update PropertyValidationService.cs

Reverts incorrect update for nullability that changes a value of `true` into `false` when both operands are `null`.

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-07-11 15:41:10 +02:00
Sebastiaan Janssen e626fca243 Merge branch 'v10/dev' into v10/contrib
# Conflicts:
#	src/Umbraco.Core/Actions/ActionAssignDomain.cs
#	src/Umbraco.Core/Actions/ActionCopy.cs
#	src/Umbraco.Core/Actions/ActionCreateBlueprintFromContent.cs
#	src/Umbraco.Core/Actions/ActionDelete.cs
#	src/Umbraco.Core/Actions/ActionMove.cs
#	src/Umbraco.Core/Actions/ActionNew.cs
#	src/Umbraco.Core/Actions/ActionNotify.cs
#	src/Umbraco.Core/Actions/ActionProtect.cs
#	src/Umbraco.Core/Actions/ActionRestore.cs
#	src/Umbraco.Core/Actions/ActionRights.cs
#	src/Umbraco.Core/Actions/ActionRollback.cs
#	src/Umbraco.Core/Actions/ActionSort.cs
#	src/Umbraco.Core/Actions/ActionToPublish.cs
#	src/Umbraco.Core/Actions/ActionUnpublish.cs
#	src/Umbraco.Core/Actions/ActionUpdate.cs
#	src/Umbraco.Core/Constants-Telemetry.cs
#	src/Umbraco.Core/DependencyInjection/ServiceCollectionExtensions.cs
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.CollectionBuilders.cs
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs
#	src/Umbraco.Core/Models/Trees/ActionMenuItem.cs
#	src/Umbraco.Core/Models/Trees/CreateChildEntity.cs
#	src/Umbraco.Core/Models/Trees/ExportMember.cs
#	src/Umbraco.Core/Models/Trees/MenuItem.cs
#	src/Umbraco.Core/Models/Trees/RefreshNode.cs
#	src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs
#	src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs
#	src/Umbraco.Core/Routing/ContentFinderByRedirectUrl.cs
#	src/Umbraco.Core/Services/IFileService.cs
#	src/Umbraco.Core/Services/IRedirectUrlService.cs
#	src/Umbraco.Core/Services/RedirectUrlService.cs
#	src/Umbraco.Core/Trees/MenuItemList.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs
#	src/Umbraco.Infrastructure/Telemetry/Providers/SystemInformationTelemetryProvider.cs
#	src/Umbraco.Web.BackOffice/Controllers/CodeFileController.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/DictionaryController.cs
#	src/Umbraco.Web.BackOffice/Controllers/EntityController.cs
#	src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentBlueprintTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTreeControllerBase.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTypeTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/DataTypeTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/DictionaryTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/FileSystemTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MacrosTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MediaTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MediaTypeTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberGroupTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberTypeAndGroupTreeControllerBase.cs
#	src/Umbraco.Web.BackOffice/Trees/RelationTypeTreeController.cs
#	src/Umbraco.Web.BackOffice/Trees/TemplatesTreeController.cs
#	src/Umbraco.Web.UI.Client/src/less/navs.less
#	templates/UmbracoProject/.gitignore
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Telemetry/TelemetryServiceTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/UserDataServiceTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Telemetry/SystemInformationTelemetryProviderTests.cs
2022-07-11 15:04:46 +02:00
Nikolaj Geisle 38c42c2479 Update media picker to support readonly 2022-07-11 14:02:20 +02:00
Nikolaj Geisle 5bbb546780 Fix up UserGroup to map new property properly 2022-07-11 13:38:30 +02:00
Nikolaj Geisle bba403cf3e add hasAccessToAllLanguagus to AppendByGroup method 2022-07-11 10:44:25 +02:00
Nikolaj Geisle 0967505178 Fix up GetActions mapping 2022-07-11 10:37:25 +02:00
Nikolaj Geisle a7f04924a0 Fix up frontend to send hasAccessToAllLanguages 2022-07-11 09:37:00 +02:00
Nikolaj Geisle fccae2604f Fix unit test 2022-07-11 09:26:28 +02:00
Nikolaj Geisle 5ff31cf966 Add hasAccessToAllLanguages to user groups and map 2022-07-11 09:15:26 +02:00
Arul PrabakaranandGitHub 7c2a2996a2 Fixes alignment issue for "Saved searches" dropdown in log viewer (#12665)
* Umbraco avatar component updated to fit the image

* Fixed: Broken saved search dropdown in log viewer
2022-07-08 15:39:55 +01:00
Mads Rasmussen d3dc2bae69 remove forgotten parenthesis 2022-07-08 09:07:14 +02:00
Mads Rasmussen 87d552bebb Set form to dirty when updating user group permissions 2022-07-07 11:00:16 +02:00
Mads Rasmussen 4a1bccc58c always set readonly attr if a property can not be updated 2022-07-07 10:22:15 +02:00
Mads RasmussenandGitHub a63840a34e Merge pull request #12664 from umbraco/v10/feature/variant-permissions-unlock-dialog
show unlock dialog on all variants as long as there is more than one …
2022-07-07 10:12:36 +02:00
Mads Rasmussen 11a670bbe4 add toggle to allow access to all languages 2022-07-07 09:36:34 +02:00
Niels Lyngsø 6fcb02c602 Merge remote-tracking branch 'origin/v10/feature/variant-permissions' into v10/feature/variant-permissions-unlock-dialog
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/less/components/umb-property-editor.less

plus some extra
2022-07-06 16:16:36 +02:00
Niels Lyngsø 51c537c2c2 show property actions 2022-07-06 15:44:27 +02:00
Ronald BarendseandGitHub 4fc7f775ba Merge pull request #12663 from umbraco/v10/bugfix/fix-automoq
V10: Fix AutoMoq for unit tests
2022-07-06 15:32:48 +02:00
Zeegaan 7d6d826a4a Catch exception of UserGroup2Language database call 2022-07-06 15:24:41 +02:00
Zeegaan b2f87f66fd Fix up User repository 2022-07-06 15:08:37 +02:00
Niels Lyngsø 0daffd737e unlock overlay styling 2022-07-06 15:05:45 +02:00
Niels Lyngsø 957042d117 show unlock dialog on all variants as long as there is more than one created variant 2022-07-06 15:05:31 +02:00
nikolajlauridsen 9c5006e5c8 Remove body from obsolete constructor 2022-07-06 14:53:57 +02:00
nikolajlauridsen 6d80904280 Make InstallHelper moq greedy 2022-07-06 14:52:00 +02:00
Zeegaan 7e5fc48a67 Add new hasAccessToAllLanguages migration 2022-07-06 14:26:10 +02:00
Zeegaan 49dd2b44e3 Add hasAccessToAllLanguages column to usergroup table 2022-07-06 14:11:19 +02:00
Zeegaan 91974a69f5 Update IReadOnlyUserGroup.cs 2022-07-06 13:49:42 +02:00
Zeegaan ce6307c79a Fix up DatabaseDataCreator.cs to not give sensitive data group permission to all languages 2022-07-06 13:46:54 +02:00
Zeegaan 9e849b1635 Add HasAccessToAllLanguages property to User Groups 2022-07-06 13:45:05 +02:00
Zeegaan 93654de9c2 Update GetLanguagePermissions to pull out proper backofficeUser if possible 2022-07-06 13:33:12 +02:00
Zeegaan 35845b25e5 Obsolete ctor 2022-07-06 13:17:19 +02:00
Zeegaan 696182bf6e Update GetLanguagePermissions method 2022-07-06 13:02:33 +02:00
Zeegaan aa870a2302 Remove duplicate Contains() check 2022-07-06 12:58:00 +02:00
Zeegaan ed44c76fa0 Obsolete trycreate method 2022-07-06 12:56:29 +02:00
Zeegaan ffcda46654 insert using new namespace 2022-07-06 12:54:41 +02:00
f56ebbd7a1 Apply suggestions from code review
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-07-06 12:54:08 +02:00
Zeegaan 5770e48cc4 Make hardcoded string into const 2022-07-06 12:52:27 +02:00
Zeegaan 50e06ca596 Rename CultureImpactService.cs to CultureImpactFactory.cs 2022-07-06 12:50:52 +02:00
Zeegaan 99486339d9 Merge remote-tracking branch 'origin/v10/feature/variant-permissions' into v10/feature/variant-permissions 2022-07-06 12:48:52 +02:00
Zeegaan 49cc2bce79 Move extension method to actual interface with default implementation 2022-07-06 12:47:58 +02:00
Mads Rasmussen c1abcaabc1 add preview layer to prevent interaction with high z-index elements 2022-07-06 12:28:10 +02:00
0fe894c4f6 Fix up system information test (#12660)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-07-06 11:33:33 +02:00
cb4ec89bcf Allow only unpublish in schedule publish overlay if user has permission (#11827)
* Allow only unpublish in schedule publish overlay if user has permission

* Adjust logic to newer JS syntax

* Fix update configuration

* Delete updated property names

* Style unpublish date as disabled

* Fix css selector for new button element

* Make buttons and datepickers more consistent in invariant and variant versions of schedule overlay

* Fill half width like in invariant version of schedule overlay

* Use native includes instead

* return early from getPermissionsForContent

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-07-06 09:34:24 +10:00
Arul PrabakaranandNathan Woulfe 05d095914e Umbraco avatar component updated to fit the image 2022-07-06 08:46:12 +10:00
Ronald BarendseandGitHub b0b6081bea Read BootFailed.html file from WebRootFileProvider (#12634) 2022-07-05 15:24:53 +02:00
be38fb41ad V10: Use FireAndForget when logging install (#12658)
* Use FireAndForget when logging install

* Obsolete constructor

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-07-05 15:17:45 +02:00
22577163ba Remove context from IScopeProvider.cs (#12657)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-07-05 12:42:52 +02:00
Zeegaan c94ee7c1ec Fix up wierd formatting 2022-07-05 12:40:33 +02:00
Zeegaan ac6666e627 Fix breaking changes 2022-07-05 11:27:49 +02:00
Zeegaan fa1be5c55d Fix wrong resolve of merge-conflict 2022-07-05 08:48:07 +02:00
Zeegaan a3bcc99ed0 Fix up so manifestParser can deserialize new property "supportsReadOnly" 2022-07-05 08:41:55 +02:00
Zeegaan a572044f9e Map allowedactions 2022-07-04 15:07:59 +02:00
Zeegaan 1993424264 Merge branch 'v10/dev' into v10/feature/variant-permissions 2022-07-04 14:43:09 +02:00
f2a98309b4 Support localization for content search (backoffice) (#12618)
* Support localization for content search

* Formatting

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

* Review changes

* Review changes

Co-authored-by: kjac <kjn@impact.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-07-04 13:45:33 +02:00
Bjarke BergandGitHub af3e9bf892 Merge pull request #12645 from umbraco/v10/bugfix/language-cultureName-is-null
languageCultureName null makes umbraco explode
2022-07-04 10:23:20 +02:00
Zeegaan 56ef2d56eb Merge branch 'v10/dev' into v10/bugfix/language-cultureName-is-null 2022-07-04 08:43:08 +02:00
173c1c8c8f Add Current Server Role to system information (#12630)
* Add Current Server Rule to system information

* Update Unit Tests, Mock IServerRoleAccessor

* Add CurrentServerRole to UnitTest

* adds trailing commas

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-07-04 09:54:27 +10:00
5bb81558f8 set isInfoTab to true if active tab is info tab (#12632)
* set isInfoTab to true if active tab is info tab

* replace underscore functions with good old boring javascript

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-07-04 09:26:19 +10:00
dca4d0f167 Add runtime mode (BackofficeDevelopment, Development and Production) (#12631)
* Add runtime mode setting

* Only enable Razor runtime compilation in development modes

* Only enable ModelsBuilder generation in development modes

* Fix disabling ModelsBuilder controllers

* Add IRuntimeModeValidationService and IRuntimeModeValidator

* Add JITOptimizerValidator

* Add UmbracoApplicationUrlValidator

* Add UseHttpsValidator

* Add RuntimeMinificationValidator

* Add ModelsBuilderModeValidator

* Remove .NET 6 preview 1 fix for Razor runtime compilation

* Only allow InMemoryAuto in backoffice development mode

* Make runtime mode validators public, so they can be easily removed if required

* Add comment to highlight removing RazorCompileOnBuild, RazorCompileOnPublish and CopyRazorGenerateFilesToPublishDirectory when using ModelsMode InMemoryAuto

* Add documentation

* Update src/Umbraco.Web.Common/ModelsBuilder/NoopModelsBuilderDashboardProvider.cs

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

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-07-01 08:48:05 +02:00
Ronald Barendse 7d545a7dfc Fix test after Sqlite casing change 2022-06-30 22:52:59 +02:00
Bjarke Berg 8de95acec6 Fixed casing 2022-06-30 15:30:42 +02:00
Zeegaan 30c5068f83 Get cultureName from culture info if null 2022-06-30 15:28:06 +02:00
Matthew CareandMichael Latouche 448836ee2d Break word for limited width content
Add break word to avoid overflowing content / account for label values which are often used to store random data
2022-06-30 14:13:46 +02:00
Bjarke BergandGitHub be1fddb9be Added configuration to allow RTL cultures to opt-in to reverse the url hierarchy (#12635)
* Added configuration to allow RTL cultures to opt-in to reverse the url hierarchy.

https://github.com/umbraco/Umbraco-CMS/issues/12621

* Fixed bug.. There is difference between array.Reverse (Linq) and list.Reverse (native)

* formatting
2022-06-30 14:08:13 +02:00
gilbertaoeandMichael Latouche ccf0d3f443 Update MemberRepository.cs
Ensuring that MemberManager.ConfirmEmailAsync persists.
2022-06-30 13:47:16 +02:00
Zeegaan 5eb5cb7e2b Fix up after merge 2022-06-30 09:57:45 +02:00
Zeegaan 35549ca218 Merge branch 'release/10.0.1' into v10/dev
# Conflicts:
#	src/Umbraco.Core/Actions/ActionAssignDomain.cs
#	src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs
#	src/Umbraco.Core/Models/RelationItem.cs
#	src/Umbraco.Core/Scoping/ICoreScope.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs
#	src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
#	src/Umbraco.Infrastructure/Logging/MessageTemplates.cs
#	src/Umbraco.Infrastructure/Persistence/DbProviderFactoryCreator.cs
#	src/Umbraco.Infrastructure/Runtime/FileSystemMainDomLock.cs
#	src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs
#	src/Umbraco.Web.BackOffice/Filters/OutgoingEditorModelEventAttribute.cs
#	src/Umbraco.Web.BackOffice/Mapping/ContentMapDefinition.cs
#	tests/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Components/ComponentTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Scoping/ScopedNotificationPublisherTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Scoping/ScopeUnitTests.cs
#	version.json
2022-06-30 09:48:24 +02:00
Zeegaan fd0c4fda54 bumb version 2022-06-30 08:34:58 +02:00
Bjarke BergandGitHub 62eeb42004 Changed const to return "Microsoft.Data.Sqlite" instead of "Microsoft.Data.SQLite" and made our checks case insensitive where possible. Sadly DbProviderFactories is still case sensative so for that we support both strings. (#12639)
https://github.com/umbraco/Umbraco-CMS/issues/12604
2022-06-29 16:49:47 +02:00
Erik-Jan WestendorpandGitHub ce9f92909b Remove Obsolete AddOEmbedProvider extension method (#12624)
* Remove unused using

* Remove Obsolete AddOEmbedProvider Method

* Revert and update obsolete message
2022-06-29 16:41:00 +10:00
MoleandGitHub 3cfeac94a4 V10: Fix error when opening recycle bin (#12619)
* Make object type parameter nullable in configuration editor

* Add delete from recycle bin test

* Clean up after test
2022-06-27 14:41:59 +02:00
Kevin JumpandZeegaan fb35c47c70 Also read the plugin files using the content provider. (#12552) 2022-06-27 13:34:09 +02:00
Kevin JumpandGitHub 5988a4c87d Also read the plugin files using the content provider. (#12552) 2022-06-27 13:29:27 +02:00
Erik-Jan WestendorpandNathan Woulfe ea264c79ef Translate 'Referenced by the following items' 2022-06-27 17:48:31 +10:00
Bjarke BergandZeegaan b232ff98a0 Fix formatting after merge and fix nullability 2022-06-27 08:31:34 +02:00
Bjarne FyrstenborgandNathan Woulfe b60c2ca5d3 Update aria-invalid based on valid length 2022-06-27 09:50:36 +10:00
091cb9e428 add a gap between icon and label of media menu (#12571)
* add a gap between icon and label of media menu

* replace inline style with class

* icon alignment

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-06-27 09:18:52 +10:00
c840ceecff Allow action links to wrap (#12611)
* Allow action links to wrap

Preventing wrapping means that buttons can overflow their container.

* slightly wider context menu to reduce runty labels

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-06-27 09:03:07 +10:00
Zeegaan f3591d2e7a Create acceptance tests for variant permissions 2022-06-24 13:23:56 +02:00
Zeegaan 551eeda625 Add cascading to UserGroup2LanguageDto.cs 2022-06-23 15:43:27 +02:00
Nikolaj 20f9cfe2ac Fix ReportSiteTask post merge 2022-06-23 15:25:25 +02:00
Mole 46d71838f2 Only send telemetry if we're on runtimelevel run (#12600) 2022-06-23 15:23:41 +02:00
Olivier BossaerandBjarke Berg 24222fa4d2 Unescape returnPath.
(cherry picked from commit 88af609c81)
2022-06-23 12:51:30 +02:00
Bjarke BergandGitHub 3106e4ee1f Merge pull request #12585 from olibos/v10/olibos/fix/12575-external-login-form-action
Unescape returnPath.
2022-06-23 12:49:58 +02:00
Zeegaan ac5f2270ac Set SupportsReadOnly in all our PropertyEditors 2022-06-22 15:45:13 +02:00
Zeegaan fbfe93b2e0 Fix bug related to invariant content 2022-06-22 15:21:12 +02:00
Zeegaan dfbd23fd03 Merge remote-tracking branch 'origin/v10/feature/variant-permissions' into v10/feature/variant-permissions 2022-06-22 15:08:51 +02:00
Zeegaan d4f1d3f680 Add SupportReadOnlyMode to editor 2022-06-22 15:08:44 +02:00
Mads Rasmussen 16ae85f2db only render property editor readonly mode if the property editor supports it 2022-06-22 14:53:42 +02:00
Zeegaan 8fe2f7e036 Merge remote-tracking branch 'origin/v10/feature/variant-permissions' into v10/feature/variant-permissions 2022-06-22 11:32:10 +02:00
Zeegaan c552008870 Add supportsReadOnlyMode to ContentPropertyDisplay.cs 2022-06-22 11:31:58 +02:00
Mads Rasmussen 1b19704d37 copy allowed actions in block list editor 2022-06-22 11:19:30 +02:00
Mads Rasmussen 37a4662e3c use readonly border in media picker 2022-06-22 11:19:02 +02:00
Mads Rasmussen 92fcc425e8 make readonly border lighter 2022-06-22 11:18:40 +02:00
MoleandGitHub 42e2254e30 Only send telemetry if we're on runtimelevel run (#12600) 2022-06-22 08:25:18 +02:00
MoleandGitHub 4a6a318f2c Add create content with same name test (#12557) 2022-06-21 14:53:56 +02:00
Mole 389380d8fa V10: Fix sending content notification (#12597)
* Add mappers to map between ContentItemDisplay and ContentItemDisplayWithSchedule

* Ensure SendingContentNotification is always sent

* Add custom setup hook for UmbracoTestServerTestBase

* Add test showing bug/fix

* Test schedule being mapped correctly

* Obsolete the old constructor

* Removed TODO
2022-06-21 13:57:26 +02:00
Nikolaj Geisle 7789f86b72 Add SupportsReadOnlyMode to package manifest 2022-06-21 12:30:41 +02:00
MoleandGitHub 045a487190 V10: Fix sending content notification (#12597)
* Add mappers to map between ContentItemDisplay and ContentItemDisplayWithSchedule

* Ensure SendingContentNotification is always sent

* Add custom setup hook for UmbracoTestServerTestBase

* Add test showing bug/fix

* Test schedule being mapped correctly

* Obsolete the old constructor

* Removed TODO
2022-06-21 11:44:28 +02:00
Nikolaj Geisle 7770f65faa Move tests 2022-06-21 11:06:18 +02:00
Nikolaj Geisle 9d912ea98a Add integration tests 2022-06-21 11:04:57 +02:00
Nikolaj Geisle 5049e7071b Fix redirect after logout bug https://github.com/umbraco/Umbraco-CMS/issues/12592 2022-06-21 09:20:47 +02:00
Nikolaj Geisle 1ab472472c Fix redirect after logout bug https://github.com/umbraco/Umbraco-CMS/issues/12592 2022-06-21 08:50:00 +02:00
Nikolaj Geisle c283cc498f Start work on integration tests 2022-06-21 08:45:33 +02:00
Nikolaj Geisle 8ab5aa1a41 Fix formatting 2022-06-21 08:45:24 +02:00
Nikolaj Geisle 4cd7aae611 Fix up after merge 2022-06-21 08:20:25 +02:00
Nikolaj Geisle 5b1e344092 Merge branch 'v10/dev' into v10/feature/variant-permissions
# Conflicts:
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Models/CultureImpactTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Editors/UserEditorAuthorizationHelperTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs
2022-06-21 08:18:39 +02:00
7aeb400fce V10: fix build warnings in test projects (#12509)
* Run code cleanup

* Dotnet format benchmarks project

* Fix up Test.Common

* Run dotnet format + manual cleanup

* Run code cleanup for unit tests

* Run dotnet format

* Fix up errors

* Manual cleanup of Unit test project

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

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

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

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

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

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

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

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

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

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

* Fix according to review

* Fix after merge

* Fix errors

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-21 08:09:38 +02:00
Zeegaan 6c893a1bd1 Implement extension method for IReadOnlyUserGroup that checks access to a language 2022-06-20 14:52:04 +02:00
Zeegaan bc2eb5a784 Fix up after merge 2022-06-20 14:12:33 +02:00
Zeegaan 0288e3d6a9 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/variant-permissions
# Conflicts:
#	src/Umbraco.Core/Configuration/Models/SecuritySettings.cs
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
#	src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs
#	src/Umbraco.Core/Models/ContentEditing/UserGroupBasic.cs
#	src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs
#	src/Umbraco.Core/Models/ContentRepositoryExtensions.cs
#	src/Umbraco.Core/Models/CultureImpact.cs
#	src/Umbraco.Core/Models/Mapping/ContentVariantMapper.cs
#	src/Umbraco.Core/Models/Mapping/UserMapDefinition.cs
#	src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs
#	src/Umbraco.Core/Models/Membership/IUserGroup.cs
#	src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs
#	src/Umbraco.Core/Models/Membership/UserGroup.cs
#	src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs
#	src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs
#	src/Umbraco.Infrastructure/Persistence/Factories/UserFactory.cs
#	src/Umbraco.Infrastructure/Persistence/Factories/UserGroupFactory.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Mapping/ContentMapDefinition.cs
#	src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
2022-06-20 13:59:18 +02:00
29961d40a3 V10: fix build warnings nucache (#12500)
* Run code cleanup

* Finish dotnet format and manual cleanup

* Fix according to review

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-20 09:21:08 +02:00
8ffede0441 V10: merge release branch 20220620 (#12590)
* Add Umbraco specific global usings

* Enable implicit usings

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

* Do not change/reload configuration

* Wait for updated connection string options

* recase assigndomain (#12448)

* Add depth property to ICoreScope (#12540)

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

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

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

* Prefer SQLite primitive types to flexible types.

* SQLite - column mappings use TEXT for decimals

Thanks @mattbrailsford for sense check.

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

* Make FindContent return type nullable (#12545)

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

* Updated nuget dependencies

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

* Updated more dependencies

* Improve FlagOutOfDateModels property behaviour.

(cherry picked from commit 54077725c3)

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

(cherry picked from commit 6b0149803a)

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

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

* Updated Examine to 3.0.0

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

* Fix possible null error

* Bump version to 10.0.0 final

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

* Re fix usage statements

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Paul Johnson <pmj@umbraco.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-06-20 09:20:47 +02:00
e762fa91bc V10: fix build warnings in Web.BackOffice (#12479)
* Run code cleanup

* Start manual run

* Finish dotnet format + manual cleanup

* Fix up after merge

* Fix substrings changed to [..]

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-20 08:37:17 +02:00
7688c61621 V10: fix build warnings Examine.Lucene (#12501)
* Run Code cleanup

* Dotnet format and manual pass

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-06-20 08:19:19 +02:00
df5993bca8 V10: Fix build warnings umbraco.persistence (#12502)
* Run code cleanup

* Run dotnet format

* Manual cleanup

* Fix [..] to substring

* Fix after merge

* Update src/Umbraco.Cms.Persistence.SqlServer/Services/SqlServerBulkSqlInsertProvider.cs

Co-authored-by: Paul Johnson <pmj@umbraco.com>

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Paul Johnson <pmj@umbraco.com>
2022-06-20 08:07:08 +02:00
d42a695e8a Added dictionary import/export (#12378)
* Added dictionary import/export

* Added umb tree to dictionary import & level for displaying preview dictionary import

* Indented dictionaries for import, added new text for choosing where to import dictionary items

* Removed console.log for dictionary/import.controller.js

Co-authored-by: Michael <michael@crossingpaths.be>
2022-06-17 09:21:01 +01:00
DanielToxicandMichael Latouche 2f4feb925a Localization: Add missing 'Create a new Document Type' translation (Swedish)
Add 'Create a new Document Type' key in button area (Swedish translation file)
2022-06-17 10:13:56 +02:00
Mehrdad Aghababaei BabakiandMichael Latouche a9b5558eb1 remove lightbox from dom on destroy 2022-06-17 10:08:16 +02:00
Matt BrailsfordandGitHub 23e94ffdad Add TOC to Contributing page (#12587) 2022-06-17 17:23:43 +10:00
Olivier Bossaer 88af609c81 Unescape returnPath. 2022-06-16 15:15:04 +02:00
Paul JohnsonandGitHub e3f4b86f1c Fix attempting to write lock files to LocalTempPath before it exists (#12563) 2022-06-10 09:03:59 +01:00
Bjarke Berg 116d5735fb Bump version to 10.0.0 final 2022-06-09 10:12:47 +02:00
Bjarke Berg d7b015d8c9 Fix possible null error 2022-06-09 09:53:28 +02:00
Bjarke Berg 2ab1518862 Fixes relation issue, when moving a root item to recycle bin, the "Relate Parent Media Folder On Delete"/"Relate Parent Document On Delete" cannot get the parent node type, because it is a fake root. 2022-06-09 09:51:37 +02:00
Bjarke Berg 2cc229ef9a Updated Examine to 3.0.0 2022-06-08 21:24:19 +02:00
Bjarke BergandGitHub 7e8c3cb20d Fixed issue with expected null value. (#12550)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/12526
2022-06-08 11:05:53 +02:00
Paul Johnson cf25d29f90 Fix logic error WRT models builder flag out of date models. (#12548)
(cherry picked from commit 6b0149803a)
2022-06-08 08:29:02 +01:00
Paul Johnson ce8f5f4724 Improve FlagOutOfDateModels property behaviour.
(cherry picked from commit 54077725c3)
2022-06-08 08:27:04 +01:00
Bjarke BergandGitHub 9ad790f36b Updated nuget dependencies (07-06-2022) (#12525)
* Updated nuget dependencies

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

* Updated more dependencies
2022-06-08 08:19:43 +02:00
60a5b19dc9 V10: Fix build warnings in core (#12438)
* Run code cleanup

* Start manual cleanup after dotnet format

* Finish up manual pass

* Fix up missed warnings

* Fix after merge

* Update src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs

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

* Update src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs

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

* Update src/Umbraco.Core/Cache/DeepCloneAppCache.cs

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

* Update src/Umbraco.Core/Cache/DomainCacheRefresher.cs

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

* Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs

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

* Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs

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

* Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs

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

* Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs

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

* Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs

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

* Update src/Umbraco.Core/Cache/MacroCacheRefresher.cs

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

* Update src/Umbraco.Core/Cache/MediaCacheRefresher.cs

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

* Update src/Umbraco.Core/Cache/MemberCacheRefresher.cs

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

* Update src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs

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

* Update src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs

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

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

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

* Update src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs

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

* Update src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs

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

* Update src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs

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

* Update src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Notifications/ContentTypeRefreshedNotification.cs

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

* Update src/Umbraco.Core/Notifications/ContentTypeSavedNotification.cs

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

* Update src/Umbraco.Core/Notifications/ContentTypeSavingNotification.cs

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

* Update src/Umbraco.Core/Notifications/DictionaryCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/DataTypeCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/ContentUnpublishingNotification.cs

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

* Update src/Umbraco.Core/Notifications/DictionaryItemDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/DictionaryItemSavedNotification.cs

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

* Update src/Umbraco.Core/Notifications/DictionaryItemSavingNotification.cs

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

* Update src/Umbraco.Core/Notifications/DomainCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/LanguageCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/MacroCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaEmptiedRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaEmptyingRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaMovedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaMovingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaMovingToRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTypeChangedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTypeDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTypeMovedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MediaTypeRefreshedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberGroupCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberGroupDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberGroupSavedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberGroupSavingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeChangedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeDeletedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeRefreshedNotification.cs

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

* Update src/Umbraco.Core/Notifications/MemberTypeSavingNotification.cs

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

* Update src/Umbraco.Core/Extensions/StringExtensions.cs

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

* Update src/Umbraco.Core/Extensions/UriExtensions.cs

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

* Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs

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

* Update src/Umbraco.Core/Notifications/PartialViewDeletingNotification.cs

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

* Update src/Umbraco.Core/Extensions/UriExtensions.cs

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

* Update src/Umbraco.Core/IO/PhysicalFileSystem.cs

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

* Update src/Umbraco.Core/IO/PhysicalFileSystem.cs

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

* Update src/Umbraco.Core/IO/ShadowWrapper.cs

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

* Update src/Umbraco.Core/Logging/DisposableTimer.cs

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

* Update src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs

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

* Update src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs

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

* Update src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs

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

* Update src/Umbraco.Core/Notifications/PartialViewSavedNotification.cs

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

* Update src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs

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

* Update src/Umbraco.Core/Notifications/PartialViewSavingNotification.cs

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

* Update src/Umbraco.Core/Notifications/PublicAccessCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletedNotification.cs

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

* Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/PublicAccessEntrySavedNotification.cs

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

* Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs

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

* Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs

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

* Update src/Umbraco.Core/Notifications/RelationTypeCacheRefresherNotification.cs

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

* Update src/Umbraco.Core/Notifications/RelationTypeDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/RelationTypeSavedNotification.cs

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

* Update src/Umbraco.Core/Notifications/RelationTypeSavingNotification.cs

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

* Update src/Umbraco.Core/Notifications/StatefulNotification.cs

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

* Update src/Umbraco.Core/Notifications/StylesheetDeletingNotification.cs

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

* Update src/Umbraco.Core/Notifications/StylesheetSavingNotification.cs

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

* Update src/Umbraco.Core/Models/DeepCloneHelper.cs

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

* Update src/Umbraco.Core/Models/File.cs

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

* Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs

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

* Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs

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

* Fix based on review

* Fix after merge

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

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-07 15:28:38 +02:00
MoleandGitHub fffbbbeb5f Make FindContent return type nullable (#12545) 2022-06-07 14:45:42 +02:00
Paul JohnsonandGitHub a8b68202f3 Fix issue where languages files are not found in subdir of package dir (#12543) 2022-06-07 13:15:26 +02:00
Paul JohnsonandGitHub d7ce136107 v10: Prefer SQLite primitive types to flexible types (#12541)
* Prefer SQLite primitive types to flexible types.

* SQLite - column mappings use TEXT for decimals

Thanks @mattbrailsford for sense check.
2022-06-07 12:41:46 +02:00
Paul JohnsonandGitHub fde1b6685a Remove ambient scope stack from httpcontext.items. (#12539)
This change makes it easier to use service calls in parallel whilst
a httpcontext is available.
2022-06-07 11:35:36 +02:00
Paul JohnsonandGitHub ea9d27c038 Add depth property to ICoreScope (#12540) 2022-06-07 11:25:05 +02:00
b4fbad14c7 V11: cleanup obsoletes (#12481)
* Remove IExternalLoginService.cs

* Remove UmbracoApplicationComponentsInstallingNotification.cs

* Remove UmbracoApplicationMainDomAcquiredNotification.cs

* Merge IContentTypeWithHistoryCleanup with IContentType.cs

* Remove obsolete ctors from notifications

* Remove obsolete methods

* Remove obsolete method from RequestHandlerSettings.cs

* Fix UmbracoBuilder.Repositories.cs

* RemoveRemove obsolete constants

* Remove obsolete method from IRuntimeMinifier

* Remove SetLastLogin from IMemberRepository

* Revert "RemoveRemove obsolete constants"

This reverts commit cddb8ad1cf.

* Remove obsoleted Constants-Conventions.cs

* Remove obsolete ctors

* Make ContentData properties immutable

* remove obsolete static property from TestOptionAttributeBase

* Merge IMacroWithAliasService into IMacroService

* Remove IUserComposer

* remove obsolete AddOEmbedProvider method

* remove obsolete static EmbedProvidersCollectionBuilder

* remove obsolete HasFlagAll<T> method

* Remove obsolete LocalizedTextService property from BaseHttpHeaderCheck

* Remove obsolete GetDefaultFIleContent method from ViewHelper

* Remove more obsolete ctors and methods

* Remove obsolete ctor from RelationType

* Remove more obsolete methods

* Remove IExternalLoginRepository

* merge IMacroWithAliasRepository with IMacroRepository

* Remove obsolete methods from ExternalLoginRepository

* Remove obsolete method from IUserRepository

* Remove obsolete SetLastLogin, as it was NoOp

* Remove wierd SetLastLogin method from UserService

* Remove GetLogLevel from ILogViewer

* Remove more obsolete methods and ctors

* Remove more obsoletes

* Use other method in BackOfficeServerVariables.cs since GetAllTypes is now removed

* Remove obsolete ctor

* Remove ConfigureIISServerOptions

* Remove more obsolete methods

* Merge ITwoFactorLoginService2 with ITwoFactorLoginService

* Re-introduce GetCustomGenericProperties in MemberTabsAndPropertiesMapper.cs

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-06-07 11:16:30 +02:00
Ronald BarendseandGitHub b6e93116dc Merge pull request #12516 from umbraco/v10/feature/global-usings
v10: Add global usings
2022-06-07 11:04:47 +02:00
Nikolaj GeisleandNikolaj 559a85812f recase assigndomain (#12448) 2022-06-07 09:01:57 +02:00
Nikolaj GeisleandGitHub 86e16302bf recase assigndomain (#12448) 2022-06-07 08:59:45 +02:00
Ronald BarendseandGitHub 4dcb017afe v10: Wait for updated ConnectionStrings during install (#12536)
* Do not change/reload configuration

* Wait for updated connection string options
2022-06-07 08:44:03 +02:00
Bjarke Berg 3754824ac9 Merge remote-tracking branch 'origin/release/10.0.0' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs
#	src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TwoFactorLoginRepository.cs
#	src/Umbraco.Infrastructure/Routing/RedirectTrackingHandler.cs
#	src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs
#	src/Umbraco.Infrastructure/Scoping/LegacyIScope.cs
#	src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs
#	version.json
2022-06-03 07:12:56 +02:00
Bjarke BergandGitHub 9aa6ec9d79 Merge pull request #12532 from umbraco/v10/feature/merge_v9.5.1_into_v10
Merge v9.5.1 into v10
2022-06-03 06:27:32 +02:00
Bjarke Berg 0beaf19063 Fixed query after tests on sqlite 2022-06-02 21:57:59 +02:00
Bjarke Berg 3d8f81025b Fixed NRT issues 2022-06-02 20:54:07 +02:00
Bjarke Berg d086b21332 Merge remote-tracking branch 'origin/v9/9.5' into v10/feature/merge_v9.5.1_into_v10
# Conflicts:
#	src/Directory.Build.props
#	src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TwoFactorLoginRepository.cs
#	src/Umbraco.Infrastructure/Routing/RedirectTrackingHandler.cs
#	src/Umbraco.PublishedCache.NuCache/ContentCache.cs
#	src/Umbraco.PublishedCache.NuCache/DomainCacheExtensions.cs
#	templates/UmbracoPackage/.template.config/template.json
#	templates/UmbracoProject/.template.config/template.json
2022-06-02 20:45:24 +02:00
Bjarne FyrstenborgandGitHub 4238e2a4f3 Simplify code in UmbracoViewPage (#12528) 2022-06-02 15:47:47 +02:00
Bjarke BergandNikolaj 07f685679b Changes to Basic Auth to support external logins (#12434)
* Fixed issues with basic auth middleware to support Umbraco Cloud usecase

* Fix redirects to return url, now allows website urls

* Strip potential domain part of returnPath

* Fix default value in appsettings schema

* Reintroduce check of basic auth enabled.

* Fix wrong negation introduced in #12349

* Fixed issues with redirects

* Also check external login cookie, while authenticating backoffice
2022-06-02 12:24:26 +02:00
Bjarke BergandGitHub faf06be618 Changes to Basic Auth to support external logins (#12434)
* Fixed issues with basic auth middleware to support Umbraco Cloud usecase

* Fix redirects to return url, now allows website urls

* Strip potential domain part of returnPath

* Fix default value in appsettings schema

* Reintroduce check of basic auth enabled.

* Fix wrong negation introduced in #12349

* Fixed issues with redirects

* Also check external login cookie, while authenticating backoffice
2022-06-02 12:19:22 +02:00
f4e333c178 V10: fix build warnings infrastructure (#12369)
* Run code cleanup

* Run dotnet format

* Start manual fixes

* Manual fixing of warnings

* Fix nullability in columnalias

* Fix tests

* Fix up after merge

* Start updating after review

* Update editorconfig to contain new static & const rules

* Fix up editorconfig to not contain duplicate rules

* Fix up static member names

* Fix up according to review

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Fix [..] to substring

* Fix after merge with 10/dev

* Fox ContentValueSetValidator.cs

* Update LoggerConfigExtensions

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-06-02 08:18:31 +02:00
Bjarke BergandGitHub cce0a7d816 Obsolete stuff not used anymore and remove from appsettings schema (#12520) 2022-06-01 19:35:10 +02:00
Paul JohnsonandGitHub edc9e9623d v10: fix migrations fluent create table builder sqlite (#12518)
* Fix create table builder setup for migrations with SQLite.
2022-06-01 17:04:46 +01:00
Paul JohnsonandGitHub 2da8bfba7d Fix unable to authorize upgrade from versions < 9.3.0 (#12519)
(cherry picked from commit 9746889635)
2022-06-01 16:53:34 +01:00
Ronald Barendse 8d5590471c Merge branch 'release/10.0.0' into v10/feature/global-usings 2022-06-01 16:05:22 +02:00
Paul JohnsonandGitHub bee19f5404 Move HostBuilderExtensions to Microsoft.Extensions.DependencyInjection (#12515) 2022-06-01 15:01:00 +01:00
Ronald Barendse 87dbc8b287 Enable implicit usings 2022-06-01 15:50:37 +02:00
Ronald Barendse 588525e99f Add Umbraco specific global usings 2022-06-01 14:46:01 +02:00
7f76893399 v10: Breaking Change Fixes (#12486)
* Add Execute with obsoleted IScopeProvider parameter

* Add ScopeContextualBase Get method that accepts an obsolete IScopeProvider

* Make LegacyIScope have all props/methods defined upon it as otherwise it causes method missing errors

* Added new keyword to hidden properties / methods

* Drop Context prop from Infrastructure.IScopeProvider

Co-authored-by: Paul Johnson <pmj@umbraco.com>
2022-05-30 16:05:30 +01:00
Paul Johnson 025658e611 Fix compiler warning for hidden inherited member on legacyscopeprovider 2022-05-30 15:20:52 +01:00
Matt BrailsfordandPaul Johnson 6d3e4aaa78 Make ActionDelete.ActionAlias public again
(cherry picked from commit d0a752248e)
2022-05-26 14:13:58 +01:00
Matt BrailsfordandMichael Latouche d0a752248e Make ActionDelete.ActionAlias public again 2022-05-26 13:16:12 +02:00
Paul Johnson be2194a8b1 Bump version to 10.0.0-rc5 2022-05-26 08:28:53 +01:00
Matt BrailsfordandPaul Johnson cf461b2504 Don't use default params for AddUnique extension methods (breaks v9) (#12485)
(cherry picked from commit f3c4c677f3)
2022-05-26 08:28:17 +01:00
Matt BrailsfordandPaul Johnson adcc9a0e1f Don't use default params for AddUnique extension methods (breaks v9) (#12485)
(cherry picked from commit f3c4c677f3)
2022-05-26 08:27:40 +01:00
Matt BrailsfordandGitHub f3c4c677f3 Don't use default params for AddUnique extension methods (breaks v9) (#12485) 2022-05-26 08:25:02 +01:00
JeavonandGitHub 8609314314 Update template gitignore for static assets now in Razor Class Library (#12424)
* Update template gitignore

Remove the rules for umbraco static assets as these are now served from a Razor Class Libray

* Update .gitignore

Adjust path of appsettings-schema.json
2022-05-26 15:39:21 +10:00
nikolajlauridsen c5e1f5c67d Merge branch 'release/10.0.0' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Install/InstallSteps/NewInstallStep.cs
2022-05-25 12:51:08 +02:00
Paul Johnson 8c7905a354 merge release/10.0.0 into v10/dev
commit 9ff06eec6e
Author: Ronald Barendse <ronald@barend.se>
Date:   Wed May 25 11:16:39 2022 +0200

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

    * Do not replace DataDirectory placeholder when setting connection string

    * Ensure ConnectionStrings options are updated when configuration is reloaded

    * Use CurrentValue to get default Umbraco connection string

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

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

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

    Fix options monitor setup for connectionstrings (#12472)

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

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

    * Fixed null check typo. Fixes #12473.

    * Removed unneccessary null forgiving operator

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

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

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

    * Fix #12454 by having Coalesce handle null values

    * Allow null values in Html.Coalesce #12454

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

    Ensure unique buildnumber for devops UI
2022-05-25 10:48:45 +01:00
Ronald BarendseandGitHub 9ff06eec6e v10: Instantly reload ConnectionStrings after saving configuration (#12475)
* Do not replace DataDirectory placeholder when setting connection string

* Ensure ConnectionStrings options are updated when configuration is reloaded

* Use CurrentValue to get default Umbraco connection string
2022-05-25 10:16:39 +01:00
Paul JohnsonandGitHub fcee6dc06a Fix legacy scope provider no longer implementing ICoreScopeProvider (#12480) 2022-05-25 10:08:43 +01:00
Paul JohnsonandGitHub 88f3628d0a Fix options monitor setup for connectionstrings (#12472) 2022-05-25 09:49:33 +01:00
4eeb03e7fb Fixed null check typo in CacheInstructionService. Fixes #12473. (#12474)
* Fixed null check typo. Fixes #12473.

* Removed unneccessary null forgiving operator

Co-authored-by: Johan Runsten <johan.runsten@toxic.se>
2022-05-25 10:14:26 +02:00
83e555a8ed Fixed null check typo in CacheInstructionService. Fixes #12473. (#12474)
* Fixed null check typo. Fixes #12473.

* Removed unneccessary null forgiving operator

Co-authored-by: Johan Runsten <johan.runsten@toxic.se>
2022-05-25 10:13:25 +02:00
019385411a added option to disable automatic expand of single nc item (#12261)
* added option to disable automatic expand of single nc item

* remove max item conditional

remove max item 1 conditional to set current node

* changed description of slider property

removed description of first item conditional

* Update NestedContentConfiguration.cs

change copy to more accurately describe the feature

Co-authored-by: Wilmar <wilmar.de.hoogd@thevalley.nl>
2022-05-25 02:31:52 +02:00
Asbjørn Riis-KnudsenandBjarke Berg d810d66e9a Fix #12454 by having Coalesce handle null values (#12456)
* Fix #12454 by having Coalesce handle null values

* Allow null values in Html.Coalesce #12454
2022-05-24 18:20:48 +02:00
Asbjørn Riis-KnudsenandGitHub d6b60cfc88 Fix #12454 by having Coalesce handle null values (#12456)
* Fix #12454 by having Coalesce handle null values

* Allow null values in Html.Coalesce #12454
2022-05-24 17:41:10 +02:00
Paul Johnson 963d4c5051 Ensure unique buildnumber for devops UI 2022-05-24 14:18:50 +01:00
Bjarke Berg e6479207f1 Merge remote-tracking branch 'origin/release/10.0.0' into v10/dev 2022-05-24 14:11:18 +02:00
Bjarke Berg 175828ec43 Fixed issue in https://github.com/umbraco/Umbraco-CMS/issues/12384 (#12420)
We need to use invariant culture when doing ToString of user ints
2022-05-24 14:09:53 +02:00
Bjarke BergandGitHub ad6ef2688d Changed back Attempt<int?> to Attempt<int> (#12468) 2022-05-24 13:36:31 +02:00
7437feed10 Add TypeForwards file with type forwarding (#12467)
Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-05-24 12:37:48 +02:00
Paul JohnsonandGitHub 41a003e20e Ensure legacy scope returned when using legacy scope provider (#12465)
* Separate legacy scope provider interface and explicitly implement.

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

* Assert correct type returned when using legacy scope provider.
2022-05-24 12:26:28 +02:00
Bjarke BergandGitHub e12c2eca1b Move msbuild target to correct location (#12462)
* Move target to correct location

* Clean up

* Remove duplicate
2022-05-24 10:57:29 +02:00
Paul Johnson d824516d80 Merge release/10.0.0 into v10/dev 2022-05-24 08:55:54 +01:00
Paul Johnson c16f2e2752 Fix timeoutInMinutes added to incorrect job. 2022-05-24 08:54:24 +01:00
971f0d7984 Feature: Configure Data Type conversion (#12374)
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2022-05-24 09:01:32 +02:00
Erik-Jan WestendorpandNathan Woulfe 3b68703333 Translate 'Configure Two Factor' (Dutch) 2022-05-24 08:08:08 +10:00
Bjarne FyrstenborgandGitHub 71156fb59b Adjust Danish translation for 2FA (#12459)
* Adjust Danish translation for 2FA

* Remove break
2022-05-24 08:04:33 +10:00
Bjarke Berg ab4909e6b9 Merge remote-tracking branch 'origin/release/10.0.0' into v10/dev
# Conflicts:
#	version.json
2022-05-23 16:56:39 +02:00
Bjarke BergandGitHub 56d9bf9847 Reintroduce MSBuild target that includes App_Plugins content when publishing (#12455)
* Reintroduced the IncludeAppPluginsContent target

* Bump version
2022-05-23 16:53:10 +02:00
nikolajlauridsen 9d14140bf1 Merge remote-tracking branch 'origin/release/10.0.0' into v10/dev
# Conflicts:
#	version.json
2022-05-23 11:58:23 +02:00
Nikolaj Geisle 882de44e38 Revert "Remove IExternalLoginService.cs"
This reverts commit 8b2557817b.
2022-05-23 10:33:32 +02:00
Nikolaj Geisle 7a1e134978 Revert "Remove UmbracoApplicationComponentsInstallingNotification.cs"
This reverts commit f6d39cd7e1.
2022-05-23 10:33:29 +02:00
Nikolaj Geisle 77c5b288b0 Revert "Remove UmbracoApplicationMainDomAcquiredNotification.cs"
This reverts commit 43add037e6.
2022-05-23 10:33:16 +02:00
Nikolaj Geisle 9719f8ac56 Revert "Merge IContentTypeWithHistoryCleanup with IContentType.cs"
This reverts commit 94eb49cdb6.
2022-05-23 10:33:02 +02:00
Nikolaj Geisle 94eb49cdb6 Merge IContentTypeWithHistoryCleanup with IContentType.cs 2022-05-23 10:30:03 +02:00
Nikolaj Geisle 43add037e6 Remove UmbracoApplicationMainDomAcquiredNotification.cs 2022-05-23 10:27:29 +02:00
Nikolaj Geisle f6d39cd7e1 Remove UmbracoApplicationComponentsInstallingNotification.cs 2022-05-23 10:27:18 +02:00
Nikolaj Geisle 8b2557817b Remove IExternalLoginService.cs 2022-05-23 10:26:54 +02:00
Erik-Jan WestendorpandNathan Woulfe 77dce77df4 Add Two Factor Auth translation (Dutch) 2022-05-23 18:10:12 +10:00
Paul Johnson e366fe8806 Merge release/10.0.0 into v10/dev
commit ff6d064b29
Author: Paul Johnson <pmj@umbraco.com>
Date:   Mon May 23 08:43:52 2022 +0100

    Allow for slow integration test runs

commit e6320a12ba
Author: Andy Butland <abutland73@gmail.com>
Date:   Sat May 21 08:10:52 2022 +0200

    Fixed null check in external login.

    (cherry picked from commit 9981907532)

commit 0f6630861e
Author: Paul Johnson <pmj@umbraco.com>
Date:   Mon May 23 07:25:04 2022 +0100

    static assets nupkg fixes (#12440)

    * Remove duplicate jsonschema build

    * Don't attempt to --no-build for dotnet pack (fixes static assets)

    * Bump version to 10.0.0-rc3

    * Improve restoreKeys

    * update Umbraco.GitVersioning.Extensions to 0.1.1

    (cherry picked from commit 0ef34ab9c5)

    * tag e2e container with current commit

    * cache cypress binaries

# Conflicts:
#	version.json
2022-05-23 08:56:50 +01:00
Paul Johnson ff6d064b29 Allow for slow integration test runs 2022-05-23 08:43:52 +01:00
Andy ButlandandBjarke Berg e6320a12ba Fixed null check in external login.
(cherry picked from commit 9981907532)
2022-05-23 08:27:41 +02:00
Paul JohnsonandGitHub 0f6630861e static assets nupkg fixes (#12440)
* Remove duplicate jsonschema build

* Don't attempt to --no-build for dotnet pack (fixes static assets)

* Bump version to 10.0.0-rc3

* Improve restoreKeys

* update Umbraco.GitVersioning.Extensions to 0.1.1

(cherry picked from commit 0ef34ab9c5)

* tag e2e container with current commit

* cache cypress binaries
2022-05-23 08:25:04 +02:00
Andy ButlandandGitHub bf8f0e8e05 Merge pull request #12443 from umbraco/v10/bugfix/fix-external-login
Fixed null check in external login.
2022-05-21 08:13:37 +02:00
Andy Butland 9981907532 Fixed null check in external login. 2022-05-21 08:10:52 +02:00
Andy ButlandandGitHub f22aa2ed2d Merge pull request #12442 from umbraco/v10/feature/fix-vs-builds-umbraco-gitversioning
Fix visual studio build wrt Umbraco.GitVersioning.Extensions
2022-05-21 07:47:04 +02:00
Paul Johnson 0ef34ab9c5 update Umbraco.GitVersioning.Extensions to 0.1.1 2022-05-21 00:09:23 +01:00
Nikolaj a491d26c3f Fix bad merge 2022-05-20 10:26:23 +02:00
Nikolaj ed83784691 Merge branch 'release/10.0.0' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Install/InstallSteps/NewInstallStep.cs
#	version.json
2022-05-20 10:20:51 +02:00
Nikolaj 9bafabf906 Disable include symbols 2022-05-20 10:12:45 +02:00
9a4daa451a v10: Set telemetry level in installer (#12365)
* Add slider to user view

* fix typo 'constentLevels'

* Add TelemetryLevel to UserModel

* Extend NewInstallStep to include descriptions of each TelemetryLevel

* Add nouislider as dependency for installer view

* Add telemetry levels

Add raw nouislider to select a telemetry level + set chosen level onChange to the user model + show detailed description of each level as a tooltip

* Copy over basic styling of nouislider

* Save consent level in installer

* Fix detailed key to not contain <br>

* Fix MetricsConsentService to log correctly when we set analyticsLevel in installer

* Fix breaking change and obsolete messages

* reinstate saved value of the subscription field if you traverse the steps

* calculate the initial slider level based on the saved value of the model

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-05-19 15:49:08 +02:00
Paul Johnson f7bf6d5959 Prevent codeql build failures 2022-05-19 10:47:31 +01:00
Paul Johnson cfc8dcf2cb Bump version to 10.1.0-alpha.1 2022-05-19 10:26:37 +01:00
Paul Johnson 01d2d0326c Merge release/10.0.0 into v10/dev
commit e0aa430d4c
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 10:00:57 2022 +0100

    Fix typo in pipeline yaml

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

    Fix yaml conditions

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

    Azure pipeline refactor (#12428)

    * Skip symbols for Umbraco.Templates

    * Resolve some test issues

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

    + Snap dictionary tests were failing when Configuration was release

    + Removed hardcoded baseUrl from one of the acceptance tests

    * Move docfx setup to ./build and fix

    * Update UI docs title

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

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

    * Refactor ci/cd pipeline

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

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

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

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

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

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

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

    * Generate json schema on build

    * Add targets file

    * Gitignore auto generated appsettings schema

    * Fix build not copying file

    * Use the new path in appsettings

    * Update copy message

    * Build json schema as release

    * Update json schema options

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

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

    * Update json schema options

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

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

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

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

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

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

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

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

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

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

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

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

    * Add new connection-string-provider-name parameter

    * Use template value forms to correctly encode JSON values

    * Add new development-database-type parameter

    * Update package template and fix App_Plugins directory rename

    * Remove conflicting short parameter name

    * Lowercase framework parameter to align with MS templates

    * Cleanup default template settings

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

    * Include RootNamespace in UmbracoPackage template

    * Update Umbraco specific gitignore rules

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

    This reverts commit 22de389272.

    * Add exclude-gitignore parameter

    * Update template schemas

    * Add minimal-gitignore parameter

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

    Fix domain for invariant content nodes (#12405)

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

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

    Use SnippetCollection to when working with snippets  (#12355)

    * Introducing a new Snippet type

    * Adding a SnippetCollection and SnippetCollectionBuilder

    * Using snippetCollection to get the snippets instead of fileService

    * Fixed fetching the correct content

    * Make ISnippet non-discoverable

    * Split the SnippetCollection into PartialViewSnippetCollection and PartialViewMacroSnippetCollection

    * Update CodeFileController to use the 2 snippet collections

    * Display the names with Empty.cshtml on top

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

    * Fix naming

    * Fix another naming

    * Cleanup + Use base items

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

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

    Cherry picked from 4c08b44684

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

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

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

    * Cleanup

    * Remove stop-scrolling container

    * Use flex-start instead on start

    * Remove legacy flexbox fallback

    * Remove unnecessary hack

    * Use standard gap property instead

    * Localization of message

    * Fix translation

    * End sentence with a dot

    (cherry picked from commit ebb1dc21a9)

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

    #fix 12254 return emptyresult

    (cherry picked from commit 7993d19c1b)

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

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

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

    * Added tests for configuration extension methods.

    * Fix issue with InstallMissingDatabase and ForceCreateDatabase

    * Fix comments

    * Revert casing change in GenerateConnectionString

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

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

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

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

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

    * Whitespace and documentation updates

    * Add DatabaseProviderMetadataExtensions

    * Filter before ordering

    * Replace DataDirectory placeholder when setting connection string

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

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

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

    * Add support for System.Data.SqlClient provider name

    * Only update connection string when required

    (cherry picked from commit e82bcb1b76)

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

    Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

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

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
    (cherry picked from commit 2ed71a64ec)
2022-05-19 10:25:44 +01:00
Paul Johnson e0aa430d4c Fix typo in pipeline yaml 2022-05-19 10:00:57 +01:00
Paul Johnson 2ec450f2d6 Fix yaml conditions 2022-05-19 09:14:47 +01:00
Paul JohnsonandGitHub c2d548039a Azure pipeline refactor (#12428)
* Skip symbols for Umbraco.Templates

* Resolve some test issues

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

+ Snap dictionary tests were failing when Configuration was release

+ Removed hardcoded baseUrl from one of the acceptance tests

* Move docfx setup to ./build and fix

* Update UI docs title

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

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

* Refactor ci/cd pipeline
2022-05-19 10:02:50 +02:00
ee8359af75 V10: Reintroduce appsettings-schema.json (#12416)
* Reintroduce language files tests (#12367)

* Reintroducing language files tests

* Fix casing

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

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

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

* Remove Umbraco.Templates from VerifyNuGet step

* Remove duplicate and unnecessary properties

* Generate json schema on build

* Add targets file

* Gitignore auto generated appsettings schema

* Fix build not copying file

* Use the new path in appsettings

* Update copy message

* Build json schema as release

* Update json schema options

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

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

* Update json schema options

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

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-05-19 09:57:21 +02:00
dd617ede80 v10: Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj (#12413)
* Reintroduce language files tests (#12367)

* Reintroducing language files tests

* Fix casing

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

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

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

* Remove Umbraco.Templates from VerifyNuGet step

* Remove duplicate and unnecessary properties

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-05-19 09:51:11 +02:00
Ronald BarendseandNikolaj b83216876f v10: Project template database/connection string improvements (#12407)
* Add new connection-string-provider-name parameter

* Use template value forms to correctly encode JSON values

* Add new development-database-type parameter

* Update package template and fix App_Plugins directory rename

* Remove conflicting short parameter name

* Lowercase framework parameter to align with MS templates

* Cleanup default template settings

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

* Include RootNamespace in UmbracoPackage template

* Update Umbraco specific gitignore rules

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

This reverts commit 22de389272.

* Add exclude-gitignore parameter

* Update template schemas

* Add minimal-gitignore parameter
2022-05-19 08:37:06 +02:00
Ronald BarendseandGitHub 8d8592092f v10: Project template database/connection string improvements (#12407)
* Add new connection-string-provider-name parameter

* Use template value forms to correctly encode JSON values

* Add new development-database-type parameter

* Update package template and fix App_Plugins directory rename

* Remove conflicting short parameter name

* Lowercase framework parameter to align with MS templates

* Cleanup default template settings

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

* Include RootNamespace in UmbracoPackage template

* Update Umbraco specific gitignore rules

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

This reverts commit 22de389272.

* Add exclude-gitignore parameter

* Update template schemas

* Add minimal-gitignore parameter
2022-05-19 08:36:04 +02:00
MoleandElitsa Marinovska e40049dcf1 Fix domain for invariant content nodes (#12405)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-05-18 15:32:13 +02:00
8d0bdb7ef6 Fix domain for invariant content nodes (#12405)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-05-18 15:22:51 +02:00
Elitsa MarinovskaandSebastiaan Janssen a3692b887a Use SnippetCollection to when working with snippets (#12355)
* Introducing a new Snippet type

* Adding a SnippetCollection and SnippetCollectionBuilder

* Using snippetCollection to get the snippets instead of fileService

* Fixed fetching the correct content

* Make ISnippet non-discoverable

* Split the SnippetCollection into PartialViewSnippetCollection and PartialViewMacroSnippetCollection

* Update CodeFileController to use the 2 snippet collections

* Display the names with Empty.cshtml on top

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

* Fix naming

* Fix another naming

* Cleanup + Use base items

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
(cherry picked from commit 9326cc5fc6)
2022-05-18 09:56:42 +02:00
patrickdemooij9andSebastiaan Janssen 4f48a4937b Cherry picked from 4c08b44684 2022-05-18 09:50:44 +02:00
Bjarne FyrstenborgandSebastiaan Janssen 4fdbfee597 Show nicer overlay when clicking block card for deleted element type (#12140)
* Show nicer overlay when clicking block card for deleted element type

* Cleanup

* Remove stop-scrolling container

* Use flex-start instead on start

* Remove legacy flexbox fallback

* Remove unnecessary hack

* Use standard gap property instead

* Localization of message

* Fix translation

* End sentence with a dot

(cherry picked from commit ebb1dc21a9)
2022-05-18 09:18:51 +02:00
Henk Jan PluimandSebastiaan Janssen 3856bf8288 #fix 12254 return emptyresult
(cherry picked from commit 7993d19c1b)
2022-05-18 09:15:56 +02:00
Bjarne FyrstenborgandGitHub 1db10f3ace Support custom SVG icon in property actions (#12062)
* Support SVG icon in umb-property-actions

* Update icons for existing property actions

* Make backwards compatible

* Update existing property actions to not use legacy icons as we now specify full icon name, but we need this for backward compatibility

* Change from named function to local function

* Add property actions to multi url picker

* Inject overlayService and set isDisabled in watch

* Add function to clear
2022-05-18 09:12:56 +10:00
Bjarne FyrstenborgandGitHub 9fce9e05c7 Menu action icons (#12418)
* Fix icon for export member

* Add missing start summary tag

* Formatting
2022-05-18 08:50:30 +10:00
Sebastiaan Janssen 1422aa196a Add new issues to a project board 2022-05-17 19:30:42 +02:00
900a623e74 Updated the installer screen, and the no NoNodes.cshtml (#12399)
* Updated the installer screen, and the no NoNodes.cshtml with link to the new learning base for Umbraco

* Added ref to the link

Co-authored-by: Dennis Aaen <dennis@umbraco.com>
2022-05-17 14:39:03 +02:00
Sebastiaan Janssen 230d3e53ad Fix action name 2022-05-17 14:27:00 +02:00
Sebastiaan Janssen 082d853056 Add up-for-grabs workflow - improve log messages in pr-first-response 2022-05-17 14:24:07 +02:00
Ronald BarendseandBjarke Berg 7087c3d9f6 v10: Use ForceCreateDatabase during unattended install and extend GetUmbracoConnectionString extension methods (#12397)
* Add extension methods to get the Umbraco connection string/provider name from configuration

* Added tests for configuration extension methods.

* Fix issue with InstallMissingDatabase and ForceCreateDatabase

* Fix comments

* Revert casing change in GenerateConnectionString

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

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

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

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

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

* Whitespace and documentation updates

* Add DatabaseProviderMetadataExtensions

* Filter before ordering

* Replace DataDirectory placeholder when setting connection string

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
(cherry picked from commit 8e6e262c7f)
2022-05-17 12:59:16 +02:00
8e6e262c7f v10: Use ForceCreateDatabase during unattended install and extend GetUmbracoConnectionString extension methods (#12397)
* Add extension methods to get the Umbraco connection string/provider name from configuration

* Added tests for configuration extension methods.

* Fix issue with InstallMissingDatabase and ForceCreateDatabase

* Fix comments

* Revert casing change in GenerateConnectionString

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

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

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

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

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

* Whitespace and documentation updates

* Add DatabaseProviderMetadataExtensions

* Filter before ordering

* Replace DataDirectory placeholder when setting connection string

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-05-17 12:59:01 +02:00
Sebastiaan JanssenandGitHub bbffac22b4 Update BUILD.md 2022-05-17 11:39:58 +02:00
Sebastiaan JanssenandGitHub 4d41fd77c9 Update BUILD.md 2022-05-17 11:38:02 +02:00
Ronald BarendseandBjarke Berg e90bf26577 v10: Support System.Data.SqlClient provider name (#12408)
* Add support for System.Data.SqlClient provider name

* Only update connection string when required

(cherry picked from commit e82bcb1b76)
2022-05-17 08:31:05 +02:00
Elitsa MarinovskaandBjarke Berg fd0637c96d Reintroduce language files tests (#12367)
* Reintroducing language files tests

* Fix casing

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

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
(cherry picked from commit 2ed71a64ec)
2022-05-17 08:30:51 +02:00
Rasmus ØstergårdandGitHub 9442e0f5ca Translate document type description (#12409) 2022-05-17 15:36:42 +10:00
Ronald BarendseandGitHub e82bcb1b76 v10: Support System.Data.SqlClient provider name (#12408)
* Add support for System.Data.SqlClient provider name

* Only update connection string when required
2022-05-17 07:33:54 +02:00
Bjarne FyrstenborgandGitHub d051f850eb Support SVG icon in action menu (#12403)
* Support custom SVG icon in menu item with legacy support

* Update menu icons

* Update action icons

* Adjust icons in menu actions with legacy fallback

* Don't use legacy icon

* Update comments
2022-05-17 07:50:19 +10:00
2ed71a64ec Reintroduce language files tests (#12367)
* Reintroducing language files tests

* Fix casing

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

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-05-16 14:23:59 +02:00
Nikolaj Geisle 4d68820879 Handle if securitySettings is set 2022-05-16 14:08:21 +02:00
Nikolaj Geisle 544dcffa18 Merge remote-tracking branch 'origin/v10/feature/variant-permissions' into v10/feature/variant-permissions 2022-05-16 14:00:22 +02:00
Nikolaj Geisle 27421cef2a Handle invariant permissions 2022-05-16 14:00:13 +02:00
Mads Rasmussen 279dd0cf0c Merge branch 'v10/feature/variant-permissions' of https://github.com/umbraco/Umbraco-CMS into v10/feature/variant-permissions 2022-05-16 13:44:26 +02:00
Mads Rasmussen 9e51ad9cbf check for permissions in block list editor 2022-05-16 13:44:19 +02:00
Nikolaj Geisle 2ad73d4c47 Fix proper mapping instead of duplicated code 2022-05-16 13:23:54 +02:00
Sebastiaan JanssenandGitHub 048193e3a5 Update BUILD.md 2022-05-16 13:12:08 +02:00
Nikolaj Geisle 62525518c2 Merge remote-tracking branch 'origin/v10/feature/variant-permissions' into v10/feature/variant-permissions 2022-05-16 13:10:10 +02:00
Nikolaj Geisle cc450bef8a Fix invariant-variant returning all actions 2022-05-16 13:10:03 +02:00
Sebastiaan JanssenandGitHub 898c5cc397 Update BUILD.md 2022-05-16 13:08:33 +02:00
Mads Rasmussen 3f0b90b18d remove delete row button when block list editor is readonly 2022-05-16 13:05:46 +02:00
Mads Rasmussen c0f674d333 localize unlock invariant property help text 2022-05-16 12:32:40 +02:00
Mads Rasmussen 6c4159751c add translation for shared 2022-05-16 11:39:14 +02:00
Mads Rasmussen 23b8dd843c add more white space underneath language label 2022-05-16 11:35:07 +02:00
Mads Rasmussen ec60ad8629 remove padding from property unlock container 2022-05-16 11:32:33 +02:00
Mads Rasmussen 121933a9ed only use preview mode if the user can also unlock the property editor 2022-05-16 11:29:33 +02:00
Mads Rasmussen 3b8c5dd084 Add check for editing invariant properties based on the appsetting config 2022-05-16 11:07:09 +02:00
Mads Rasmussen 587fa5c0d6 Merge branch 'v10/feature/variant-permissions' into v10/feature/editable-invariant-properties-ui 2022-05-16 10:54:10 +02:00
Nikolaj Geisle 14ce40be4c Fix BackOfficeServerVariables.cs 2022-05-16 10:50:40 +02:00
Mads Rasmussen d9f1b2e8aa Merge branch 'v10/feature/variant-permissions' into v10/feature/editable-invariant-properties-ui 2022-05-16 10:25:23 +02:00
Nikolaj Geisle 6de8a81aa0 Fix invariant content 2022-05-16 09:56:18 +02:00
failureflawlessandMichael Latouche 2c34751fd4 Updated docs and VSCode build task
as we discovered some changes we needed in the docs
2022-05-13 11:35:52 +02:00
Mads Rasmussen 2ad51a4520 update to variable 2022-05-12 21:56:35 +02:00
Mads Rasmussen 5494b48756 allow unlocking invariant properties if a user has update permissions for the language 2022-05-12 21:54:04 +02:00
Mads Rasmussen ce8a635c2c always show shared badge on invariant properties on variant nodes 2022-05-12 18:49:54 +02:00
Mads Rasmussen e02516193a Merge branch 'v10/feature/variant-permissions' into v10/feature/editable-invariant-properties-ui 2022-05-12 18:33:02 +02:00
Mads Rasmussen ec91d8c22b check for publish permission when publishing with decendants 2022-05-12 18:07:35 +02:00
Mads Rasmussen 87811bd3b3 check for unpublish permission 2022-05-12 18:07:00 +02:00
Mads Rasmussen dae338b4e8 check for schedule permission 2022-05-12 18:06:41 +02:00
Mads Rasmussen 7405cbe6ef check for send to publish permission 2022-05-12 18:05:38 +02:00
Mads Rasmussen c26a0a46b0 dont allow publish if the user doesn't have publish permissions 2022-05-12 18:02:15 +02:00
Mads Rasmussen 84108bbea2 dont allow save if the user doesn't have save permissions 2022-05-12 18:01:17 +02:00
3f0ff6a752 Publish invariant properties (#12386)
* Publish invariants from non default

* Add culture impact service

* Use the new culture impact service instead of newing up culture impacts

* Only publish invariant properties on non-defaults with invariant culture

Essentially we want to be able to fall back to the default culture for the variant properties if a document type is made invariant, not whatever culture was published last.

* Move creation logic into the service

* Make creation method names consistent

* Fix tests

We compare the cultures directly, so they have to be the same object instance unfortunately

* Add test for the new setting

* Add new config to server variables

* Fix test setup

* Apply suggestions from code review

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

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-05-12 12:41:51 +02:00
Joe GlombekandGitHub 953e6f2e34 Rework and update the contributing guide (#12165) 2022-05-12 12:19:44 +02:00
Mads Rasmussen 6ddce4b151 use correct magic letter for update permission 2022-05-11 20:30:08 +02:00
Mads Rasmussen c9c00760b5 match tag editor readonly styling with input 2022-05-11 20:25:34 +02:00
Mads Rasmussen 5e4ecf2462 set node name to readonly when the user has no update permissions 2022-05-11 20:22:47 +02:00
Mads Rasmussen 4a63433257 simplify check for readonly 2022-05-11 20:21:49 +02:00
Mads Rasmussen de8a5bc855 style readonly inputs different than disabled inputs 2022-05-11 19:36:39 +02:00
Mads Rasmussen 95a41afea9 list view: check for readonly based on variant permissions 2022-05-11 19:26:54 +02:00
Mads Rasmussen 16288cf939 content: check for readonly properties based on variant permissions 2022-05-11 19:26:24 +02:00
Nikolaj Geisle 1810b7a744 Change allowedactions 2022-05-11 13:34:35 +02:00
Nikolaj Geisle e839e09680 Finish default granular permissions for languages 2022-05-11 12:55:42 +02:00
Nikolaj Geisle e270f90296 Add granular permission to variants 2022-05-11 12:31:51 +02:00
Nikolaj Geisle b6277fbfd7 Revert "Start work on allowing nodes for users per language"
This reverts commit e78794c00e.
2022-05-11 10:01:27 +02:00
Nikolaj Geisle 004267a86f Fix test 2022-05-11 09:49:13 +02:00
Bjarne FyrstenborgandGitHub ebb1dc21a9 Show nicer overlay when clicking block card for deleted element type (#12140)
* Show nicer overlay when clicking block card for deleted element type

* Cleanup

* Remove stop-scrolling container

* Use flex-start instead on start

* Remove legacy flexbox fallback

* Remove unnecessary hack

* Use standard gap property instead

* Localization of message

* Fix translation

* End sentence with a dot
2022-05-11 08:51:37 +10:00
Ronald BarendseandGitHub af4e3ca1a6 NRT amends for WithCollectionBuilder to improve API (#12387)
* Remove WithCollectionBuilder nullability to improve API

* Fix TryGetValue nullable out type
2022-05-10 19:29:55 +02:00
Mads Rasmussen 20c3799e5b add overlay to allow editing invariant properties from all languages 2022-05-10 16:12:58 +02:00
Nikolaj Geisle e78794c00e Start work on allowing nodes for users per language 2022-05-10 15:57:13 +02:00
Nikolaj Geisle 0d16de1b64 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/variant-permissions 2022-05-10 15:34:46 +02:00
Nikolaj Geisle eda9328f99 Dissallow users to save languages they do not have access to 2022-05-10 14:57:58 +02:00
Mads Rasmussen 23bb172be0 add icon for languages 2022-05-10 13:10:23 +02:00
Mads Rasmussen 08dedf57c5 change help text to limit 2022-05-10 12:45:36 +02:00
Mads Rasmussen 855f83ee1f Merge branch 'v10/feature/variant-permissions' of https://github.com/umbraco/Umbraco-CMS into v10/feature/variant-permissions 2022-05-10 12:40:15 +02:00
Mads Rasmussen 4dd4f190e3 Move languages underneath sections 2022-05-10 12:40:03 +02:00
Nikolaj Geisle 3bbfc427fc Fix breaking change in mapping 2022-05-10 12:37:52 +02:00
Nikolaj Geisle 52f17cd25f Remove defaulting to return all languages 2022-05-10 12:33:09 +02:00
Nikolaj Geisle 1638cfcf40 Merge remote-tracking branch 'origin/v10/feature/variant-permissions' into v10/feature/variant-permissions 2022-05-10 12:30:33 +02:00
Nikolaj Geisle 16d74d016c Fix PerformGetAll 2022-05-10 12:30:25 +02:00
Mads Rasmussen 58a915d2f7 wire up remove language 2022-05-10 12:16:32 +02:00
Mads Rasmussen 2e100e60c4 read from languages - save to allowedLanguages 2022-05-10 11:39:39 +02:00
Nikolaj Geisle 5c2b0121ba Create new table in database for usergroup languages 2022-05-10 11:03:31 +02:00
Bjarke Berg 1e3b806bd8 Merge remote-tracking branch 'origin/v10/10.0' into v10/dev
# Conflicts:
#	src/Umbraco.Core/Deploy/IValueConnector.cs
2022-05-10 09:56:17 +02:00
Andy ButlandandBjarke Berg 62fb7a6f19 Fixed issue with null reference when obtaining a lock using a detached scope.
(cherry picked from commit 02cd139770)
2022-05-10 09:51:18 +02:00
Andy ButlandandBjarke Berg 5810c2d35b Further NRT updates for Deploy (#12375)
* Nullability modifications to grid cell values and connector.

* Nullable updates to IDataTypeConfigurationConnector.

* Apply suggestions from code review

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

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
(cherry picked from commit 109d2f191e)
2022-05-10 09:51:01 +02:00
Andy ButlandandBjarke Berg ea77c9a4fc Further NRT amends (#12363)
* Amended nullability of base Deploy classes.

* Ensured ContentItemDisplay.Variants is non-nullable.

* Set IArtifactSignature.Dependencies to be non-nullable.

* Update template collection retrieval to be non-nullable.

* IMediaService.GetRootMedia to be non-nullable.

* Non-nullable collection for IMemberService.GetMembersByMemberType.

* Non-nullable collection for member role retrieval.

* Non-nullable collection for root dictionary items.

* Non-nullable collection for child dictionary items.

* Applied suggestions from code review

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

* Remove extra dot

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
(cherry picked from commit 63b77b7743)
2022-05-10 09:50:50 +02:00
Andy ButlandandBjarke Berg fbdf704567 Further amends to NRT definitions (#12356)
* Ensured all GetContainers methods in IDataTypeService return non-nullable collections.

* Further amends to ensure services return non-nullable collections.

* Aligned nullability of IMediaService.GetMediaFileContentStream(string

* Removed return of nullable streams from IFileService.

* Fixed nullability mismatch.

(cherry picked from commit 735086a747)
2022-05-10 09:50:41 +02:00
Andy ButlandandBjarke Berg b1ece9b202 NRT amends necessary for Deploy (#12357)
* Allowed null item retrievel in IDeployContext.

* Allowed null item retrievel in IImageSourceParser.

* Allowed null item retrievel in IMacroParser.

* Set null syntax for other Deploy interfaces.

(cherry picked from commit a42ff2c267)
2022-05-10 09:50:35 +02:00
Mads Rasmussen b75752e9a6 post array of language id's when saving 2022-05-09 15:38:40 +02:00
Mads Rasmussen a0eeb6da26 save to allowedLanguages 2022-05-09 14:31:02 +02:00
Mads Rasmussen 98de8499e0 read from allowedLanguages 2022-05-09 14:30:46 +02:00
Nikolaj Geisle a5df4f169b Fix test error 2022-05-09 13:35:23 +02:00
9326cc5fc6 Use SnippetCollection to when working with snippets (#12355)
* Introducing a new Snippet type

* Adding a SnippetCollection and SnippetCollectionBuilder

* Using snippetCollection to get the snippets instead of fileService

* Fixed fetching the correct content

* Make ISnippet non-discoverable

* Split the SnippetCollection into PartialViewSnippetCollection and PartialViewMacroSnippetCollection

* Update CodeFileController to use the 2 snippet collections

* Display the names with Empty.cshtml on top

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

* Fix naming

* Fix another naming

* Cleanup + Use base items

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-05-09 11:42:10 +02:00
Mads Rasmussen f095797c2e Merge branch 'v10/feature/readonly-property-editors' into v10/feature/variant-permissions 2022-05-09 11:20:28 +02:00
Bjarke Berg 22d11d23df Merge remote-tracking branch 'origin/v10/dev' into v10/contrib 2022-05-09 11:12:02 +02:00
Bjarke Berg f5d7b5c2c7 Merge remote-tracking branch 'origin/v10/10.0' into v10/dev
# Conflicts:
#	src/Umbraco.Web.Common/Hosting/UmbracoHostBuilderDecorator.cs
2022-05-09 11:09:46 +02:00
Mads Rasmussen 4ba094ff75 Merge branch 'v10/dev' into v10/feature/variant-permissions 2022-05-09 11:08:04 +02:00
Paul Johnson 4ab7f40ce5 Disable connection pooling for initial SQLite database create. 2022-05-09 09:52:16 +01:00
c576bbea03 v10: Fix build warnings in Web.Common (#12349)
* Run code cleanup

* Run dotnet format

* Start manual cleanup in Web.Common

* Finish up manual cleanup

* Fix tests

* Fix up InMemoryModelFactory.cs

* Inject proper macroRenderer

* Update src/Umbraco.Web.Common/Filters/JsonDateTimeFormatAttribute.cs

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

* Update src/Umbraco.Web.Common/Filters/ValidateUmbracoFormRouteStringAttribute.cs

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

* Fix based on review

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-05-09 09:39:46 +02:00
Andy Butland 02cd139770 Fixed issue with null reference when obtaining a lock using a detached scope. 2022-05-07 12:06:33 +02:00
109d2f191e Further NRT updates for Deploy (#12375)
* Nullability modifications to grid cell values and connector.

* Nullable updates to IDataTypeConfigurationConnector.

* Apply suggestions from code review

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

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-05-06 18:04:26 +02:00
4f3d680f06 V10: Build warnings in Web.Website (#12332)
* add new rule to globalconfig

* Fix warnings in Web.Website

* Fix more warnings in Web.Website

* Fix more build warnings in Web.Website

* Fix more warnings in Web.Website

* Fix tests

* Fix proper constructor call

* Fix not being able to run project

* Fix Obsolete method

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-05-06 15:06:39 +02:00
Bjarke BergandGitHub b648177a40 Use static global id in pipelines (#12370) 2022-05-06 15:05:08 +02:00
Paul JohnsonandGitHub e4ff14e17d Ensure correct instance returned from UmbracoHostBuilderDecorator (#12373) 2022-05-06 11:15:34 +01:00
Paul Johnson e4ed87fb9a Ensure correct instance returned from UmbracoHostBuilderDecorator 2022-05-06 10:38:30 +01:00
Paul Johnson e4450d650a Include default favicon for new projects
Bonus - ensures wwwroot exists for first boot.
2022-05-06 10:06:48 +01:00
63b77b7743 Further NRT amends (#12363)
* Amended nullability of base Deploy classes.

* Ensured ContentItemDisplay.Variants is non-nullable.

* Set IArtifactSignature.Dependencies to be non-nullable.

* Update template collection retrieval to be non-nullable.

* IMediaService.GetRootMedia to be non-nullable.

* Non-nullable collection for IMemberService.GetMembersByMemberType.

* Non-nullable collection for member role retrieval.

* Non-nullable collection for root dictionary items.

* Non-nullable collection for child dictionary items.

* Applied suggestions from code review

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

* Remove extra dot

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-05-06 10:13:58 +02:00
Paul Johnson 948992cc75 Include default favicon for new projects
Bonus - ensures wwwroot exists for first boot.
2022-05-06 08:36:05 +01:00
Henk Jan PluimandMichael Latouche 7993d19c1b #fix 12254 return emptyresult 2022-05-05 15:16:45 +02:00
Andy ButlandandGitHub 5be156bb22 Ensured container collections retrieved from content type services return empty rather than nullable. (#12360)
* Ensured container collections retrieved from content type services return empty rather than nullable.

* Reverted change to ILocalLinkParser.

* Reverted change to ILocalLinkParser (2).

* Update GetByParentOrChildId in IRelationService to return non-nullable result.

* Added obsoleted constructor due to change in MemberTypeService.

* Updated nullability of Compare method parameters in IServiceConnector.

* Adjusted nullability of method on IValueConnector.

* Removed nullability of ArtifactDeployState.
2022-05-05 12:56:44 +02:00
Jacob OvergaardandGitHub e96c75dc85 update nouislider to 15.6.0 (#12353) 2022-05-05 09:51:57 +02:00
Andy ButlandandGitHub 735086a747 Further amends to NRT definitions (#12356)
* Ensured all GetContainers methods in IDataTypeService return non-nullable collections.

* Further amends to ensure services return non-nullable collections.

* Aligned nullability of IMediaService.GetMediaFileContentStream(string

* Removed return of nullable streams from IFileService.

* Fixed nullability mismatch.
2022-05-04 19:05:10 +02:00
Andy ButlandandGitHub a42ff2c267 NRT amends necessary for Deploy (#12357)
* Allowed null item retrievel in IDeployContext.

* Allowed null item retrievel in IImageSourceParser.

* Allowed null item retrievel in IMacroParser.

* Set null syntax for other Deploy interfaces.
2022-05-04 19:01:54 +02:00
Mads Rasmussen b220c0e2cf add readonly mode for grid property editor 2022-05-04 16:40:58 +02:00
Mads Rasmussen 3c6fa43fa8 add readonly mode for block list property editor 2022-05-04 15:29:58 +02:00
Bjarke Berg a676322fee Merge remote-tracking branch 'origin/v10/10.0' into v10/contrib 2022-05-04 14:27:35 +02:00
Mads Rasmussen c09acf4a1b fix temp readonly check 2022-05-04 13:53:01 +02:00
Mads Rasmussen f4da7262d5 add readonly mode for list view property editor 2022-05-04 13:52:46 +02:00
Mads Rasmussen a9c6d98c85 add readonly mode for rich text editor property editor 2022-05-04 12:38:27 +02:00
Paul Johnson 09b210d5de Hack fix - SQLite deadlock issue for login after session timeout. 2022-05-04 10:13:27 +01:00
Bjarke Berg 6752f4b2c6 Fixed issue with missing auto complete 2022-05-04 10:10:14 +02:00
Bjarke BergandGitHub 5636d4baf7 Fixed namespace that was original an incorrect merge from v8 to v9 (#12347) 2022-05-04 08:10:27 +02:00
Ronald BarendseandGitHub 14d3cd7163 v10: Fix LESS math (#12346)
* Fix LESS math parens-division

* Fix LESS math strict
2022-05-04 05:56:29 +02:00
Bjarke Berg 49cec5c66c Merge remote-tracking branch 'origin/v10/10.0' into v10/dev 2022-05-03 21:36:45 +02:00
Bjarke Berg 84c1799049 Merge remote-tracking branch 'origin/v10/contrib' into v10/dev 2022-05-03 21:36:30 +02:00
ChadandGitHub ae54cb9947 v10: Improve redirect content finder scalability (#12341)
* Async support for content finders. Improve log performance.

* Improve redirect contentfinder scalablilty with async calls to the database
2022-05-03 21:35:33 +02:00
ChadandGitHub 0561d4b5a1 Async support for content finders. Improve log performance. (#12340) 2022-05-03 21:29:15 +02:00
Bjarke Berg daac1a4bac Merge remote-tracking branch 'origin/v10/contrib' into v10/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
2022-05-03 21:17:10 +02:00
ChadandGitHub 9f4ff0a398 async tree search (#12344) 2022-05-03 21:13:27 +02:00
Bjarke Berg 48065c4570 Clean up 2022-05-03 19:38:39 +02:00
Ronald BarendseandGitHub 23072a500c v10: Fix Block List settings exception and optimize PVCs (#12342)
* Don't use MapModelType to get model type

* Optimize block list item activation (cache constructors)

* Fix exceptions in NestedContentSingleValueConverter (zero content types or multiple stored items)

* Add IPublishedModelFactory.GetModelType method to remove work-around
2022-05-03 19:23:15 +02:00
Mads Rasmussen 382d91c461 add readonly mode for markdown property editor 2022-05-03 17:36:38 +02:00
bc49fa5b3f Move default item excludes to root package (#12339)
* Moved DefaultItemExcludes to Umbraco.CMS package

* Use exact path to build props

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-05-03 17:15:38 +02:00
Mads Rasmussen f2780d5478 add readonly mode for image cropper 2022-05-03 16:14:58 +02:00
Mads Rasmussen 5609142317 remove unused listeners 2022-05-03 15:24:47 +02:00
Mads Rasmussen 231deb182e add readonly mode for dropdown property editor 2022-05-03 15:23:35 +02:00
Mads Rasmussen e1187135b4 add readonly mode for nested content property editor 2022-05-03 15:11:50 +02:00
Mads Rasmussen 49ef5401e9 add readonly mode for tags property editor 2022-05-03 14:06:24 +02:00
Mads Rasmussen 44a3a7dd97 add readonly mode to media picker property editor 2022-05-03 13:40:01 +02:00
957a9b8016 Bugfix: Read snippets from embedded resources.. (#12334)
* update new location of anime.js

* set new location of 'diff' and update to new global Diff vs JsDiff

* Embedded snippets

* Do not copy an empty folder

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-05-03 13:29:31 +02:00
Ronald Barendse 5d04d7af76 Ignore App_Code and App_Plugins again to ease testing/branch switching 2022-05-03 13:28:08 +02:00
Mads Rasmussen 11ba194049 Update fileupload.html 2022-05-03 12:59:48 +02:00
Mads Rasmussen 285aee8315 add readonly mode for file upload property editor 2022-05-03 12:59:13 +02:00
699626a650 Bugfix: Reintroduces DefaultItemExcludes in Umbraco.Cms.StaticAssets (#12335)
* DefaultItemExcludes from Umbraco.Cms.StaticAssets

* Update src/Umbraco.Cms.StaticAssets/Umbraco.Cms.StaticAssets.csproj

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

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-05-03 12:35:52 +02:00
Jacob OvergaardandGitHub 250f99be3e v10: Update locations of npm dependencies (#12333)
* update new location of anime.js

* set new location of 'diff' and update to new global Diff vs JsDiff
2022-05-03 11:49:01 +02:00
Ronald Barendse 4a635198f6 Ignore Umbraco.Cms.StaticAssets build output and use proper directory/case matching 2022-05-03 11:11:23 +02:00
Bjarke Berg c380891c83 Removes SqlCE from template 2022-05-03 09:24:29 +02:00
dependabot[bot]andNathan Woulfe beeaa35320 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-05-03 09:19:59 +10:00
Bjarne FyrstenborgandGitHub 0b48a2c8b7 Limit link picker to content tree in content section (#12311)
* Remove unused injected mediaHelper

* Limit tree to content tree alias in content section
2022-05-03 09:17:58 +10:00
RussellandNathan Woulfe 8baa66b8f3 Fix for Issue 12262
Fixes issue https://github.com/umbraco/Umbraco-CMS/issues/12262
2022-05-03 09:14:50 +10:00
Mads Rasmussen e87b45574b add readonly mode for date picker property editor 2022-05-02 21:43:10 +02:00
Mads Rasmussen 3d9828fa5b add readonly mode for slider property editor 2022-05-02 21:32:52 +02:00
Mads Rasmussen 5b002f0888 add readonly mode til content picker / multinode tree picker property editor 2022-05-02 19:57:49 +02:00
Bjarke BergandGitHub 13f6d4791c Move umbraco views to static assets and make that an RCL + Embedded language files (#12324)
* RCL for static assets to replace the nuspec

* Fix build

* Fix unit tests

* clean up in build.ps1

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

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

* fixed namespace

* cleanup

* Set root variable

* Added static assets

* Experimenting with StaticWebAssetBasePath

* Embedded lang files into Umbraco.Core

* Removed legacy test. New test can be implemented instead

* Fixed tests

* clean up

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

* Save custom language name in controller

* Rewrite AngularJS language edit view and controller

* Cleanup language overview

* Remove icon from language overview

* Make styling of control group the same as properties

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

* Use new language model constructor

* Update tests to use new language constructor

* Update culture name in dictionary package export

* Use language name in dictionary

* Fix language nullability issues

* Cleanup GetAllCultures and added null checks

* Re-add obsolete constructors

* Make language name required and update Cypress test

* Fix routing/saveNewLanguages Cypress test

* Make language name optional (improved backwards compatibility)

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

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

* Fixed issue with values being passed into nested lists.

* Fixed issue in test

* Updated to examine beta.9

* Fixed breaking changes
2022-05-02 14:11:46 +02:00
Bjarke Berg 4bc5d31dfe Merged IMemberSignInManagerExternalLogins into IMemberSignInManager 2022-05-02 12:32:25 +02:00
Andy ButlandandGitHub 46373ebfb0 Allowed IfNullOrWhiteSpace to take null input. (#12328) 2022-05-02 12:21:57 +02:00
140029c38c v10: npm updates for april (#12288)
* Upgraded MailKit

* Upgraded Microsoft.* packages

* Upgrades various nuget packages to latest version

* Upgrades various nuget packages related to test

* update package-lock.json to new npm format

* bump all angular dependencies to latest 1.8.3

* bump jquery to 3.6.0

* remove dubious 'npm' dependency and set engines versions to avoid warnings

* bump signalr dependency from v3 to v6

* bump 'underscore' from 1.12.1 to 1.13.1

* bump 'diff' from 3.5.0 to 5.0.0

* bump 'clipboard' from 2.0.4 to 2.0.10

* bump 'flatpickr' from 4.6.9 to 4.6.13

* bump 'moment' from 2.22.2 to 2.29.3

* bump 'spectrum-colorpicker2' from 2.0.8 to 2.0.9

* bump 'underscore' from 1.13.1 to 1.13.2

* update 'less' 'autoprefixer' 'cssnano' and accompanying gulp tasks to latest

* bump all gulp dependencies

except gulp-imagemin since we do not yet support esmodules in the backoffice client

* remove 'fs' since the package is marked as malicious and do not seem to be used

* update AcceptanceTests lockfile to latest npm + dependency updates

* bump '@babel/core' from 7.17.5 to 7.17.9

* bump karma dependencies to latest

* bump 'animejs' from 2.2.0 to 3.2.1

* bump 'jasmine-core' from 3.5.0 to 4.1.0

* remove deduped 'caniuse-lite'

* bump wicg-inert from ^3.0.2 to 3.1.1

* bump 'nouislider' from 15.5.0 to 15.5.1

* add slight delay for confirmation overlay

* ignore postinstall task for acceptance tests since env file is generated manually

* upgrade cypress to 9.5.4

* add wait step to content.ts tests

* Revert "ignore postinstall task for acceptance tests since env file is generated manually"

This reverts commit 61acebfda2.

* increate wait amount of content rollback tests

* Revert "upgrade cypress to 9.5.4"

This reverts commit 2febf139a4.

* Revert "update AcceptanceTests lockfile to latest npm + dependency updates"

This reverts commit b45d20b3cd.

* update lockfile version

* update umbraco-cypress-testhelpers to latest

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-05-02 12:21:41 +02:00
Bjarke Berg 58cbeac39d Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Directory.Build.props
#	templates/UmbracoPackage/.template.config/template.json
#	templates/UmbracoProject/.template.config/template.json
2022-05-02 11:42:00 +02:00
Mads Rasmussen b40fcd3fe3 add readonly mode to multi url picker property editor 2022-05-02 11:18:10 +02:00
2c3953ae19 Returning all packages from PackagingService so they show in the backoffice (#12322)
* Add pr first response workflow

* Returning all packages from PackagingService so they show in the backoffice

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Paul Johnson <pmj@umbraco.com>
2022-05-02 10:58:53 +02:00
Ronald BarendseandGitHub 09731a9168 v10: Remove LegacyDistinctBy (#12326)
* Obsolete LegacyDistinctBy

* Remove usage of LegacyDistinctBy

* Remove LegacyDistinctBy
2022-05-02 10:57:38 +02:00
Mads Rasmussen b459ee4053 add disabled state to umb-multiple-textbox property editor add button when readonly 2022-05-02 10:54:42 +02:00
nikolajlauridsen bb9fc9b4d8 Merge branch 'v9/9.5' into v9/dev 2022-05-02 10:00:13 +02:00
Andy ButlandandGitHub 96d33201aa Few more NRT tweaks (#12323)
* Amended GetAll() on IDataTypeService to return an empty collection rather than null.

* Added a ClearSessionValue method to ISessionManager (given you can no longer set a value to null).

* Allow for null values in a StatefulNotification.

* Removed obsoletion of synchronous messages on TreeControllerBase.

* Fixed further CS8620 warnings in core project.

* Further fix to nullable warning.

* Aligned nullablility of retreiving tree nodes and menus, synchronously or asynchronously (such that we no longer can get null values, always empty collection objects).
2022-05-01 08:18:09 +02:00
Bjarke Berg d47ae6868b Added nullable to templates 2022-04-29 15:10:29 +02:00
f23b57db65 V10: fix more nullable references (#12321)
* Add Nullable and WarningsAsErrors to Build.props

* Remove Nullable from cs proj, add ImplicitUsings to build.props

* Fix errors in core

* Fix in JsonSchema

* Fix infrastructure

* Add non-ambiguous using

* Fix Web/Lucene

* Fix backoffice

* Fix up new build errors from merge

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-04-29 15:02:36 +02:00
Sebastiaan Janssen 0134199035 Merge branch 'v10/dev' into v10/contrib 2022-04-29 13:56:50 +02:00
Bjarke BergandGitHub 285c7e75a2 https://github.com/umbraco/Umbraco-CMS/issues/12276 (#12295)
Skip surrogate pairs (e.g. emojis) when making clean stings.
2022-04-29 13:46:19 +02:00
Ronald BarendseandGitHub 1a82e0854a v10: Update to ImageSharp v2 (#12185)
* 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
2022-04-29 13:16:24 +02:00
6b5bc7cebd Updated for v10 - Get lang files via FileProviders (and support Razor Class Libraries) (#12313)
* Update localized to get the physical paths on .net 6

* Update src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs

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

* Minor amends for variable naming and to resolve warnings on use of explicit types.

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2022-04-29 12:58:44 +02:00
Mads Rasmussen 6a7b6a48ec add readonly mode to legacy media picker 2022-04-29 12:49:32 +02:00
cf2b9a0f21 V10: Move core services to core project (#12314)
* Move AuditService to core project

* Move two factor login service to core

* Move ServerRegistrationService to core

* Move BasicAuthService to Core project

* Move IdKeyMap to core project

* Added CacheInstructionService to the infrastructure namespace

* Move DataTypeService to core namespace

* Update CacheInstructionService.cs to use CoreScopeProvider

* Move core editors to core

* Move more Property editors and configuration

* Remove obsoleted constructors in internal classes

* Update PropertyEditors to use new ctors

* Fix propertyEditors to use new ctors

* Use the right property editor constructors

* add DI in the property method

* Update grid to use new ctor

* Fix non-assignment of variable

* Apply suggestions from code review

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

* Fix suggestions from code review

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Kevin Jump <kevin@thejumps.co.uk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-04-29 11:52:58 +02:00
Mads Rasmussen 444db1fc4e add readonly mode for radiobutton property editor 2022-04-29 11:04:08 +02:00
Mads Rasmussen c5ea4511cd add readonly mode to umb-radiobutton component 2022-04-29 10:45:11 +02:00
Mads Rasmussen 829618c381 add readonly mode for boolean property editor 2022-04-29 10:24:14 +02:00
Mads Rasmussen 9e21352c0d add readonly mode for checkboxlist property editor 2022-04-29 10:23:43 +02:00
Mads Rasmussen 96e2034d55 add readonly mode for umb-checkbox component 2022-04-29 10:23:15 +02:00
Jacob Overgaard 58f327f0e5 Add translations for new language picker 2022-04-29 09:45:55 +02:00
Jacob Overgaard 28dedaa74e Set languages header 2022-04-29 09:45:45 +02:00
Jacob Overgaard 32a3fb9f60 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/variant-permissions 2022-04-29 09:27:08 +02:00
Bjarke BergandGitHub 41662c4cff Use static id for acceptance tests (#12318) 2022-04-29 09:26:03 +02:00
Jacob Overgaard 80a180238a add frontend controls for language picker in user groups 2022-04-29 09:10:12 +02:00
Jacob Overgaard f831af207b add basic structure for languages and allowedLanguages 2022-04-29 09:09:40 +02:00
Andy ButlandandGitHub b187c89113 Updates to null reference types (#12317)
* Amended IFileSystem OpenFile to return Stream.Null rather than a nullable stream.

* Updated IUmbracoMapper to map enumerables without null elements given non-null inputs.

* Amended EntityRepositoryBase to not return null collections.

* Made IPublishedElement.Properties a non-nullable collection.
2022-04-29 08:19:34 +02:00
Mads Rasmussen b4131cbaea temp check for read only mode 2022-04-28 16:14:29 +02:00
Mads Rasmussen 10b231f3f9 add readonly mode to member picker property editor 2022-04-28 16:13:58 +02:00
Mads Rasmussen 5c0178213c add readonly mode for user picker 2022-04-28 16:04:55 +02:00
Mads Rasmussen 4ebc3a411a add readonly mode to member group picker 2022-04-28 15:49:00 +02:00
Mads Rasmussen 781cac38d3 add disabled state to umb-node-preview-add buttton 2022-04-28 15:48:14 +02:00
Mads Rasmussen 21eceb4ec9 add readonly mode for multiple textbox property editor 2022-04-28 15:17:45 +02:00
Mads Rasmussen 1257c232a9 add readonly mode to eye dropper property editor 2022-04-28 14:49:53 +02:00
Mads Rasmussen b5e187040d add readonly mode to color picker component 2022-04-28 14:49:17 +02:00
Mads Rasmussen 749aa8f68d show not-allowed cursor for readonly color picker 2022-04-28 13:20:59 +02:00
Mads Rasmussen 8923d1a7f5 add readonly mode for color picker property editor 2022-04-28 13:20:11 +02:00
Mads Rasmussen 50b17ed262 add readonly mode for color swatches component 2022-04-28 13:19:48 +02:00
Mads Rasmussen 2235dd8e8a add readonly mode for umb-toggle component 2022-04-28 13:09:28 +02:00
Paul JohnsonandGitHub 5e2f26ac9b Undo some easy to resolve (no longer netstd2.0 TFM) breaking changes (#12316)
* Undo some easy to resolve (no longer netstd2.0 TFM) breaking changes

* Restore missing ctor to PublishedSnapshotServiceEventHandler
2022-04-28 11:55:22 +01:00
Mads Rasmussen 232ada71a8 add readonly to email property editor 2022-04-28 12:44:31 +02:00
Mads Rasmussen 8d9977e016 add readonly to decimal property editor 2022-04-28 12:42:52 +02:00
Mads Rasmussen fae802ac5f add readonly to integer property editor 2022-04-28 12:41:55 +02:00
Mads Rasmussen 19b5157739 add readonly to textarea 2022-04-28 12:40:36 +02:00
Mads Rasmussen 607f0ea67f add readonly state to textbox 2022-04-28 12:39:12 +02:00
Mads Rasmussen 41ba4592ce set readonly state in a property editor when the readonly attr is set on the component 2022-04-28 12:38:35 +02:00
95aa143db0 v10 make migration from v9 less painful WRT IScope (#12293)
* Restore IEventDispatcher

* Fix breaking changes WRT IScopeProvider and IScope

* Update internal usage.

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

* Better obsolete message

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-04-26 10:22:37 +01:00
Bjarke Berg ef128f9fab Merge remote-tracking branch 'origin/v9/dev' into v10/dev 2022-04-26 11:19:26 +02:00
Andy ButlandandGitHub c9b8ebc6f8 Updated references to latest versions of Forms and Deploy in JSONSchema project. (#12305) 2022-04-26 11:15:11 +02:00
Sebastiaan Janssen cdc2b6aaaa Merge branch 'v10/dev' into v10/contrib 2022-04-26 10:35:36 +02:00
Sebastiaan Janssen 77ebc22b5b Merge branch 'v9/dev' into v10/dev 2022-04-26 10:35:09 +02:00
Sebastiaan Janssen c1d8052ad6 Merge branch 'v9/dev' into v10/contrib 2022-04-26 10:34:35 +02:00
Sebastiaan Janssen d5371a15f5 Fix PR first response to work for outside contributors too 2022-04-26 10:28:00 +02:00
7483a706ac V9/feature/log telemetry level changing (#12299)
* Add logging to SetConsentLevel

* Obsolete old ctor and change logging to email

* Fixed a few issues with MetricsConsentService logging

* Fixed null check

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-04-26 08:50:50 +02:00
Jacob Overgaard 23c85dea7a add languagepicker infinite editor 2022-04-26 08:50:45 +02:00
Paul JohnsonandGitHub 551f523079 V10 - Reduce usage of temp AspNetCoreHostingEnvironment (#12270)
* Move MapPathWebRoot & MapPathContentRoot to extension methods.

* Set AspNetCoreHostingEnvironment ApplicationId without service provider.

* Drop some usages of TempHostingEnvironment

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

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

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

* Setup logging without IHostingEnvironment

* Mark IUmbracoBuilder.BuilderHostingEnvironment obsolete
And remove internal usages.

* Typeloader no longer uses umbraco-types.list

* Added UmbracoHost - setup serilog two-stage init.

* Add ApplicationIdEnricher

* Defensive tweaks for those not using UmbracoHost

* Drop UmbracoHost static class

* Setup runtime logger without host builder extensions.

* Prevent RefreshingRazorViewEngine related explosions

* Filescoped namespaces for new classes.

* Apply suggestions from code review
2022-04-25 16:27:53 +02:00
Paul Johnson 6fa79deed0 Merge branch 'v10/dev' into v10/contrib 2022-04-25 12:44:19 +01:00
f9840ed4b1 Updates the background image in the installer (#12291)
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-04-25 10:26:42 +02:00
Paul JohnsonandGitHub 2df6c937fd Fix flakey write lock test. (#12294)
And reduce logging noise.
2022-04-25 09:33:03 +02:00
Bjarke Berg c0c9c50e21 Merge remote-tracking branch 'origin/v10/dev' into v10/contrib 2022-04-22 15:03:37 +02:00
Bjarke Berg 34f6ed21d6 Merge remote-tracking branch 'origin/v9/dev' into v10/dev 2022-04-22 15:01:11 +02:00
Bjarke Berg 7474eaa0d8 Merge remote-tracking branch 'origin/v9/9.5' into v9/dev 2022-04-22 14:59:56 +02:00
Bjarke Berg c441a26dc7 Merge remote-tracking branch 'origin/v9/dev' into v10/dev 2022-04-22 14:28:56 +02:00
Bjarke Berg d1fcacb442 Merge remote-tracking branch 'origin/v9/9.5' into v9/dev 2022-04-22 14:28:07 +02:00
Nikolaj GeisleandGitHub a5b41b3133 Merge pull request #12221 from umbraco/v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
v10: Nullable reference types in Umbraco.web.backoffice
2022-04-22 13:57:52 +02:00
Nikolaj Geisle 83419a30ea Fix build errors after merging 2022-04-22 12:37:20 +02:00
Nikolaj Geisle 70a75d8c9b Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs
#	src/Umbraco.Core/Models/Member.cs
#	src/Umbraco.Core/Models/Membership/User.cs
#	src/Umbraco.Core/Services/MemberService.cs
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
#	src/Umbraco.Infrastructure/Security/MemberUserStore.cs
2022-04-22 12:32:57 +02:00
Nikolaj Geisle 001f7035f3 Fix nullability of username 2022-04-22 09:52:07 +02:00
Nikolaj GeisleandGitHub fd8750f99a Try fixing flaky language test (#12281) 2022-04-22 09:26:12 +02:00
Bjarke BergandGitHub 379d2e3e4e Dependency updates (#12283)
* Upgraded MailKit

* Upgraded Microsoft.* packages

* Upgrades various nuget packages to latest version

* Upgrades various nuget packages related to test
2022-04-22 09:24:30 +02:00
Nikolaj GeisleandGitHub 8e4fd36442 Merge pull request #12206 from KevinJump/v9/localizedtext-via-fileprovider
Get lang files via FileProviders (and support Razor Class Libraries)
2022-04-22 08:14:46 +02:00
7df4f84247 V10: Migrate member properties to columns on the member table (#12205)
* Add new columns to the member table

* Add missing IsApproved column

* Add joins with nested query

* Add query for selecting new column values from existing members

* Update the member data from the same query

* Make escapes work for sqlite

* Use GetFieldNameForUpdate instead of GetFieldName

* Left join on memberDto

* Remove the now unused property types and data

* Don't create member columns as properties anymore

* Store old properties in fields on member

Also switch the dates to nullable since they can be null

* Map columns when mapping from DTO to Member object

* Display columns in the member content app

* Fix null exception when creating new user

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

* Remove hardcoded member properties

* Obsolete old member alias constants

* Map and persist member properties

* Correctly update LastLogin when member logs in

* Map IsApproved and IsLockedOut when saving member in backoffice

* Update the query mappers for members

* Fix member service tracks dirty changes test

* Remove no longer existing property types from member type builder

* Fix null error in UpdateMemberProperties

* Fix builder tests

* Fix SetupMemberTestData in MemberControllerUnitTests

* Let LastLoginDate be null and handle check in controller

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

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

* Obsolete old label constants

* Fix whitespace post merge

* Fix up test comments

* Apply suggestions from code review

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

* Fix member properties always being sensitive

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2022-04-21 14:47:27 +02:00
Sebastiaan Janssen 39423d039d Merge branch 'v10/dev' into v10/contrib
# Conflicts:
#	.github/workflows/pr-first-response.yml
2022-04-21 14:38:31 +02:00
Sebastiaan Janssen 6d0a0fff9c Merge branch 'v9/dev' into v10/dev 2022-04-21 14:37:28 +02:00
Sebastiaan Janssen 5f168b59d5 Merge branch 'v9/contrib' into v9/dev 2022-04-21 14:37:02 +02:00
Sebastiaan JanssenandGitHub 16a02e0827 Update pr-first-response.yml 2022-04-21 14:36:19 +02:00
MoleandGitHub 9b864ddbeb Fix member properties always being sensitive (#12282) 2022-04-21 13:51:24 +02:00
Nikolaj Geisle b67810cc69 Fix new warnings 2022-04-21 11:20:12 +02:00
Nikolaj Geisle 060e0181a7 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs
#	src/Umbraco.Core/Extensions/PublishedContentExtensions.cs
#	src/Umbraco.Core/Telemetry/Models/TelemetryReportData.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs
#	src/Umbraco.PublishedCache.NuCache/ContentStore.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberTypeTreeController.cs
#	src/Umbraco.Web.Common/ModelsBuilder/InMemoryModelFactory.cs
#	src/Umbraco.Web.Common/Security/MemberManager.cs
#	src/Umbraco.Web.Website/Routing/ControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/IControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs
2022-04-21 10:26:51 +02:00
Nikolaj GeisleandGitHub c13f01b402 Update src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.LocalizedText.cs 2022-04-21 09:10:33 +02:00
Nikolaj Geisle c72a4ff188 Fix coordinates.HasValues check 2022-04-21 08:32:59 +02:00
Bjarke BergandGitHub 536440b729 Merge pull request #12277 from umbraco/v10/feature/merge-v9dev_20_04_2022
Merge v9dev into v10 20-04-2022
2022-04-21 08:02:28 +02:00
Bjarke Berg 2f1cb4b20a Fix build/tests + cleanup duplicate dependencies 2022-04-20 15:54:09 +02:00
Bjarke Berg b19dab5f3a Fix merge issues 2022-04-20 15:42:27 +02:00
Sebastiaan Janssen 78786e942f Add pr first response workflow 2022-04-20 12:43:59 +02:00
Bjarke Berg 23a49161d6 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/build.ps1
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/dotnetcli.host.json
#	build/templates/UmbracoProject/.template.config/ide.host.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Umbraco.Core/Constants-System.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	umbraco-netcore-only.sln
2022-04-20 11:09:28 +02:00
Bjarke Berg 7becf76a02 Added notification when requires user 2fa, so implementors can use this to send emails etc. 2022-04-20 10:56:15 +02:00
Nikolaj Geisle 0d600d6677 Dont return nullable lists 2022-04-20 08:42:06 +02:00
Nikolaj Geisle 927d687192 Fix bad null check 2022-04-20 08:38:14 +02:00
VWA Software internetandSebastiaan Janssen 7e6e9c7431 Include the PluginController Area when searching for matching surface… (#12218) 2022-04-19 17:58:59 +02:00
VWA Software internetandGitHub eb0ddbd729 Include the PluginController Area when searching for matching surface… (#12218) 2022-04-19 14:04:11 +02:00
Nikolaj Geisle 8865c5d486 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice 2022-04-05 11:25:52 +02:00
Paul Johnson d036c6a118 Fix tests when running filtered set (SQL Server)
Without InstallDefaultDataSettings DatabaseSchemaCreator makes use of
static service locator which isn't wired up in time.
2022-04-05 10:18:04 +01:00
Nikolaj Geisle 76c525b611 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice 2022-04-05 11:11:44 +02:00
Paul Johnson c34479c2bb Fix tests when running filtered set.
Without InstallDefaultDataSettings DatabaseSchemaCreator makes use of
static service locator which isn't wired up in time.
2022-04-05 10:04:39 +01:00
Nikolaj Geisle b6402c4cc8 Fix build errors after merge 2022-04-05 09:46:47 +02:00
Nikolaj Geisle a6128bfe8e Merge branch 'v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/Cache/MacroCacheRefresher.cs
#	src/Umbraco.Core/Services/MacroService.cs
#	src/Umbraco.Core/StaticApplicationLogging.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Infrastructure/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Infrastructure/Security/UmbracoPasswordHasher.cs
#	src/Umbraco.Web.BackOffice/Controllers/ImagesController.cs
2022-04-05 08:51:08 +02:00
Nikolaj Geisle acf60ce84c Update csproj to nullable 2022-04-04 15:02:53 +02:00
Nikolaj Geisle 7994f5c326 Add nullability to Web.Website, Sqlite & SqlServer 2022-04-04 14:47:54 +02:00
Nikolaj Geisle 4710951185 fix build errors 2022-04-04 12:45:06 +02:00
Nikolaj Geisle 57190fc676 Fix BackOfficeServerVariables 2022-04-04 09:50:32 +02:00
Nikolaj Geisle 0a7e698883 Fix non-nullable array to nullable 2022-04-04 09:21:52 +02:00
Nikolaj Geisle c6e7e139e9 Fix up build errors 2022-04-01 14:49:39 +02:00
Nikolaj Geisle 70a00901b4 Finish up Web.Backoffice 2022-04-01 14:35:18 +02:00
Paul JohnsonandGitHub d12602ec90 v10 - SQLite database creation enhancements (#12166)
* Resolve issues creating database file for new install on app services.

* Prevent accidental create of SQLite database when testing connections

* Fix e2e tests against sqlite db
2022-04-01 11:15:04 +02:00
Nikolaj Geisle 1a6f0e4d7b Start work on controllers 2022-04-01 11:09:51 +02:00
Kevin Jump e64f051f8b Make the user defined languages also use the FileProvider. 2022-04-01 09:55:28 +01:00
Kevin Jump a7ed20918b Move SupplemenataryLocalizedTextSources to Backoffice and use File provider. 2022-03-31 22:36:34 +01:00
Nikolaj Geisle 0fc310cc4e start work on controllers 2022-03-31 15:57:23 +02:00
Nikolaj Geisle 0993f7b073 Add so only controllers are left 2022-03-31 14:39:44 +02:00
Nikolaj Geisle e3a21823b4 Add nullability to filters 2022-03-31 14:39:02 +02:00
Nikolaj Geisle 4571ecb0e3 More work on nullable reference types 2022-03-31 14:35:23 +02:00
Nikolaj Geisle 2460c82e02 Fix trees 2022-03-31 12:52:26 +02:00
Bjarke Berg fe1c2f5d4f Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/HealthCheckNotifier.cs
#	src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs
#	src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs
#	tests/Umbraco.Tests.Integration.SqlCe/Umbraco.Infrastructure/Persistence/DatabaseBuilderTests.cs
#	tests/Umbraco.Tests.Integration/Testing/BaseTestDatabase.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SchemaValidationTest.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SqlServerTableByTableTest.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Components/ComponentTests.cs
2022-03-31 12:51:55 +02:00
Nikolaj Geisle 57ed0b7b4d start work on the backoffice project 2022-03-30 15:58:46 +02:00
Nikolaj Geisle 05a08bef63 Add nullability to nucache & lucene projects 2022-03-30 13:34:56 +02:00
Nikolaj Geisle b52c4e50cf Add nullability to web.common 2022-03-29 13:44:21 +02:00
Nikolaj Geisle 86ae730b1e fix string.Empty back to null 2022-03-24 12:59:40 +01:00
Nikolaj Geisle b5e4f3b982 fix missing change 2022-03-17 11:16:12 +01:00
Nikolaj Geisle 181b984a28 Fix cypress test 2022-03-17 10:25:59 +01:00
Nikolaj Geisle f78b62fcb6 Fix all build errors 2022-03-17 09:44:45 +01:00
Nikolaj Geisle 34471e35ce Fix some of the build errors after merge 2022-03-17 09:14:12 +01:00
Nikolaj Geisle 214bcceffc Merge v10/dev into infrastructure 2022-03-16 14:39:28 +01:00
Nikolaj Geisle 4ebd20bb66 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco-Core
# Conflicts:
#	build/build.ps1
#	src/Umbraco.Core/Configuration/ConfigConnectionString.cs
#	src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs
#	src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs
#	src/Umbraco.Core/Models/ContentType.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
#	tests/Umbraco.Tests.AcceptanceTest/package.json
2022-03-16 13:00:38 +01:00
3961c4c233 v10 SQLite support + distributed locking abstractions (#11922)
* Created Persistence.SQLite project skeleton.

* SQLite database initialization

* Various changes and hacks to make things work.

* WIP integration tests

* Fix thread safety tests

* Fix tests that relied on tie breaker sorting.

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

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

* Fix test Can_Generate_Delete_SubQuery_Statement

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

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

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

* Fixes for paginated custom order by

* Fix tests broken by lack of unique indexes.

* Fix SqlServerTableByTableTest tests.

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

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

* Fix ValidateLoginSession - SelectTop must come later

* dry up database cleanup

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

* Prevent schema creation errors.

* SQLite ignore lock tests, WAL back on.

* Fix package schema tests

* Fix NPocoFetchTests - case sensitivity not under test

* Fix AdvancedMigrationTests (where possible)

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

If we do that can do some cleanup.

* Cleanup test database configuration

* Run integration tests against SQLite on build agent.

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

* YAML

* Skip Umbraco.Tests.Integration.SqlCe

* Drop SqlServerTableByTable tests.

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

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

* Might aswell run against macOS also.

* Copy azure pipelines task header layout

* Delete SQLCe projects

* Remove SQL CE specific code.

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

* Delete umbraco-netcore-only.sln

* Add SkipTests solution configuration and use for codeql

* Remove reference to deleted nuspec file.

* Refactor ConnectionStrings WRT DataDirectory placeholder & ProviderName.

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

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

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

* Switch to Microsoft.Data.Sqlite

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

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

* Remove SqlServerDbProviderFactoryCreator to cleanup a TODO

* Move SQL Server support to its own class library

* Add persistence dependencies to Umbraco.CMS metapackage

* Bugfix packages delete query

Created invalid query for SQLite.

* Try out cypress tests Linux + SQLite

* Prevent cypress test artifact upload failure on attempt 2+

* LocalDb bugfixes

* Drop redundant enum

* Move SqlClient constant

* Misc whitespace

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

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

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

* Misc remove old comment

* little re-arrange

* Remove almost all usages of IsSqlite extension.

* visual adjustments

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

* use text instead of disabled inputs

* move legend, rename to Install

* Update SqlMainDomLock to work without distributed locks.

* Added IDistributedLockingMechanism interface and in memory impl.

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

* Added SqlServerDistributedLockingMechanism

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

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

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

* Nomplementation -> NoImplementation

* Fix misleading comment

* Integration tests use SqlServerDistributedLockingMechanism when possible

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

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

* Make tests pass for InMemoryDistributedLockingMechanism, pretty hacky.

* Tweak constraints on WithCollectionBuilder so i can drop bad constructor

* Added SqliteDistributedLockingMechanism

* Dropped InMemoryDistributedMechanism + magic

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

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

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

* Fix quick install "" database name.

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

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

* Ensure wal test 2+

* Fix logging inconsistencies.

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

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

* Fix installer database display names

* Allow SQLite shared cache without losing deferred transactions

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

* Fix misc inconsistency in .gitignore

* Prefer our interceptor interface

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

* Back to private cache.

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

* Fix SQL server tests.

* Misc - Orphaned comment, incorrect casing.

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

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2022-03-11 17:14:20 +01:00
Bjarke BergandGitHub a30d24130f Merge pull request #12126 from umbraco/v10/feature/merge_v9.4rc_to_v10
Merge v9.4rc to v10
2022-03-11 11:06:02 +01:00
Bjarke Berg 78b85a44db Merge remote-tracking branch 'origin/v9/dev' into v10/dev 2022-03-10 22:10:00 +01:00
Bjarke Berg 981e66a673 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Core/Telemetry/TelemetryService.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/DashboardController.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ScheduledPublishingTests.cs
2022-03-10 14:36:30 +01:00
Nikolaj Geisle 029aecccb5 update package-lock.json 2022-03-01 08:11:56 +01:00
Erik-Jan WestendorpandGitHub 86b7ea0145 v10: Get all ServerRegistrations (#12072) 2022-02-28 15:54:19 +01:00
Nikolaj Geisle 91a0e670bb update cypress package 2022-02-28 15:43:51 +01:00
Nikolaj Geisle 3a2c53412c Fix last errors 2022-02-28 14:37:15 +01:00
Nikolaj Geisle d845bd68bc Fix more errors 2022-02-28 14:13:21 +01:00
Nikolaj Geisle 915e68e72e Fix last build errors 2022-02-28 13:14:02 +01:00
Warren BuckleyandGitHub bd6334ecdc Dependancy Update: Switch to Serilog.Expressions away from deprecated Serilog.Filters.Expressions (#12000)
* Uninstall Serilog.Filters.Expressions as it is deprecated by the Serilog team

NOTE: This package brought in a dependenacy on a package called SuperPower from Datalust

* Install replacement package Serilog.Expressions

* Update implementation of Serilog.Expressions

* Add new test cases to verify expressions still working

Currently Serilog.Expressions only supports short names such as @x @l @m and @mt as opposed @Exception @Level @Message and @MessageTemplate

* Use Serilog.Expressions NamedFilters extension point, to plug the missing Has() function in expressions that was not ported across by the library

* Update to dev build of Serilog.Expressions to verify new method we can override works

* Update to release build of Serilog.Expressions 3.3.0 now its been pushed to Nuget
2022-02-28 08:48:10 +01:00
Nikolaj Geisle d1cf640f2a more build errors in Core 2022-02-27 21:20:50 +01:00
Paul JohnsonandGitHub 83204edbd4 V10/feature/filesystem maindomlock (#12049)
* Filesystem based MainDomLock & extract interface for MainDomKey generation (#12037)

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

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

* Prevent duplicate runs of ScheduledPublishing during slot swap.

* Add filesystem based MainDomLock

(cherry picked from commit 860c8e8ae2)

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

* Remove obsolete constructors from ScheduledPublishing & SqlMainDomLock

* FileSystemMainDomLock promoted to default fallback for all platforms.

* Various fixes & improvements
2022-02-25 12:06:30 +00:00
Nikolaj Geisle e7b31a22be Fix scope 2022-02-24 15:44:49 +01:00
Nikolaj Geisle 2009f7585b Fix last build errors 2022-02-24 15:28:41 +01:00
Nikolaj Geisle e32ddcd26f Remove SQLCE from sln file 2022-02-24 11:23:32 +01:00
Nikolaj Geisle 3bf2778803 More work on nullable reference types 2022-02-24 10:22:20 +01:00
Nikolaj Geisle ed13237177 Fixing more errors with nullable reference types 2022-02-24 09:24:56 +01:00
Nikolaj Geisle a8cf6ee127 More work on nullable references 2022-02-22 13:35:32 +01:00
Nikolaj Geisle 315e8d6fe6 Merge branch 'v10/feature/nullable-reference-types-in-Umbraco-Core' into v10/feature/nullable-reference-types-in-Umbraco-Infrastructure 2022-02-21 12:51:49 +01:00
Nikolaj Geisle 57f32100cb Fix errors 2022-02-21 12:49:17 +01:00
Nikolaj Geisle f69d264d8d Add more nullability 2022-02-21 10:12:51 +01:00
Bjarke Berg cb44dc70f3 Rollback issues with signatures 2022-02-21 10:06:57 +01:00
Nikolaj Geisle b442a60403 Start work on nullable-reference types in Infrastructure project 2022-02-18 14:32:51 +01:00
Nikolaj Geisle cb3e7706a8 Dont change cs proj to Warning as errors 2022-02-16 16:04:25 +01:00
Nikolaj Geisle 6be2cd45db Use nullability on the rest of core 2022-02-16 16:03:53 +01:00
Nikolaj Geisle 093d336cc7 Fix more nullability errors 2022-02-15 15:48:41 +01:00
Nikolaj Geisle 13b9816ba8 Remove outcommented WarningAsError 2022-02-15 14:42:01 +01:00
Nikolaj Geisle 945b115067 Fix more nullability errors 2022-02-15 14:41:06 +01:00
Nikolaj Geisle 793f8f0de2 Fix error after merge 2022-02-15 09:40:01 +01:00
Nikolaj Geisle 224341a533 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco-Core
# Conflicts:
#	src/Umbraco.Core/Configuration/Models/SecuritySettings.cs
#	src/Umbraco.Core/Events/DeleteEventArgs.cs
#	src/Umbraco.Core/Events/IEventDispatcher.cs
#	src/Umbraco.Core/Events/PassThroughEventDispatcher.cs
#	src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs
#	src/Umbraco.Core/IO/MediaFileManager.cs
#	src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs
#	src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
#	src/Umbraco.Core/Routing/DefaultUrlProvider.cs
2022-02-15 09:29:58 +01:00
Nikolaj Geisle e5dab9d044 uncomment code again 2022-02-15 08:48:18 +01:00
Paul Johnson 548870d59d Fix whitespace in sln
(cherry picked from commit a34e278a40)
2022-02-14 14:47:07 +00:00
Paul Johnson d4dca18cbe Change web projects TargetFrameworkMoniker to 4.5.2 to stop VS 2022 err
(cherry picked from commit 461043bd82)
2022-02-14 14:44:40 +00:00
Nikolaj Geisle ff58531aa5 Fix more acceptance tests 2022-02-14 15:00:22 +01:00
Nikolaj Geisle 8991256306 Fix some of the cypress tests 2022-02-14 12:57:59 +01:00
Bjarke Berg a228f4e941 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
#	src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTaskTests.cs
2022-02-13 13:39:13 +01:00
Bjarke BergandGitHub 8b190e05c2 Merge pull request #11983 from umbraco/v10/feature/fix-for-UmbracoTestServerTestBase
Fix issue running UmbracoTestServerTestBase tests with debugger attached
2022-02-13 13:32:56 +01:00
Paul Johnson a1e562cab6 Switch ConfigureServices back to protected.
Downstream users may wish to subclass and add their application specific
services.
2022-02-12 11:57:28 +00:00
Paul Johnson fcd4ad17bb Make webhost setup less confusing. 2022-02-12 11:41:59 +00:00
Paul Johnson 1764440b35 Switch a lot of warnings to suggestions until we are able to resolve. (#11974)
* Switch a lot of warnings to suggestions until we are able to resolve.

* Make stylecop respect more csharp_style rules

e.g. csharp_using_directive_placement

* Added cheatsheet

* Drop sorting requirements for using directives.

(cherry picked from commit 91c4c77676)
2022-02-11 21:27:53 +00:00
Paul Johnson c1fddd98be Additional refactoring I have been meaning to get around to for a while. 2022-02-11 20:39:57 +00:00
Paul Johnson 76cda7fd0c Fix issue running UmbracoTestServerTestBase tests with debugger attached
Ensure ConfigureWebServer called before ConfigureServices for tests that
make use of WebApplicationFactory.

Still not apparent why tests would pass if debugger isn't attached?
2022-02-11 16:52:57 +00:00
Nikolaj Geisle 58f6226942 Fix Unit & Integration tests 2022-02-11 14:27:04 +01:00
Nikolaj Geisle 83baba696c Fixed build errors after turning nullability errors off 2022-02-10 10:32:45 +01:00
Nikolaj Geisle b75eae01f3 Add nullability to core project 2022-02-09 13:24:35 +01:00
Bjarke BergandGitHub 87407442ad Merge pull request #11859 from umbraco/v10/feature/scope-provider-cleanup
v10 scope provider cleanup
2022-01-23 16:15:33 +01:00
Bjarke Berg 775bdff03b Fix after merge. 2022-01-23 15:26:17 +01:00
Bjarke Berg ae6920a4a2 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/scope-provider-cleanup
# Conflicts:
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
2022-01-23 14:16:44 +01:00
Bjarke Berg e92abf7d51 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
2022-01-23 13:46:10 +01:00
Nikolaj Geisle 936dd38c55 Make lots of models nullable 2022-01-21 11:43:58 +01:00
Paul JohnsonandGitHub b3945f05b8 Merge pull request #11880 from umbraco/v10/feature/npoco5
v10 update to npoco5
2022-01-18 16:12:43 +00:00
Paul Johnson 2ead758a99 Update to npoco5 2022-01-18 15:23:53 +00:00
Paul JohnsonandGitHub c6d7f3b5d1 Merge pull request #11879 from umbraco/v10/feature/merge-v9-dev
Merge branch 'v9/dev' into v10/dev
2022-01-18 13:19:44 +00:00
Paul Johnson ca3bdcf39c Fix Umbraco.Core csproj 2022-01-18 12:20:33 +00:00
Paul Johnson ea3ceab4e2 GH actions - install latest dotnet 2022-01-18 11:51:42 +00:00
Paul Johnson 235918ecfc Merge branch 'v9/dev' into v10/feature/merge-v9-dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/Actions/ActionAssignDomain.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Web.Common/Extensions/ApplicationBuilderExtensions.cs
2022-01-18 11:37:43 +00:00
Paul Johnson 2a4c974568 Move services infra -> core 2022-01-14 11:34:08 +00:00
Paul Johnson 39c3fecc45 Prep for moving some services 2022-01-13 23:46:21 +00:00
Paul Johnson 44261589ae Move repository interfaces to Core 2022-01-13 23:22:19 +00:00
Paul Johnson eb841a7b98 Remove database properties from IScope 2022-01-13 17:44:40 +00:00
Paul Johnson 022042a0ce EntityService should delegate more to repository. 2022-01-13 17:44:39 +00:00
Paul Johnson 4a477c7378 Expose IQuery<T> from ScopeProvider.
So that it can be used without requiring visibility of ISqlContext.
2022-01-13 15:51:30 +00:00
Paul Johnson 3b51850e56 IUmbracoDatabase shouldn't be registered singleton. 2022-01-13 15:28:12 +00:00
81d68f48ad v10 misc - Removed some redundant event handling code. (#11842)
* Removed some redundant event handling code.

* Cleanup

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-01-13 12:31:25 +01:00
Paul Johnson 8719010e8a Remove unused property from Scope 2022-01-13 10:07:08 +00:00
Paul Johnson d543dccb27 Attempt to make Scope.RobustExit clearer. 2022-01-13 09:56:08 +00:00
Paul Johnson 3258a676c0 ScopeProvider can create its own logger if required. 2022-01-13 09:31:08 +00:00
Paul Johnson 71ce038330 Scope no longer uses MediaFileManager.
Deleting media via services results in a published MediaDeletedNotification
via scope.Notifications, these are fired on Scope.Complete() and picked up
by the registered handlers.
2022-01-13 09:24:30 +00:00
Paul JohnsonandGitHub 52f5269e01 Update AddUnique to support multiple lifetimes. (#11841) 2022-01-13 09:48:38 +01:00
Nikolaj Geisle b6d5465b49 Fix up to Macros in Core project 2022-01-13 09:27:37 +01:00
Paul Johnson ae2ff856fb Remove IEventDispatcher, it's no longer used. 2022-01-11 17:02:20 +00:00
Nikolaj Geisle 521023372b Fix extension methods 2022-01-11 11:47:31 +01:00
Paul JohnsonandPaul Johnson 8d1fa717ba cherry-pick Misc/obsolete redundant extension (#11838)
* Mark AddUnique<TImplementing> obsolete.

* Remove all internal usages of AddUnique<TImplementing>.
2022-01-11 08:46:56 +00:00
Bjarke Berg 32b1225291 Updated projects to net6 2021-12-17 16:33:23 +01:00
Bjarke Berg 2ec92057c5 Started using nullable reference types.. 2021-12-16 13:44:20 +01:00
Bjarke Berg 11eaf176a9 Fixed a few warnings 2021-12-15 16:22:27 +01:00
Bjarke Berg 6c8ea465e2 Merge remote-tracking branch 'origin/v9/9.2' into v10/dev 2021-12-15 14:49:46 +01:00
Bjarke Berg 47c1058195 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
2021-12-15 14:41:49 +01:00
Bjarke Berg 0b39741309 Bump version 2021-12-07 08:22:29 +01:00
Bjarke Berg 9b5ab74d5b missing lock file 2021-11-22 19:54:50 +01:00
Bjarke Berg 78dc2d5721 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Core/Routing/DefaultUrlProvider.cs
#	src/Umbraco.Core/Routing/UrlProviderExtensions.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs
#	src/Umbraco.Infrastructure/Services/Implement/ContentService.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs
2021-11-22 19:43:20 +01:00
61f459670c Update to .NET6 and ASP.NET Core 6 (#11652)
* Changed targetFramework in nuspec file & project files + updated NuGet dependencies

* Updated .net version in pipelines

* Updated .net version in templates

* Update more dependencies

* Fixed ambiguous call to DistinctBy() - part of Umbraco.Extensions and System.Linq

* Disabling the Razor source generators in .NET 6 due to error: "Cannot find the fallback endpoint specified by route values..."

* Fixed unit tests

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-11-18 15:35:42 +01:00
Paul JohnsonandGitHub 14e1f7f7fc V10/feature/content schedule performance (#11398)
* Nuke Content.ContentSchedule

Can't make an omelette without breaking eggs

* Fix read view models

* Fix Save, Save & Schedule, Save & Publish

* Fix scheduled publish/unpublish

* Fix unit tests

* Fix bugs & integration tests

* Cleanup action result signatures

* Update tests from #11356, new method for saving contentschedule
2021-10-19 12:29:25 +02:00
Paul JohnsonandRonald Barendse 0f3b24496a Restore BelleBuild target (for back-office assets) and use npm ci (#11364)
Co-authored-by: Ronald Barendse <ronald@barend.se>
2021-10-19 10:16:08 +01:00
Paul Johnson 687de61793 Drop ref to Web.UI from integration tests (#11413)
* Remove reference to Web.UI, Fix test server content root

* Cleanup test databases in parallel
2021-10-19 10:12:35 +01:00
Paul Johnson afe43ab8cf Fix broken build 2021-10-18 09:38:34 +01:00
Paul Johnson b71d6afba6 Moved new test classes 2021-10-18 08:29:43 +01:00
Paul Johnson f214d58f0b Merge branch 'v9/dev' into v10/dev 2021-10-18 08:20:52 +01:00
Bjarke Berg 7ba221be98 Merge remote-tracking branch 'origin/v9/dev' into v10/dev 2021-10-18 06:44:48 +02:00
patrickdemooij9andGitHub 4c08b44684 11269: Make sure TemplateId is set correctly from cache (#11271) 2021-10-08 11:18:00 +02:00
Nikolaj GeisleandGitHub 6aaa13b385 Merge pull request #11200 from umbraco/v9/feature/implement-IOptionsMonitor-instead-of-IOptions
v9: Implement IOptionsMonitor or IOptionsSnapshot instead of IOptions
2021-10-04 14:01:28 +02:00
Nikolaj Geisle 7e14205996 Fixed unit test
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 13:31:00 +02:00
Nikolaj Geisle 02475695f7 Updated InMemoryModelFactory.cs
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 13:28:57 +02:00
Nikolaj Geisle 009549a433 Updated HealthCheckNotifier.cs to use IOptionsMonitor
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 13:26:32 +02:00
nikolajlauridsen c9b43ba48c Allow the period to change in Recurring host base 2021-10-04 13:22:49 +02:00
Nikolaj Geisle e383f51b65 Updated AuditNotificationsHandler.cs
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 11:14:04 +02:00
Nikolaj Geisle 89d357d00a Merge remote-tracking branch 'origin/v9/feature/implement-IOptionsMonitor-instead-of-IOptions' into v9/feature/implement-IOptionsMonitor-instead-of-IOptions 2021-10-04 11:03:56 +02:00
Nikolaj Geisle 44a7c0ce88 Updated IdentityMapDefinition.cs
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 11:03:31 +02:00
Nikolaj Geisle 33b55093de Updated IdentityMapDefinition.cs
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 10:44:23 +02:00
Nikolaj Geisle c42356ef65 Updated UmbracoRequestLocalizationOptions.cs to not use IOptionsSnapshot
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 10:41:35 +02:00
Nikolaj Geisle 20b95de2d1 Changed some classes back to use IOptionsMonitor as they are singleton services
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 10:28:59 +02:00
Nikolaj Geisle 4d35600288 updates tests to use IOptionsSnapshot
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 09:59:48 +02:00
Nikolaj Geisle 125247fddb Updated classes according to review
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2021-10-04 09:40:57 +02:00
Nikolaj Geisle ba463cddc1 Updated classes according to review 2021-10-01 14:31:59 +02:00
Nikolaj Geisle 6b5d5b4e4c Delete Root.cshtml 2021-10-01 14:23:30 +02:00
Nikolaj Geisle 5d47ce7daf Fixed UnitTest 2021-09-27 10:54:47 +02:00
Nikolaj Geisle e11d6ac280 Updated classes to use IOptionsMonitor or IOptionsSnapshot instead of IOptions 2021-09-27 10:32:21 +02:00
Nikolaj Geisle 8ce66277ce Updated classes to use IOptionsMonitor or IOptionsSnapshot 2021-09-24 12:45:34 +02:00
Nikolaj Geisle 8c26a86a55 Updated classes to use IOptionsMonitor and IOptionsSnapshot instead of IOptions 2021-09-24 09:45:00 +02:00
Nikolaj Geisle 10c2561d0a Updated Classes to use IOptionsMonitor or IOptionsSnapshot instead of IOptions 2021-09-23 15:31:46 +02:00
Nikolaj Geisle eb01984763 Created TestOptionsMonitor.cs and updated tests to use this new class 2021-09-23 11:49:47 +02:00
Nikolaj Geisle 3596d527b2 Updated logscrubber to use IOptionsMonitor 2021-09-23 10:53:59 +02:00
Nikolaj Geisle 7e304cbf56 updated KeepAlive to use IOptionsMonitor 2021-09-23 10:49:24 +02:00
Nikolaj Geisle 689f022dea Updated BackOfficeServerVariables to use IOptionsMonitor 2021-09-23 10:38:53 +02:00
Nikolaj Geisle 03ccd29831 Updated BackOfficeServerVariables to use IOptionsMonitor instead of IOptions 2021-09-23 10:30:22 +02:00
Zeegaan 9e685813cd Updated BackOfficeSessionIdValidator 2021-09-23 09:42:04 +02:00
Zeegaan 6631839a6a Updated BackOfficeAssetsController to use IOptionsSnapshot 2021-09-23 09:41:00 +02:00
Zeegaan 0bb086c53d Changed AuditNotificationHandler to use IOptionsMonitor, but not the cached value, as this is a transient service 2021-09-23 09:28:56 +02:00
Zeegaan 7541648e24 Updated BackOfficeController 2021-09-23 09:20:13 +02:00
Zeegaan 8218ba0c97 Updated BackOfficeController to use IOptionsSnapshot 2021-09-23 09:19:56 +02:00
Zeegaan 2aa7f3d130 Updated AutoModelsNotificationHandler to use IOptionsMonitor 2021-09-23 08:50:50 +02:00
Zeegaan e345a8c27f updated AutoModelsNotificationHandler 2021-09-23 08:43:08 +02:00
Zeegaan e8df59d32a UpdatedBackOfficeAntiforgery 2021-09-23 08:40:15 +02:00
Zeegaan cefed26563 Use IOptionsSnapshot in transient services 2021-09-23 08:33:16 +02:00
Zeegaan 27b85aa08f Updated AuthenticationController to use IOptionsMonitor, but not subscribed to events 2021-09-22 13:45:04 +02:00
Zeegaan 32b406d077 AuditNotificationsHandler updated to use IOptionsMonitor 2021-09-22 13:31:28 +02:00
Zeegaan e6e52d0fbf Updated AspNetCoreRequestAccessor to use IOptionsMonitor 2021-09-22 13:04:58 +02:00
Zeegaan 14498f8457 Updated AngularJsonOnlyConfigurationAttribute 2021-09-22 12:53:07 +02:00
Zeegaan ab131ef1ab Updated AliasUrlProvider to use IOptionsMonitor 2021-09-22 12:50:58 +02:00
Zeegaan 5076996a14 Updated ApplicationBuilderExtensions with IOptionsMonitor 2021-09-22 12:49:49 +02:00
Zeegaan 1efc630413 Updated UmbracoPluginPhysicalFileProvider 2021-09-22 12:43:00 +02:00
5229 changed files with 428218 additions and 339791 deletions
+3
View File
@@ -0,0 +1,3 @@
**/*
!**/bin/**
!**/obj/**
+9 -30
View File
@@ -1,36 +1,15 @@
# [Choice] .NET Core version: 5.0, 3.1, 2.1
ARG VARIANT=3.1
FROM mcr.microsoft.com/vscode/devcontainers/dotnetcore:0-${VARIANT}
# [Choice] .NET version: 6.0, 3.1, 6.0-bullseye, 3.1-bullseye, 6.0-focal, 3.1-focal
ARG VARIANT=6.0-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Option] Install Azure CLI
ARG INSTALL_AZURE_CLI="false"
COPY library-scripts/azcli-debian.sh /tmp/library-scripts/
RUN if [ "$INSTALL_AZURE_CLI" = "true" ]; then bash /tmp/library-scripts/azcli-debian.sh; fi \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
# Install SQL Tools: SQLPackage and sqlcmd
COPY mssql/installSQLtools.sh installSQLtools.sh
RUN bash ./installSQLtools.sh \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
# Update args in docker-compose.yaml to set the UID/GID of the "vscode" user.
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then groupmod --gid $USER_GID vscode && usermod --uid $USER_UID --gid $USER_GID vscode; fi
# [Choice] Node.js version: none, lts/*, 18, 16, 14
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] Uncomment this section to install additional OS packages.
# Following added by Warren...
# Needed to add as Gifsicle used by gulp-imagemin does not ship a Linux binary and has to be compiled from source
# And this Linux package is needed in order to build it
# https://github.com/imagemin/imagemin-gifsicle/issues/40#issuecomment-616487214
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends dh-autoreconf chromium-browser
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
@@ -42,7 +21,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Needing to set unsafe-perm as root is the user setup
# 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
#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
+7 -25
View File
@@ -1,41 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/dotnet-mssql
// https://github.com/microsoft/vscode-dev-containers/tree/main/containers/dotnet
{
"name": "C# (.NET) and MS SQL",
"name": "C# (.NET) Umbraco & SMTP4Dev",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"mssql.connections": [
{
"server": "localhost,1433",
"database": "",
"authenticationType": "SqlLogin",
"user": "sa",
"password": "P@ssw0rd",
"emptyPasswordInput": false,
"savePassword": false,
"profileName": "mssql-container"
}
],
"omnisharp.defaultLaunchSolution": "umbraco-netcore-only.sln",
"settings": {
"omnisharp.defaultLaunchSolution": "umbraco.sln",
"omnisharp.enableDecompilationSupport": true,
"omnisharp.enableRoslynAnalyzers": true
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp",
"ms-mssql.mssql"
"ms-dotnettools.csharp"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// 1433 for SQL if you want to connect from local into the one running inside the container
// Can connect to the SQL Server running in the image on local with 'host.docker.internal' as hostname
"forwardPorts": [1433, 9000, 5000, 25],
"forwardPorts": [9000, 5000, 25]
// [Optional] To reuse of your local HTTPS dev cert:
//
@@ -56,6 +40,4 @@
// 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer
// 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https"
// postCreateCommand.sh parameters: $1=SA password, $2=dacpac path, $3=sql script(s) path
"postCreateCommand": "bash .devcontainer/mssql/postCreateCommand.sh 'P@ssw0rd' './bin/Debug/' './.devcontainer/mssql/'"
}
+4 -21
View File
@@ -6,15 +6,10 @@ services:
context: .
dockerfile: Dockerfile
args:
# [Choice] Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0
VARIANT: 5.0
# [Choice] .NET version: 6.0, 3.1, 6.0-bullseye, 3.1-bullseye, 6.0-focal, 3.1-focal
VARIANT: 6.0-bullseye
# Options
INSTALL_NODE: "true"
NODE_VERSION: "lts/*"
INSTALL_AZURE_CLI: "false"
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: 1000
USER_GID: 1000
volumes:
- ..:/workspace:cached
@@ -22,9 +17,6 @@ services:
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# Uncomment the next line to use a non-root user for all processes.
# user: vscode
@@ -34,7 +26,8 @@ services:
# DotNetCore ENV Variables
# https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-5.0#environment-variables
environment:
- ConnectionStrings__umbracoDbDSN=server=localhost;database=UmbracoUnicore;user id=sa;password='P@ssw0rd'
- ConnectionStrings__umbracoDbDSN=Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True
- ConnectionStrings__umbracoDbDSN_ProviderName=Microsoft.Data.Sqlite
- Umbraco__CMS__Unattended__InstallUnattended=true
- Umbraco__CMS__Unattended__UnattendedUserName=Admin
- Umbraco__CMS__Unattended__UnattendedUserEmail=test@umbraco.com
@@ -43,16 +36,6 @@ services:
- Umbraco__CMS__Global__Smtp__Port=25
- Umbraco__CMS__Global__Smtp__From=noreply@umbraco.test
db:
image: mcr.microsoft.com/mssql/server:2019-latest
restart: unless-stopped
environment:
SA_PASSWORD: P@ssw0rd
ACCEPT_EULA: Y
# Add "forwardPorts": ["1433"] to **devcontainer.json** to forward MSSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
smtp4dev:
image: rnwood/smtp4dev:v3
restart: always
@@ -1,33 +0,0 @@
#!/usr/bin/env bash
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
#
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/azcli.md
#
# Syntax: ./azcli-debian.sh
set -e
if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
exit 1
fi
export DEBIAN_FRONTEND=noninteractive
# Install curl, apt-transport-https, lsb-release, or gpg if missing
if ! dpkg -s apt-transport-https curl ca-certificates lsb-release > /dev/null 2>&1 || ! type gpg > /dev/null 2>&1; then
if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
apt-get update
fi
apt-get -y install --no-install-recommends apt-transport-https curl ca-certificates lsb-release gnupg2
fi
# Install the Azure CLI
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list
curl -sL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT)
apt-get update
apt-get install -y azure-cli
echo "Done!"
-11
View File
@@ -1,11 +0,0 @@
/*
This will generate a blank database when the container is spun up
that you can use to connect to for the SQL configuration in the web installer flow
---- NOTE ----
Any .sql files in this folder will be executed
Along with any .dacpac will be restored as databases
See postCreateCommand.sh for specifics
*/
CREATE DATABASE UmbracoUnicore;
GO
-16
View File
@@ -1,16 +0,0 @@
#!/bin/bash
set -echo
echo "Installing mssql-tools"
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT)
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
CODENAME=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-${DISTRO}-${CODENAME}-prod ${CODENAME} main" > /etc/apt/sources.list.d/microsoft.list
apt-get update
ACCEPT_EULA=Y apt-get -y install unixodbc-dev msodbcsql17 libunwind8 mssql-tools
echo "Installing sqlpackage"
curl -sSL -o sqlpackage.zip "https://aka.ms/sqlpackage-linux"
mkdir /opt/sqlpackage
unzip sqlpackage.zip -d /opt/sqlpackage
rm sqlpackage.zip
chmod a+x /opt/sqlpackage/sqlpackage
-64
View File
@@ -1,64 +0,0 @@
#!/bin/bash
dacpac="false"
sqlfiles="false"
SApassword=$1
dacpath=$2
sqlpath=$3
echo "SELECT * FROM SYS.DATABASES" | dd of=testsqlconnection.sql
for i in {1..60};
do
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SApassword -d master -i testsqlconnection.sql > /dev/null
if [ $? -eq 0 ]
then
echo "SQL server ready"
break
else
echo "Not ready yet..."
sleep 1
fi
done
rm testsqlconnection.sql
for f in $dacpath/*
do
if [ $f == $dacpath/*".dacpac" ]
then
dacpac="true"
echo "Found dacpac $f"
fi
done
for f in $sqlpath/*
do
if [ $f == $sqlpath/*".sql" ]
then
sqlfiles="true"
echo "Found SQL file $f"
fi
done
if [ $sqlfiles == "true" ]
then
for f in $sqlpath/*
do
if [ $f == $sqlpath/*".sql" ]
then
echo "Executing $f"
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SApassword -d master -i $f
fi
done
fi
if [ $dacpac == "true" ]
then
for f in $dacpath/*
do
if [ $f == $dacpath/*".dacpac" ]
then
dbname=$(basename $f ".dacpac")
echo "Deploying dacpac $f"
/opt/sqlpackage/sqlpackage /Action:Publish /SourceFile:$f /TargetServerName:localhost /TargetDatabaseName:$dbname /TargetUser:sa /TargetPassword:$SApassword
fi
done
fi
+8 -19
View File
@@ -282,7 +282,7 @@ dotnet_naming_style.internal_error_style.required_suffix = ____INTERNAL_ERROR___
# All public/protected/protected_internal constant fields must be PascalCase
# https://docs.microsoft.com/dotnet/standard/design-guidelines/field
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal, internal, private
dotnet_naming_symbols.public_protected_constant_fields_group.required_modifiers = const
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_kinds = field
dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.symbols = public_protected_constant_fields_group
@@ -356,24 +356,13 @@ dotnet_naming_rule.parameters_rule.symbols = parameters_group
dotnet_naming_rule.parameters_rule.style = camel_case_style
dotnet_naming_rule.parameters_rule.severity = warning
# Private static fields use camelCase and start with s_
dotnet_naming_symbols.private_static_field_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_field_symbols.required_modifiers = static, shared
dotnet_naming_symbols.private_static_field_symbols.applicable_kinds = field
dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.symbols = private_static_field_symbols
dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.style = camel_case_and_prefix_with_s_underscore_style
dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.severity = warning
dotnet_naming_style.camel_case_and_prefix_with_s_underscore_style.required_prefix = s_
dotnet_naming_style.camel_case_and_prefix_with_s_underscore_style.capitalization = camel_case
# Instance fields use camelCase and are prefixed with '_'
dotnet_naming_symbols.private_field_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_field_symbols.applicable_kinds = field
dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.symbols = private_field_symbols
dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.style = camel_case_and_prefix_with_underscore_style
dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.severity = warning
dotnet_naming_style.camel_case_and_prefix_with_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_and_prefix_with_underscore_style.capitalization = camel_case
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = warning
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _
##########################################
# License
@@ -408,4 +397,4 @@ dotnet_naming_style.camel_case_and_prefix_with_underscore_style.capitalization
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
##########################################
##########################################
+102 -19
View File
@@ -1,33 +1,99 @@
# Umbraco CMS Build
# Umbraco CMS Build
## Are you sure?
In order to use Umbraco as a CMS and build your website with it, you should not build it yourself. If you're reading this then you're trying to contribute to Umbraco or you're debugging a complex issue.
- Are you about to create a pull request for Umbraco?
- Are you about to [create a pull request for Umbraco][contribution guidelines]?
- Are you trying to get to the bottom of a problem in your existing Umbraco installation?
If the answer is yes, please read on. Otherwise, make sure to head on over [to the download page](https://our.umbraco.com/download) and start using Umbraco CMS as intended.
**Table of contents**
## Table of contents
[Building from source](#building-from-source)
* [The quick build](#quick)
* [Build infrastructure](#build-infrastructure)
* [Properties](#properties)
* [GetUmbracoVersion](#getumbracoversion)
* [SetUmbracoVersion](#setumbracoversion)
* [Build](#build)
* [Build-UmbracoDocs](#build-umbracodocs)
* [Verify-NuGet](#verify-nuget)
* [Cleaning up](#cleaning-up)
↖️ You can jump to any section by using the "table of contents" button ( ![Table of contents icon](img/tableofcontentsicon.svg) ) above.
[Azure DevOps](#azure-devops)
[Quirks](#quirks)
* [Powershell quirks](#powershell-quirks)
* [Git quirks](#git-quirks)
## Debugging source locally
Did you read ["Are you sure"](#are-you-sure)?
[More details about contributing to Umbraco and how to use the GitHub tooling can be found in our guide to contributing.][contribution guidelines]
If you want to run a build without debugging, see [Building from source](#building-from-source) below. This runs the build in the same way it is run on our build servers.
#### Debugging with VS Code
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)
* [Node.js v14+](https://nodejs.org/en/download/)
* npm v7+ (installed with Node.js)
* [Git command line](https://git-scm.com/download/)
Open the root folder of the repository in Visual Studio Code.
To build the front end you'll need to open the command pallet (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) and run `>Tasks: Run Task` followed by `Client Watch` and then run the `Client Build` task in the same way.
You can also run the tasks manually on the command line:
```
cd src\Umbraco.Web.UI.Client
npm install
npm run dev
```
or
```
cd src\Umbraco.Web.UI.Client
npm install
gulp dev
```
**The initial Gulp build might take a long time - don't worry, this will be faster on subsequent runs.**
You might run into [Gulp quirks](#gulp-quirks).
The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to [disable caching in the browser (check "Disable cache" on the "Network" tab of developer tools)][disable browser caching] to help you to see the changes you're making.
To run the C# portion of the project, either hit <kbd>F5</kbd> to begin debugging, or manually using the command line:
```
dotnet watch --project .\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj
```
**The initial C# build might take a _really_ long time (seriously, go and make a cup of coffee!) - but don't worry, this will be faster on subsequent runs.**
When the page eventually loads in your web browser, you can follow the installer to set up a database for debugging. You may also wish to install a [starter kit][starter kits] to ease your debugging.
#### Debugging with Visual Studio
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)
* [Node.js v14+](https://nodejs.org/en/download/)
* npm v7+ (installed with Node.js)
* [Git command line](https://git-scm.com/download/)
The easiest way to get started is to open `umbraco.sln` in Visual Studio.
To build the front end, you'll first need to run `cd src\Umbraco.Web.UI.Client && npm install` in the command line (or `cd src\Umbraco.Web.UI.Client; npm install` in PowerShell). Then find the Task Runner Explorer (View → Other Windows → Task Runner Explorer) and run the `build` task under `Gulpfile.js`. You may need to refresh the Task Runner Explorer before the tasks load.
If you're working on the backoffice, you may wish to run the `dev` command instead while you're working with it, so changes are copied over to the appropriate directories and you can refresh your browser to view the results of your changes.
**The initial Gulp build might take a long time - don't worry, this will be faster on subsequent runs.**
You might run into [Gulp quirks](#gulp-quirks).
The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to [disable caching in the browser (check "Disable cache" on the "Network" tab of developer tools)][disable browser caching] to help you to see the changes you're making.
"The rest" is a C# based codebase, which is mostly ASP.NET Core MVC based. You can make changes, build them in Visual Studio, and hit <kbd>F5</kbd> to see the result.
**The initial C# build might take a _really_ long time (seriously, go and make a cup of coffee!) - but don't worry, this will be faster on subsequent runs.**
When the page eventually loads in your web browser, you can follow the installer to set up a database for debugging. You may also wish to install a [starter kit][starter kits] to ease your debugging.
## Building from source
@@ -38,13 +104,14 @@ Did you read ["Are you sure"](#are-you-sure)?
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:
build/build.ps1
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.
You might run into [Powershell quirks](#powershell-quirks).
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.
### Build Infrastructure
The Umbraco Build infrastructure relies on a PowerShell object. The object can be retrieved with:
@@ -145,7 +212,7 @@ To perform a more complete clear, you will want to also delete the content of th
The following command will force remove all untracked files and directories, whether they are ignored by Git or not. Combined with `git reset` it can recreate a pristine working directory.
git clean -xdf .
For git documentation see:
* git [clean](<https://git-scm.com/docs/git-clean>)
* git [reset](<https://git-scm.com/docs/git-reset>)
@@ -214,3 +281,19 @@ The best solution is to unblock the Zip file before un-zipping: right-click the
### 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).
### Gulp Quirks
You may need to run the following commands to set up gulp properly:
```
npm cache clean --force
npm ci
npm run build
```
[ contribution guidelines]: CONTRIBUTING.md "Read the guide to contributing for more details on contributing to Umbraco"
[ starter kits ]: https://our.umbraco.com/packages/?category=Starter%20Kits&version=9 "Browse starter kits available for v9 on Our "
[ disable browser caching ]: https://techwiser.com/disable-cache-google-chrome-firefox "Instructions on how to disable browser caching in Chrome and Firefox"
+185 -149
View File
@@ -2,192 +2,131 @@
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines, for contributing to Umbraco CMS.
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgement, and feel free to propose changes to this document in a pull request.
These are mostly guidelines, not rules. Use your best judgement, and feel free to propose changes to this document in a pull request.
## Coding not your thing? Or want more ways to contribute?
Remember, we're a friendly bunch and are happy with whatever contribution you might provide. Below are guidelines for success that we've gathered over the years. If you choose to ignore them then we still love you 💖.
This document covers contributing to the codebase of the CMS but [the community site has plenty of inspiration for other ways to get involved.][get involved]
**Code of conduct**
If you don't feel you'd like to make code changes here, you can visit our [documentation repository][docs repo] and use your experience to contribute to making the docs we have, even better.
This project and everyone participating in it, is governed by the [our Code of Conduct](https://github.com/umbraco/.github/blob/main/.github/CODE_OF_CONDUCT.md).
We also encourage community members to feel free to comment on others' pull requests and issues - the expertise we have is not limited to the Core Collaborators and HQ. So, if you see something on the issue tracker or pull requests you feel you can add to, please don't be shy.
**Table of contents**
## Table of contents
[Contributing code changes](#contributing-code-changes)
* [Guidelines for contributions we welcome](#guidelines-for-contributions-we-welcome)
* [Ownership and copyright](#ownership-and-copyright)
* [What can I start with?](#what-can-i-start-with)
* [How do I begin?](#how-do-i-begin)
* [Pull requests](#pull-requests)
- [Before you start](#before-you-start)
* [Code of Conduct](#code-of-conduct)
* [What can I contribute?](#what-can-i-contribute)
+ [Making larger changes](#making-larger-changes)
+ [Pull request or package?](#pull-request-or-package)
+ [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)
+ [Keeping your Umbraco fork in sync with the main repository](#keeping-your-umbraco-fork-in-sync-with-the-main-repository)
+ [Style guide](#style-guide)
+ [Questions?](#questions)
- [Creating a pull request](#creating-a-pull-request)
- [The review process](#the-review-process)
* [Dealing with requested changes](#dealing-with-requested-changes)
+ [No longer available?](#no-longer-available)
* [The Core Collaborators team](#the-core-collaborators-team)
[Reviews](#reviews)
* [Styleguides](#styleguides)
* [The Core Contributors](#the-core-contributors-team)
* [Questions?](#questions)
## Before you start
[Working with the code](#working-with-the-code)
* [Building Umbraco from source code](#building-umbraco-from-source-code)
* [Working with the source code](#working-with-the-source-code)
* [Making changes after the PR is open](#making-changes-after-the-pr-is-open)
* [Which branch should I target for my contributions?](#which-branch-should-i-target-for-my-contributions)
* [Keeping your Umbraco fork in sync with the main repository](#keeping-your-umbraco-fork-in-sync-with-the-main-repository)
## Contributing code changes
### Code of Conduct
This document gives you a quick overview on how to get started.
This project and everyone participating in it, is governed by the [our Code of Conduct][code of conduct].
### Guidelines for contributions we welcome
### What can I contribute?
Not all changes are wanted, so on occasion we might close a PR without merging it. We will give you feedback why we can't accept your changes and we'll be nice about it, thanking you for spending your valuable time.
We categorise pull requests (PRs) into two categories:
We have [documented what we consider small and large changes](CONTRIBUTION_GUIDELINES.md). Make sure to talk to us before making large changes, so we can ensure that you don't put all your hard work into something we would not be able to merge.
| PR type | Definition |
| --------- | ------------------------------------------------------------ |
| Small PRs | Bug fixes and small improvements - can be recognized by seeing a small number of changes and possibly a small number of new files. |
| Large PRs | New features and large refactorings - can be recognized by seeing a large number of changes, plenty of new files, updates to package manager files (NuGets packages.config, NPMs packages.json, etc.). |
Remember, it is always worth working on an issue from the `Up for grabs` list or even asking for some feedback before you send us a PR. This way, your PR will not be closed as unwanted.
Were usually able to handle small PRs pretty quickly. A community volunteer will do the initial review and flag it for Umbraco HQ as “community tested”. If everything looks good, it will be merged pretty quickly [as per the described process][review process].
We would love to follow the same process for larger PRs but this is not always possible due to time limitations and priorities that need to be aligned. We dont want to put up any barriers, but this document should set the correct expectations.
Not all changes are wanted, so on occasion we might close a PR without merging it but if we do, we will give you feedback why we can't accept your changes. **So make sure to [talk to us before making large changes][making larger changes]**, so we can ensure that you don't put all your hard work into something we would not be able to merge.
#### Making larger changes
[making larger changes]: #making-larger-changes
Please make sure to describe your larger ideas in an [issue (bugs)][issues] or [discussion (new features)][discussions], it helps to put in mock up screenshots or videos. If the change makes sense for HQ to include in Umbraco CMS we will leave you some feedback on how wed like to see it being implemented.
If a larger pull request is encouraged by Umbraco HQ, the process will be similar to what is described in the small PRs process above, we strive to feedback within 14 days. Finalizing and merging the PR might take longer though as it will likely need to be picked up by the development team to make sure everything is in order. Well keep you posted on the progress.
#### Pull request or package?
[pr or package]: #pull-request-or-package
If you're unsure about whether your changes belong in the core Umbraco CMS or if you should turn your idea into a package instead, make sure to [talk to us][making larger changes].
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.
#### 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.
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.
Similarly, if your contribution is copied or adapted from somewhere else, make sure that the license allows you to reuse that for a contribution to Umbraco-CMS.
If you're not sure, leave a note on your contribution and we will be happy to guide you.
When your contribution has been accepted, it will be [MIT licensed](https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/LICENSE.md) from that time onwards.
When your contribution has been accepted, it will be [MIT licensed][MIT license] from that time onwards.
### What can I start with?
## Finding your first issue: Up for grabs
Unsure where to begin contributing to Umbraco? You can start by looking through [these `Up for grabs` issues](https://github.com/umbraco/Umbraco-CMS/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Acommunity%2Fup-for-grabs+)
Umbraco HQ will regularly mark newly created issues on the issue tracker with [the `community/up-for-grabs` tag][up for grabs issues]. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. We encourage anyone to pick them up and help out.
### How do I begin?
If you do start working on something, make sure to leave a small comment on the issue saying something like: "I'm working on this". That way other people stumbling upon the issue know they don't need to pick it up, someone already has.
## Making your changes
Great question! The short version goes like this:
* **Fork** - create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
1. **Fork**
![Fork the repository](img/forkrepository.png)
Create a fork of [`Umbraco-CMS` on GitHub][Umbraco CMS repo]
![Fork the repository](img/forkrepository.png)
1. **Clone**
* **Clone** - when GitHub has created your fork, you can clone it in your favorite Git tool
When GitHub has created your fork, you can clone it in your favorite Git tool
![Clone the fork](img/clonefork.png)
1. **Switch to the correct branch**
![Clone the fork](img/clonefork.png)
Switch to the `v10/contrib` branch
* **Switch to the correct branch** - switch to the `v9/contrib` branch
* **Build** - build your fork of Umbraco locally as described in [building Umbraco from source code](BUILD.md)
* **Change** - make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](#questions)
* **Commit** - done? Yay! 🎉 **Important:** 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 `12345`. When you have a branch, commit your changes. Don't commit to `v9/contrib`, create a new branch first.
* **Push** - great, now you can push the changes up to your fork on GitHub
* **Create pull request** - exciting! You're ready to show us your changes (or not quite ready, you just need some feedback to progress - you can now make use of GitHub's draft pull request status, detailed [here](https://github.blog/2019-02-14-introducing-draft-pull-requests/)). GitHub has 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.
1. **Build**
![Create a pull request](img/createpullrequest.png)
Build your fork of Umbraco locally as described in the build documentation: you can [debug with Visual Studio Code][build - debugging with code] or [with Visual Studio][build - debugging with vs].
### Pull requests
The most successful pull requests usually look a like this:
1. **Branch**
* Fill in the required template (shown when starting a PR on GitHub), and link your pull request to an issue on the [issue tracker,](https://github.com/umbraco/Umbraco-CMS/issues) if applicable.
* Include screenshots and animated GIFs in your pull request whenever possible.
* Unit tests, while optional, are awesome. Thank you!
* New code is commented with documentation from which [the reference documentation](https://our.umbraco.com/documentation/Reference/) is generated.
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.
Again, these are guidelines, not strict requirements. However, the more information that you give to us, the more we have to work with when considering your contributions. Good documentation of a pull request can really speed up the time it takes to review and merge your work!
1. **Change**
## Reviews
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback][questions].
You've sent us your first contribution - congratulations! Now what?
1. **Commit and push**
The [pull request team](#the-pr-team) can now start reviewing your proposed changes and give you feedback on them. If it's not perfect, we'll either fix up what we need or we can request that you make some additional changes.
Done? Yay! 🎉
We have [a process in place which you can read all about](REVIEW_PROCESS.md). The very abbreviated version is:
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.
- Your PR will get a reply within 48 hours
- An in-depth reply will be added within at most 2 weeks
- The PR will be either merged or rejected within at most 4 weeks
- Sometimes it is difficult to meet these timelines and we'll talk to you if this is the case.
#### Keeping your Umbraco fork in sync with the main repository
[sync fork]: #keeping-your-umbraco-fork-in-sync-with-the-main-repository
### Styleguides
To be honest, we don't like rules very much. We trust you have the best of intentions and we encourage you to create working code. If it doesn't look perfect then we'll happily help clean it up.
That said, the Umbraco development team likes to follow the hints that ReSharper gives us (no problem if you don't have this installed) and we've added a `.editorconfig` file so that Visual Studio knows what to do with whitespace, line endings, etc.
### The Core Contributors team
The Core Contributors team consists of one member of Umbraco HQ, [Sebastiaan](https://github.com/nul800sebastiaan), who gets assistance from the following community members who have comitted to volunteering their free time:
- [Nathan Woulfe](https://github.com/nathanwoulfe)
- [Joe Glombek](https://github.com/glombek)
- [Laura Weatherhead](https://github.com/lssweatherhead)
- [Michael Latouche](https://github.com/mikecp)
- [Owain Williams](https://github.com/OwainWilliams)
These wonderful people aim to provide you with a first 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.
### Questions?
You can get in touch with [the core contributors team](#the-core-contributors-team) in multiple ways; we love open conversations and we are a friendly bunch. No question you have is stupid. Any question you have usually helps out multiple people with the same question. Ask away:
- If there's an existing issue on the issue tracker then that's a good place to leave questions and discuss how to start or move forward.
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"](https://our.umbraco.com/forum/contributing-to-umbraco-cms/) forum. The team monitors that one closely, so one of us will be on hand and ready to point you in the right direction.
## Working with the code
### Building Umbraco from source code
In order to build the Umbraco source code locally, first make sure you have the following installed.
* [Visual Studio 2019 v16.8+ (with .NET Core 3.0)](https://visualstudio.microsoft.com/vs/)
* [Node.js v10+](https://nodejs.org/en/download/)
* npm v6.4.1+ (installed with Node.js)
* [Git command line](https://git-scm.com/download/)
The easiest way to get started is to open `src\umbraco.sln` in Visual Studio 2019 (version 16.3 or higher, [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). In Visual Studio, find the Task Runner Explorer (in the View menu under Other Windows) and run the build task under the gulpfile.
Alternatively, you can run `build.ps1` from the Powershell command line, which will build both the backoffice (also known as "Belle") and the Umbraco core. You can then easily start debugging from Visual Studio, or if you need to debug Belle you can run `gulp dev` in `src\Umbraco.Web.UI.Client`. See [this page](BUILD.md) for more details.
![Gulp build in Visual Studio](img/gulpbuild.png)
After this build completes, you should be able to hit `F5` in Visual Studio to build and run the project. A IISExpress webserver will start and the Umbraco installer will pop up in your browser. Follow the directions there to get a working Umbraco install up and running.
### Working with the source code
Some parts of our source code are over 10 years old now. And when we say "old", we mean "mature" of course!
There are two big areas that you should know about:
1. The Umbraco backoffice is a extensible AngularJS app and requires you to run a `gulp dev` command while you're working with it, so changes are copied over to the appropriate directories and you can refresh your browser to view the results of your changes.
You may need to run the following commands to set up gulp properly:
```
npm cache clean --force
npm ci
npm run build
```
The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to disable caching in the browser to help you to see the changes you're making.
2. "The rest" is a C# based codebase, which is mostly ASP.NET MVC based. You can make changes, build them in Visual Studio, and hit `F5` to see the result.
To find the general areas for something you're looking to fix or improve, have a look at the following two parts of the API documentation.
* [The AngularJS based backoffice files](https://apidocs.umbraco.com/v9/ui#/api) (to be found in `src\Umbraco.Web.UI.Client\src`)
* [The C# application](https://apidocs.umbraco.com/v9/csharp/)
### Which branch should I target for my contributions?
We like to use [Gitflow as much as possible](https://jeffkreeftmeijer.com/git-flow/), 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 `v9/contrib`. If you are working on v9, this is the branch you should be targetting. For v8 contributions, please target 'v8/contrib'
Please note: we are no longer accepting features for v7 but will continue to merge bug fixes as and when they arise.
![Which branch should I target?](img/defaultbranch.png)
### Making changes after the PR is open
If you make the corrections we ask for in the same branch and push them to your fork again, the pull request automatically updates with the additional commit(s) so we can review it again. If all is well, we'll merge the code and your commits are forever part of Umbraco!
### Keeping your Umbraco fork in sync with the main repository
We recommend you to sync with our repository before you submit your pull request. That way, you can fix any potential merge conflicts and make our lives a little bit easier.
Also, if you have submitted a pull request three weeks ago and want to work on something new, you'll want to get the latest code to build against of course.
Once you've already got a fork and cloned your fork locally, you can skip steps 1 and 2 going forward. Just remember to keep your fork up to date before making further changes.
To sync your fork with this original one, you'll have to add the upstream url. You only have to do this once:
@@ -199,13 +138,110 @@ Then when you want to get the changes from the main repository:
```
git fetch upstream
git rebase upstream/v9/contrib
git rebase upstream/v10/contrib
```
In this command we're syncing with the `v9/contrib` branch, but you can of course choose another one if needed.
In this command we're syncing with the `v10/contrib` branch, but you can of course choose another one if needed.
(More info on how this works: [http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated](http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated))
[More information on how this works can be found on the thoughtbot blog.][sync fork ext]
### And finally
#### Style guide
We welcome all kinds of contributions to this repository. If you don't feel you'd like to make code changes here, you can visit our [documentation repository](https://github.com/umbraco/UmbracoDocs) and use your experience to contribute to making the docs we have, even better. We also encourage community members to feel free to comment on others' pull requests and issues - the expertise we have is not limited to the Core Contributors and HQ. So, if you see something on the issue tracker or pull requests you feel you can add to, please don't be shy.
To be honest, we don't like rules very much. We trust you have the best of intentions and we encourage you to create working code. If it doesn't look perfect then we'll happily help clean it up.
That said, the Umbraco development team likes to follow the hints that ReSharper gives us (no problem if you don't have this installed) and we've added a `.editorconfig` file so that Visual Studio knows what to do with whitespace, line endings, etc.
#### Questions?
[questions]: #questions
You can get in touch with [the core contributors team][core collabs] in multiple ways; we love open conversations and we are a friendly bunch. No question you have is stupid. Any question you have usually helps out multiple people with the same question. Ask away:
- If there's an existing issue on the issue tracker then that's a good place to leave questions and discuss how to start or move forward.
- If you want to ask questions on some code you've already written you can create a draft pull request, [detailed in a GitHub blog post][draft prs].
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"][contrib forum] forum. The team monitors that one closely, so one of us will be on hand and ready to point you in the right direction.
## Creating a pull request
Exciting! You're ready to show us your changes.
We recommend you to [sync with our repository][sync fork] before you submit your pull request. That way, you can fix any potential merge conflicts and make our lives a little bit easier.
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.
Please note: we are no longer accepting features for v8 and below but will continue to merge security fixes as and when they arise.
## The review process
[review process]: #the-review-process
You've sent us your first contribution - congratulations! Now what?
The [Core Collaborators team][Core collabs] can now start reviewing your proposed changes and give you feedback on them. If it's not perfect, we'll either fix up what we need or we can request that you make some additional changes.
You will get an initial automated reply from our [Friendly Umbraco Robot, Umbrabot][Umbrabot], to acknowledge that weve seen your PR and well pick it up as soon as we can. You can take this opportunity to double check everything is in order based off the handy checklist Umbrabot provides.
You will get feedback as soon as the [Core Collaborators team][Core collabs] can after opening the PR. Youll most likely get feedback within a couple of weeks. Then there are a few possible outcomes:
- Your proposed change is awesome! We merge it in and it will be included in the next minor release of Umbraco
- If the change is a high priority bug fix, we will cherry-pick it into the next patch release as well so that we can release it as soon as possible
- Your proposed change is awesome but needs a bit more work, well give you feedback on the changes wed like to see
- Your proposed change is awesome but... not something were looking to include at this point. Well close your PR and the related issue (well be nice about it!). See [making larger changes][making larger changes] and [pull request or package?][pr or package]
### Dealing with requested changes
If you make the corrections we ask for in the same branch and push them to your fork again, the pull request automatically updates with the additional commit(s) so we can review it again. If all is well, we'll merge the code and your commits are forever part of Umbraco!
#### No longer available?
We understand you have other things to do and can't just drop everything to help us out.
So if were asking for your help to improve the PR well wait for two weeks to give you a fair chance to make changes. Well ask for an update if we dont hear back from you after that time.
If we dont hear back from you for 4 weeks, well close the PR so that it doesnt just hang around forever. Youre very welcome to re-open it once you have some more time to spend on it.
There will be times that we really like your proposed changes and well finish the final improvements wed like to see ourselves. You still get the credits and your commits will live on in the git repository.
### The Core Collaborators team
[Core collabs]: #the-core-collaborators-team
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]
- [Michael Latouche][Michael Latouche]
- [Owain Williams][Owain Williams]
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.
<!-- Reference links for easy updating -->
<!-- Local -->
[MIT license]: ../LICENSE.md "Umbraco's license declaration"
[build - debugging with vs]: BUILD.md#debugging-with-visual-studio "Details on building and debugging Umbraco with Visual Studio"
[build - debugging with code]: BUILD.md#debugging-with-vs-code "Details on building and debugging Umbraco with Visual Studio Code"
<!-- 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"
[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"
[ 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"
[draft prs]: https://github.blog/2019-02-14-introducing-draft-pull-requests/ "Github's blog post providing details on draft pull requests"
[contrib forum]: https://our.umbraco.com/forum/contributing-to-umbraco-cms/
[get involved]: https://community.umbraco.com/get-involved/
[docs repo]: https://github.com/umbraco/UmbracoDocs
[code of conduct]: https://github.com/umbraco/.github/blob/main/.github/CODE_OF_CONDUCT.md
[up for grabs issues]: https://github.com/umbraco/Umbraco-CMS/issues?q=is%3Aissue+is%3Aopen+label%3Acommunity%2Fup-for-grabs
[Umbraco CMS repo]: https://github.com/umbraco/Umbraco-CMS
[issues]: https://github.com/umbraco/Umbraco-CMS/issues
[discussions]: https://github.com/umbraco/Umbraco-CMS/discussions
-35
View File
@@ -1,35 +0,0 @@
# Contributing to Umbraco CMS
When youre considering creating a pull request for Umbraco CMS, we will categorize them in two different sizes, small and large.
The process for both sizes is very similar, as [explained in the contribution document](CONTRIBUTING.md#how-do-i-begin).
## Small PRs
Bug fixes and small improvements - can be recognized by seeing a small number of changes and possibly a small number of new files.
Were usually able to handle small PRs pretty quickly. A community volunteer will do the initial review and flag it for Umbraco HQ as “community tested”. If everything looks good, it will be merged pretty quickly [as per the described process](REVIEW_PROCESS.md).
### Up for grabs
Umbraco HQ will regularly mark newly created issues on the issue tracker with the `Up for grabs` tag. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. We encourage anyone to pick them up and help out.
If you do start working on something, make sure to leave a small comment on the issue saying something like: "I'm working on this". That way other people stumbling upon the issue know they don't need to pick it up, someone already has.
## Large PRs
New features and large refactorings - can be recognized by seeing a large number of changes, plenty of new files, updates to package manager files (NuGets packages.config, NPMs packages.json, etc.).
We would love to follow the same process for larger PRs but this is not always possible due to time limitations and priorities that need to be aligned. We dont want to put up any barriers, but this document should set the correct expectations.
Please make sure to describe your idea in an issue, it helps to put in mockup screenshots or videos.
If the change makes sense for HQ to include in Umbraco CMS we will leave you some feedback on how wed like to see it being implemented.
If a larger pull request is encouraged by Umbraco HQ, the process will be similar to what is described in the [small PRs process](#small-prs) above, we strive to feedback within 14 days. Finalizing and merging the PR might take longer though as it will likely need to be picked up by the development team to make sure everything is in order. Well keep you posted on the progress.
It is highly recommended that you speak to the HQ before making large, complex changes.
### Pull request or package?
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.
+1 -1
View File
@@ -6,7 +6,7 @@ body:
- type: input
id: "version"
attributes:
label: "Which *exact* Umbraco version are you using? For example: 9.0.1 - don't just write v9"
label: "Which Umbraco version are you using? (Please write the *exact* version, example: 10.1.0)"
description: "Use the help icon in the Umbraco backoffice to find the version you're using"
validations:
required: true
+18
View File
@@ -0,0 +1,18 @@
# New backoffice
> **Warning**:
> This is an early WIP and is set not to be packable since we don't want to release this yet. There will be breaking changes in these projects.
This solution folder contains the projects for the new backoffice. If you're looking to fix or improve the existing CMS, this is not the place to do it, although we do very much appreciate your efforts.
### Project structure
Since the new backoffice API is still very much a work in progress, we've created new projects for the new backoffice API:
* Umbrao.Cms.ManagementApi - The "presentation layer" for the management API
* "New" versions of existing projects, should be merged with the existing projects when the new API is released:
* Umbraco.New.Cms.Core
* Umbraco.New.Cms.Infrastructure
* Umbraco.New.Cms.Web.Common
This also means that we have to use "InternalsVisibleTo" for the new projects since these should be able to access the internal classes since they will when they get merged.
+1 -1
View File
@@ -25,7 +25,7 @@ If you want to DIY, then you can [download Umbraco]((https://our.umbraco.com/dow
## Documentation
The documentation for Umbraco CMS can be found [on Our Umbraco](https://our.umbraco.com/documentation/). The source for the Umbraco docs is [open source as well](https://github.com/umbraco/UmbracoDocs) and we're happy to look at your documentation contributions.
The documentation for Umbraco CMS can be found [on Our Umbraco](https://docs.umbraco.com/). The source for the Umbraco docs is [open source as well](https://github.com/umbraco/UmbracoDocs) and we're happy to look at your documentation contributions.
## Join the Umbraco community
-25
View File
@@ -1,25 +0,0 @@
# Review process
You're an awesome person and have sent us your contribution in the form of a pull request! It's now time to relax for a bit and wait for our response.
In order to set some expectations, here's what happens next.
## Review process
You will get an initial reply within 48 hours (workdays) to acknowledge that weve seen your PR and well pick it up as soon as we can.
You will get feedback within at most 14 days after opening the PR. Youll most likely get feedback sooner though. Then there are a few possible outcomes:
- Your proposed change is awesome! We merge it in and it will be included in the next minor release of Umbraco
- If the change is a high priority bug fix, we will cherry-pick it into the next patch release as well so that we can release it as soon as possible
- Your proposed change is awesome but needs a bit more work, well give you feedback on the changes wed like to see
- Your proposed change is awesome but.. not something were looking to include at this point. Well close your PR and the related issue (well be nice about it!)
## Are you still available?
We understand you have other things to do and can't just drop everything to help us out.
So if were asking for your help to improve the PR well wait for two weeks to give you a fair chance to make changes. Well ask for an update if we dont hear back from you after that time.
If we dont hear back from you for 4 weeks, well close the PR so that it doesnt just hang around forever. Youre very welcome to re-open it once you have some more time to spend on it.
There will be times that we really like your proposed changes and well finish the final improvements wed like to see ourselves. You still get the credits and your commits will live on in the git repository.
+2 -1
View File
@@ -5,4 +5,5 @@ paths:
paths-ignore:
- '**/node_modules'
- 'src/Umbraco.Web.UI/wwwroot'
- 'src/Umbraco.Web.UI/wwwroot'
- 'src/Umbraco.Cms.StaticAssets/wwwroot'
+3
View File
@@ -0,0 +1,3 @@
<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z" fill="#57606A"></path>
</svg>

After

Width:  |  Height:  |  Size: 462 B

@@ -0,0 +1,58 @@
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 }}
+40 -9
View File
@@ -2,28 +2,59 @@ name: "Code scanning - action"
on:
push:
branches: ['*/dev','*/contrib']
branches:
- '*/dev'
- '*/contrib'
pull_request:
# The branches below must be a subset of the branches above
branches: ['*/dev','*/contrib']
branches:
- '*/dev'
- '*/contrib'
permissions:
contents: read
env:
dotnetVersion: 6.x
dotnetIncludePreviewVersions: false
solution: umbraco.sln
buildConfiguration: SkipTests
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
CodeQL-Build:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/analyze to upload SARIF results
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
config-file: ./.github/config/codeql-config.yml
- name: dotnet build
run: dotnet build umbraco-netcore-only.sln
- name: Use .NET ${{ env.dotnetVersion }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.dotnetVersion }}
include-prerelease: ${{ env.dotnetIncludePreviewVersions }}
- name: Run dotnet restore
run: dotnet restore ${{ env.solution }}
- name: Run dotnet build
run: dotnet build ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-restore -p:ContinuousIntegrationBuild=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
@@ -0,0 +1,53 @@
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);
}
+47 -16
View File
@@ -1,26 +1,57 @@
name: pr-first-response
on:
pull_request:
pull_request_target:
types: [opened]
jobs:
jobs:
send-response:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Fetch random comment 🗣️
uses: JamesIves/fetch-api-data-action@v2.1.0
with:
ENDPOINT: https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/comments/PostComment
CONFIGURATION: '{ "method": "POST", "headers": {"Authorization": "Bearer ${{ secrets.OUR_BOT_API_TOKEN }}", "Content-Type": "application/json" }, "body": { "repo": "${{ github.repository }}", "number": "${{ github.event.number }}", "actor": "${{ github.actor }}", "commentType": "opened-pr-first-comment"} }'
- name: Add PR comment
if: "${{ env.fetch-api-data != '' }}"
uses: actions/github-script@v5
- name: Fetch random comment 🗣️ and add it to the PR
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${{ env.fetch-api-data }}`
})
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-pr-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("Returned data not indicate success.");
if(response.status !== 200) {
console.log("Status code:", response.status)
}
console.log("Returned data:", data);
if(data === '') {
console.log("An empty response usually indicates that either no comment was found or the actor user was not eligible for getting an automated response (HQ users are not getting auto-responses).")
}
}
} catch(error) {
console.log(error);
}
@@ -0,0 +1,63 @@
name: labeled-up-for-grabs-first-comment
on:
issues:
types:
- labeled
jobs:
send-response:
if: github.event.label.name == 'community/up-for-grabs'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Install dependencies
run: |
npm install node-fetch@2
- name: Fetch 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.issue.number }}',
actor: '${{ github.event.issue.user.login }}',
commentType: 'labeled-up-for-grabs-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("Returned data not indicate success.");
if(response.status !== 200) {
console.log("Status code:", response.status)
}
console.log("Returned data:", data);
if(data === '') {
console.log("An empty response usually indicates that either no comment was found or the actor user was not eligible for getting an automated response (HQ users are not getting auto-responses).")
}
}
} catch(error) {
console.log(error);
};
+47 -50
View File
@@ -37,73 +37,70 @@ _NCrunch_*/
tools/NDepend/
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
[sS]ource
[sS]andbox
[Ss]ource
[Ss]andbox
node_modules
lib-bower
*.psess
*.vspx
NDependOut/*
NDependOut/
QueryResult.htm
tools/docfx/*
tools/docfx/
# Ignore rule for clearing out Belle (avoid rebuilding all the time)
preserve.belle
# Ignore rule for output of generated documentation files from grunt docserve
src/Umbraco.Web.UI.Docs/api
src/Umbraco.Web.UI.Docs/package-lock.json
/src/Umbraco.Web.UI.Docs/api/
/src/Umbraco.Web.UI.Docs/package-lock.json
# csharp-docs
/build/csharp-docs/api/
/build/csharp-docs/_site/
# Build
build.out/
build.tmp/
build/hooks/
build/temp/
/build.out/
/build.tmp/
/build/hooks/
/build/temp/
# Build output
build/docs.zip
build/ui-docs.zip
build/csharp-docs.zip
build/ApiDocs/*
build/ApiDocs/Output/*
src/ApiDocs/api/*
/build/docs.zip
/build/ui-docs.zip
/build/csharp-docs.zip
/src/Umbraco.Cms.StaticAssets/wwwroot/umbraco/
# Environment specific data
src/Umbraco.Web.UI.Client/[Bb]uild/*
src/Umbraco.Web.UI.Client/[Bb]uild/[Bb]elle/
src/Umbraco.Web.UI.Client/src/[Ll]ess/*.css
src/Umbraco.Web.UI.Client/TESTS-*.xml
src/Umbraco.Web.UI/[Uu]mbraco/[Dd]ata/*
src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ogs
src/Umbraco.Web.UI/[Uu]mbraco/[Mm]odels/*
src/Umbraco.Web.UI/appsettings.Development.json
src/Umbraco.Web.UI/appsettings.json
src/Umbraco.Web.UI/appsettings.Local.json
src/Umbraco.Web.UI/wwwroot/[Uu]mbraco/assets/*
src/Umbraco.Web.UI/wwwroot/[Uu]mbraco/js/*
src/Umbraco.Web.UI/wwwroot/[Uu]mbraco/lib/*
src/Umbraco.Web.UI/wwwroot/[Uu]mbraco/views/*
src/Umbraco.Web.UI/wwwroot/Media/*
src/Umbraco.Web.UI/Smidge/
src/Umbraco.Web.UI/App_Code/
src/Umbraco.Web.UI/App_Plugins/
src/Umbraco.Web.UI/Views/
!src/Umbraco.Web.UI/Views/Partials/blocklist/
!src/Umbraco.Web.UI/Views/Partials/grid/
!src/Umbraco.Web.UI/Views/_ViewImports.cshtml
/src/Umbraco.Web.UI.Client/[Bb]uild/
/src/Umbraco.Web.UI.Client/[Bb]uild/[Bb]elle/
/src/Umbraco.Web.UI.Client/src/[Ll]ess/*.css
/src/Umbraco.Web.UI.Client/TESTS-*.xml
/src/Umbraco.Web.UI/wwwroot/[Mm]edia/
/src/Umbraco.Web.UI/App_Code/
/src/Umbraco.Web.UI/App_Plugins/
/src/Umbraco.Web.UI/[Uu]mbraco/[Dd]ata/
/src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ogs/
/src/Umbraco.Web.UI/[Uu]mbraco/[Mm]odels/
/src/Umbraco.Web.UI/Views/
!/src/Umbraco.Web.UI/Views/Partials/blocklist/
!/src/Umbraco.Web.UI/Views/Partials/grid/
!/src/Umbraco.Web.UI/Views/_ViewImports.cshtml
/src/Umbraco.Web.UI/appsettings.json
/src/Umbraco.Web.UI/appsettings.Development.json
/src/Umbraco.Web.UI/appsettings.Local.json
# Tests
cypress.env.json
tests/Umbraco.Tests.AcceptanceTest/cypress/screenshots/
tests/Umbraco.Tests.AcceptanceTest/cypress/support/chainable.ts
tests/Umbraco.Tests.AcceptanceTest/cypress/videos/
tests/Umbraco.Tests.Integration.SqlCe/DatabaseContextTests.sdf
tests/Umbraco.Tests.Integration.SqlCe/umbraco/Data/TEMP/
tests/Umbraco.Tests.Integration/TEMP/*
tests/Umbraco.Tests.Integration/umbraco/Data/
tests/Umbraco.Tests.Integration/umbraco/logs/
tests/Umbraco.Tests.Integration/Views/
tests/Umbraco.Tests.UnitTests/umbraco/Data/TEMP/
/tests/Umbraco.Tests.AcceptanceTest/.env
/tests/Umbraco.Tests.Integration.SqlCe/DatabaseContextTests.sdf
/tests/Umbraco.Tests.Integration.SqlCe/[Uu]mbraco/[Dd]ata/TEMP/
/tests/Umbraco.Tests.Integration/appsettings.Tests.Local.json
/tests/Umbraco.Tests.Integration/TEMP/
/tests/Umbraco.Tests.Integration/[Uu]mbraco/[Dd]ata/
/tests/Umbraco.Tests.Integration/[Uu]mbraco/[Ll]ogs/
/tests/Umbraco.Tests.Integration/Views/
/tests/Umbraco.Tests.UnitTests/[Uu]mbraco/[Dd]ata/TEMP/
# Ignore auto-generated schema
src/Umbraco.Web.UI/umbraco/config/appsettings-schema.json
/src/Umbraco.Cms/appsettings-schema.json
/src/Umbraco.Web.UI/appsettings-schema.json
/tests/Umbraco.Tests.Integration/appsettings-schema.json
+3 -2
View File
@@ -50,6 +50,7 @@ dotnet_analyzer_diagnostic.category-StyleCop.CSharp.LayoutRules.severity = sugge
dotnet_diagnostic.SA1636.severity = none # SA1636: File header copyright text should match
dotnet_diagnostic.SA1101.severity = none # PrefixLocalCallsWithThis - stylecop appears to be ignoring dotnet_style_qualification_for_*
dotnet_diagnostic.SA1309.severity = none # FieldNamesMustNotBeginWithUnderscore
dotnet_diagnostic.SA1503.severity = warning # BracesMustNotBeOmitted
dotnet_diagnostic.SA1117.severity = warning # ParametersMustBeOnSameLineOrSeparateLines
@@ -70,8 +71,8 @@ dotnet_diagnostic.SA1132.severity = warning # DoNotCombineFields
dotnet_diagnostic.SA1134.severity = warning # AttributesMustNotShareLine
dotnet_diagnostic.SA1106.severity = warning # CodeMustNotContainEmptyStatements
dotnet_diagnostic.SA1312.severity = warning # VariableNamesMustBeginWithLowerCaseLetter
dotnet_diagnostic.SA1303.severity = warning # ConstFieldNamesMustBeginWithUpperCaseLetter
dotnet_diagnostic.SA1310.severity = warning # FieldNamesMustNotContainUnderscore
dotnet_diagnostic.SA1303.severity = warning # ConstFieldNamesMustBeginWithUpperCaseLetter
dotnet_diagnostic.SA1130.severity = warning # UseLambdaSyntax
dotnet_diagnostic.SA1405.severity = warning # DebugAssertMustProvideMessageText
dotnet_diagnostic.SA1205.severity = warning # PartialElementsMustDeclareAccess
@@ -79,4 +80,4 @@ dotnet_diagnostic.SA1306.severity = warning # FieldNamesMustBeginWithLowerCaseLe
dotnet_diagnostic.SA1209.severity = warning # UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives
dotnet_diagnostic.SA1216.severity = warning # UsingStaticDirectivesMustBePlacedAtTheCorrectLocation
dotnet_diagnostic.SA1133.severity = warning # DoNotCombineAttributes
dotnet_diagnostic.SA1135.severity = warning # UsingDirectivesMustBeQualified
dotnet_diagnostic.SA1135.severity = warning # UsingDirectivesMustBeQualified
+2 -3
View File
@@ -9,9 +9,8 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Dotnet build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Umbraco.Web.UI/bin/Debug/net5.0/Umbraco.Web.UI.dll",
"args": [],
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
+14 -1
View File
@@ -33,6 +33,18 @@
"$gulp-tsc"
]
},
{
"label": "Client Watch",
"detail": "runs npm run dev for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "dev",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": [
"$gulp-tsc"
]
},
{
"label": "Dotnet build",
"detail": "Dotnet build of SLN",
@@ -42,7 +54,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/umbraco-netcore-only.sln",
"${workspaceFolder}/umbraco.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
@@ -57,6 +69,7 @@
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
+50 -4
View File
@@ -1,7 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- Package references and additional files which are consumed by all projects -->
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Company>Umbraco HQ</Company>
<Authors>Umbraco</Authors>
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
<Product>Umbraco CMS</Product>
<PackageProjectUrl>https://umbraco.com/</PackageProjectUrl>
<PackageIconUrl>https://umbraco.com/dist/nuget/logo-small.png</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>umbraco</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<!-- SourceLink -->
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<!-- Package Validation -->
<PropertyGroup>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>10.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="Umbraco.Code" Version="2.0.0" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>
<PropertyGroup>
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
</PropertyGroup>
</Project>
-43
View File
@@ -1,43 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="4.1.0">
<id>Umbraco.Cms.SqlCe</id>
<version>9.0.0</version>
<title>Umbraco Cms Sql Ce Add-on</title>
<authors>Umbraco HQ</authors>
<owners>Umbraco HQ</owners>
<license type="expression">MIT</license>
<projectUrl>https://umbraco.com/</projectUrl>
<iconUrl>https://umbraco.com/dist/nuget/logo-small.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Contains the SQL CE assemblies needed to run Umbraco Cms. This package only contains assemblies and can be used for package development. Use the UmbracoCms package to setup Umbraco in Visual Studio as an ASP.NET Core project.</description>
<summary>Contains the SQL CE assemblies needed to run Umbraco Cms</summary>
<language>en-US</language>
<tags>umbraco</tags>
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
<dependencies>
<group targetFramework="netstandard2.0">
<!--
note: dependencies are specified as [x.y.z,x.999999) eg [2.1.0,2.999999) and NOT [2.1.0,3.0.0) because
the latter would pick anything below 3.0.0 and that includes prereleases such as 3.0.0-alpha, and we do
not want this to happen as the alpha of the next major is, really, the next major already.
-->
<dependency id="Umbraco.Cms.Core" version="[$version$]" />
<dependency id="Umbraco.SqlServerCE" version="[4.0.0.1,4.999999)" /> <!-- Hack it is only available in framework, but we need it on netstandard -->
</group>
</dependencies>
</metadata>
<files>
<!-- libs -->
<file src="$BuildTmp$\SqlCe\Umbraco.Persistence.SqlCe.dll" target="lib\netstandard2.0\Umbraco.Persistence.SqlCe.dll" />
<file src="$BuildTmp$\SqlCe\System.Data.SqlServerCe.dll" target="lib\netstandard2.0\System.Data.SqlServerCe.dll" /> <!-- Hack because the file from the package is only added to net472 projects -->
<!-- docs -->
<file src="$BuildTmp$\SqlCe\Umbraco.Persistence.SqlCe.xml" target="lib\netstandard2.0\Umbraco.Persistence.SqlCe.xml" />
<!-- symbols -->
<file src="$BuildTmp$\SqlCe\Umbraco.Persistence.SqlCe.pdb" target="lib\netstandard2.0\Umbraco.Persistence.SqlCe.pdb" />
</files>
</package>
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="4.1.0">
<id>Umbraco.Cms.StaticAssets</id>
<version>9.0.0</version>
<title>Umbraco Cms Static Assets</title>
<authors>Umbraco HQ</authors>
<owners>Umbraco HQ</owners>
<license type="expression">MIT</license>
<projectUrl>https://umbraco.com/</projectUrl>
<iconUrl>https://umbraco.com/dist/nuget/logo-small.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Contains the static assets that is required to run Umbraco CMS.</description>
<summary>Contains the static assets that is required to run Umbraco CMS.</summary>
<language>en-US</language>
<tags>umbraco</tags>
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
<dependencies>
</dependencies>
</metadata>
<files>
<!-- Content -->
<file src="$BuildTmp$\WebApp\wwwroot\umbraco\**\*.*" target="content\wwwroot\umbraco" />
<file src="$BuildTmp$\WebApp\umbraco\**\*.*" target="content\umbraco" />
<!-- UmbracoCms props and targets used to copy the content into the solution -->
<file src="buildTransitive\**" target="buildTransitive\" />
</files>
</package>
-33
View File
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="4.1.0">
<id>Umbraco.Cms</id>
<version>9.0.0</version>
<title>Umbraco Cms</title>
<authors>Umbraco HQ</authors>
<owners>Umbraco HQ</owners>
<license type="expression">MIT</license>
<projectUrl>https://umbraco.com/</projectUrl>
<iconUrl>https://umbraco.com/dist/nuget/logo-small.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Installs Umbraco Cms in your Visual Studio ASP.NET Core project</description>
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET Core project</summary>
<language>en-US</language>
<tags>umbraco</tags>
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
<dependencies>
<group targetFramework="net5.0">
<dependency id="Umbraco.Cms.Web.Website" version="[$version$]" />
<dependency id="Umbraco.Cms.Web.BackOffice" version="[$version$]" />
<dependency id="Umbraco.Cms.StaticAssets" version="[$version$]" />
</group>
</dependencies>
<!--
We can't use content files, as the files need to be copied into the solution, links/shortcuts to the files
are not good enough
-->
<contentFiles />
</metadata>
<files>
</files>
</package>
@@ -1,8 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes);App_Plugins/**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);umbraco/Data/**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);umbraco/Logs/**</DefaultItemExcludes>
<DefaultItemExcludes>$(DefaultItemExcludes);wwwroot/media/**</DefaultItemExcludes>
</PropertyGroup>
</Project>
@@ -1,91 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ContentFilesPath>$(MSBuildThisFileDirectory)..\content\umbraco\**\*.*</ContentFilesPath>
<ContentWwwrootFilesPath>$(MSBuildThisFileDirectory)..\content\wwwroot\umbraco\**\*.*</ContentWwwrootFilesPath>
<UmbracoWwwrootName Condition="'$(UmbracoWwwrootName)' == ''">umbraco</UmbracoWwwrootName>
</PropertyGroup>
<Target Name="CopyUmbracoAssets" BeforeTargets="BeforeBuild">
<ItemGroup>
<ContentFiles Include="$(ContentFilesPath)" />
<ContentWwwrootFiles Include="$(ContentWwwrootFilesPath)" />
</ItemGroup>
<Message Text="Copying Umbraco content files: $(ContentFilesPath) - #@(ContentFiles->Count()) files" Importance="high" />
<Message Text="Copying Umbraco wwwroot content files: $(ContentWwwrootFilesPath) - #@(ContentWwwrootFiles->Count()) files" Importance="high" />
<Copy
SourceFiles="@(ContentFiles)"
DestinationFiles="@(ContentFiles->'$(MSBuildProjectDirectory)\umbraco\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true" />
<Copy
SourceFiles="@(ContentWwwrootFiles)"
DestinationFiles="@(ContentWwwrootFiles->'$(MSBuildProjectDirectory)\wwwroot\$(UmbracoWwwrootName)\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true" />
</Target>
<Target Name="IncludeAppPluginsContent" BeforeTargets="GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems;">
<ItemGroup>
<_AppPluginsFiles Include="App_Plugins\**" />
<ContentWithTargetPath
Include="@(_AppPluginsFiles)"
Exclude="@(ContentWithTargetPath)"
TargetPath="%(Identity)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"/>
</ItemGroup>
</Target>
<!--
The set of files to publish is generated really early and doesn't currently account for files added by targets e.g. BeforeBuild.
A fix was put in place in Web SDK to update for wwwwroot in case someone runs npm build etc in a target, we're borrowing their trick.
https://github.com/dotnet/sdk/blob/e2b2b1a4ac56c955b84d62fe71cda3b6f258b42b/src/WebSdk/Publish/Targets/ComputeTargets/Microsoft.NET.Sdk.Publish.ComputeFiles.targets
-->
<Target Name="IncludeUmbracoFolderContent" BeforeTargets="GetCopyToOutputDirectoryItems;GetCopyToPublishDirectoryItems;">
<ItemGroup>
<_UmbracoFolderFiles Include="umbraco\config\**" />
<_UmbracoFolderFiles Include="umbraco\PartialViewMacros\**" />
<_UmbracoFolderFiles Include="umbraco\UmbracoBackOffice\**" />
<_UmbracoFolderFiles Include="umbraco\UmbracoInstall\**" />
<_UmbracoFolderFiles Include="umbraco\UmbracoWebsite\**" />
<_UmbracoFolderFiles Include="umbraco\UmbracoWebsite\**" />
<_UmbracoFolderFiles Include="umbraco\Licenses\**" />
<!-- This could be handled in deploy if it's not already -->
<_UmbracoFolderFiles Include="umbraco\Deploy\**" />
<ContentWithTargetPath
Include="@(_UmbracoFolderFiles)"
Exclude="@(ContentWithTargetPath)"
TargetPath="%(Identity)"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="PreserveNewest"/>
</ItemGroup>
</Target>
<Target Name="ClearUmbracoAssets" BeforeTargets="Clean">
<ItemGroup>
<UmbracoConfigPackageDir Include="$(MSBuildProjectDirectory)\umbraco\config\" />
<UmbracoPartialViewMacrosPackageDir Include="$(MSBuildProjectDirectory)\umbraco\PartialViewMacros\" />
<UmbracoUmbracoBackOfficeMacrosDir Include="$(MSBuildProjectDirectory)\umbraco\UmbracoBackOffice\" />
<UmbracoUmbracoInstallDir Include="$(MSBuildProjectDirectory)\umbraco\UmbracoInstall\" />
<UmbracoUmbracoWebsiteMacrosDir Include="$(MSBuildProjectDirectory)\umbraco\UmbracoWebsite\" />
<WwwrootUmbracoPackageDir Include="$(MSBuildProjectDirectory)\wwwroot\$(UmbracoWwwrootName)\" />
</ItemGroup>
<Message Text="Clear old umbraco data" Importance="high" />
<RemoveDir Directories="@(UmbracoConfigPackageDir)" />
<RemoveDir Directories="@(UmbracoPartialViewMacrosPackageDir)" />
<RemoveDir Directories="@(UmbracoUmbracoBackOfficeMacrosDir)" />
<RemoveDir Directories="@(UmbracoUmbracoInstallDir)" />
<RemoveDir Directories="@(UmbracoUmbracoWebsiteMacrosDir)" />
<RemoveDir Directories="@(WwwrootUmbracoPackageDir)" />
</Target>
<Target Name="IncludeUmbracoRazorFiles" BeforeTargets="ResolveRazorGenerateInputs">
<ItemGroup>
<Content Include="$(MSBuildProjectDirectory)\umbraco\**\*.cshtml" Exclude="@(Content)" />
</ItemGroup>
</Target>
</Project>
+621 -563
View File
File diff suppressed because it is too large Load Diff
-95
View File
@@ -1,95 +0,0 @@
# this script should be dot-sourced into the build.ps1 scripts
# right after the parameters declaration
# ie
# . "$PSScriptRoot\build-bootstrap.ps1"
# THIS FILE IS DISTRIBUTED AS PART OF UMBRACO.BUILD
# DO NOT MODIFY IT - ALWAYS USED THE COMMON VERSION
# ################################################################
# BOOTSTRAP
# ################################################################
# reset errors
$error.Clear()
# ensure we have temp folder for downloads
$scriptRoot = "$PSScriptRoot"
$scriptTemp = "$scriptRoot\temp"
if (-not (test-path $scriptTemp)) { mkdir $scriptTemp > $null }
# get NuGet
$cache = 4
$nuget = "$scriptTemp\nuget.exe"
# ensure the correct NuGet-source is used. This one is used by Umbraco
$nugetsourceUmbraco = "https://www.myget.org/F/umbracoprereleases/api/v3/index.json"
if (-not $local)
{
$source = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
if ((test-path $nuget) -and ((ls $nuget).CreationTime -lt [DateTime]::Now.AddDays(-$cache)))
{
Remove-Item $nuget -force -errorAction SilentlyContinue > $null
}
if (-not (test-path $nuget))
{
Write-Host "Download NuGet..."
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest $source -OutFile $nuget
if (-not $?) { throw "Failed to download NuGet." }
}
}
elseif (-not (test-path $nuget))
{
throw "Failed to locate NuGet.exe."
}
# NuGet notes
# As soon as we use -ConfigFile, NuGet uses that file, and only that file, and does not
# merge configuration from system level. See comments in NuGet.Client solution, class
# NuGet.Configuration.Settings, method LoadDefaultSettings.
# For NuGet to merge configurations, it needs to "find" the file in the current directory,
# or above. Which means we cannot really use -ConfigFile but instead have to have Umbraco's
# NuGet.config file at root, and always run NuGet.exe while at root or in a directory below
# root.
$solutionRoot = "$scriptRoot\.."
$testPwd = [System.IO.Path]::GetFullPath($pwd.Path) + "\"
$testRoot = [System.IO.Path]::GetFullPath($solutionRoot) + "\"
if (-not $testPwd.ToLower().StartsWith($testRoot.ToLower()))
{
throw "Cannot run outside of the solution's root."
}
# get the build system
if (-not $local)
{
$params = "-OutputDirectory", $scriptTemp, "-Verbosity", "quiet", "-PreRelease", "-Source", $nugetsourceUmbraco
&$nuget install Umbraco.Build @params
if (-not $?) { throw "Failed to download Umbraco.Build." }
}
# ensure we have the build system
$ubuildPath = ls "$scriptTemp\Umbraco.Build.*" | sort -property CreationTime -descending | select -first 1
if (-not $ubuildPath)
{
throw "Failed to locate the build system."
}
# boot the build system
# this creates $global:ubuild
return &"$ubuildPath\ps\Boot.ps1"
# at that point the build.ps1 script must boot the build system
# eg
# $ubuild.Boot($ubuildPath.FullName, [System.IO.Path]::GetFullPath("$scriptRoot\.."),
# @{ Local = $local; With7Zip = $false; WithNode = $false },
# @{ continue = $continue })
# if (-not $?) { throw "Failed to boot the build system." }
#
# and it's good practice to report
# eg
# Write-Host "Umbraco.Whatever Build"
# Write-Host "Umbraco.Build v$($ubuild.BuildVersion)"
# eof
-526
View File
@@ -1,526 +0,0 @@
param (
# get, don't execute
[Parameter(Mandatory=$false)]
[Alias("g")]
[switch] $get = $false,
# run local, don't download, assume everything is ready
[Parameter(Mandatory=$false)]
[Alias("l")]
[Alias("loc")]
[switch] $local = $false,
# enable docfx
[Parameter(Mandatory=$false)]
[Alias("doc")]
[switch] $docfx = $false,
# keep the build directories, don't clear them
[Parameter(Mandatory=$false)]
[Alias("c")]
[Alias("cont")]
[switch] $continue = $false,
# execute a command
[Parameter(Mandatory=$false, ValueFromRemainingArguments=$true)]
[String[]]
$command
)
# ################################################################
# BOOTSTRAP
# ################################################################
# create and boot the buildsystem
$ubuild = &"$PSScriptRoot\build-bootstrap.ps1"
if (-not $?) { return }
$ubuild.Boot($PSScriptRoot,
@{ Local = $local; WithDocFx = $docfx },
@{ Continue = $continue })
if ($ubuild.OnError()) { return }
Write-Host "Umbraco CMS Build"
Write-Host "Umbraco.Build v$($ubuild.BuildVersion)"
# ################################################################
# TASKS
# ################################################################
$ubuild.DefineMethod("SetMoreUmbracoVersion",
{
param ( $semver )
$port = "" + $semver.Major + $semver.Minor + ("" + $semver.Patch).PadLeft(2, '0')
Write-Host "Update port in launchSettings.json to $port"
$filePath = "$($this.SolutionRoot)\src\Umbraco.Web.UI\Properties\launchSettings.json"
$this.ReplaceFileText($filePath, `
"http://localhost:(\d+)?", `
"http://localhost:$port")
})
$ubuild.DefineMethod("SandboxNode",
{
$global:node_path = $env:path
$nodePath = $this.BuildEnv.NodePath
$gitExe = (Get-Command git).Source
if (-not $gitExe) { $gitExe = (Get-Command git).Path }
$gitPath = [System.IO.Path]::GetDirectoryName($gitExe)
$env:path = "$nodePath;$gitPath"
$global:node_nodepath = $this.ClearEnvVar("NODEPATH")
$global:node_npmcache = $this.ClearEnvVar("NPM_CONFIG_CACHE")
$global:node_npmprefix = $this.ClearEnvVar("NPM_CONFIG_PREFIX")
# https://github.com/gruntjs/grunt-contrib-connect/issues/235
$this.SetEnvVar("NODE_NO_HTTP2", "1")
})
$ubuild.DefineMethod("RestoreNode",
{
$env:path = $node_path
$this.SetEnvVar("NODEPATH", $node_nodepath)
$this.SetEnvVar("NPM_CONFIG_CACHE", $node_npmcache)
$this.SetEnvVar("NPM_CONFIG_PREFIX", $node_npmprefix)
$this.ClearEnvVar("NODE_NO_HTTP2")
})
$ubuild.DefineMethod("CompileBelle",
{
$src = "$($this.SolutionRoot)\src"
$log = "$($this.BuildTemp)\belle.log"
Write-Host "Compile Belle"
Write-Host "Logging to $log"
# get a temp clean node env (will restore)
$this.SandboxNode()
# stupid PS is going to gather all "warnings" in $error
# so we have to take care of it else they'll bubble and kill the build
if ($error.Count -gt 0) { return }
try {
Push-Location "$($this.SolutionRoot)\src\Umbraco.Web.UI.Client"
Write-Output "" > $log
Write-Output "### node version is:" > $log
node -v >> $log 2>&1
if (-not $?) { throw "Failed to report node version." }
Write-Output "### npm version is:" >> $log 2>&1
npm -v >> $log 2>&1
if (-not $?) { throw "Failed to report npm version." }
Write-Output "### clean npm cache" >> $log 2>&1
npm cache clean --force >> $log 2>&1
$error.Clear() # that one can fail 'cos security bug - ignore
Write-Output "### npm ci" >> $log 2>&1
npm ci >> $log 2>&1
Write-Output ">> $? $($error.Count)" >> $log 2>&1
# Don't really care about the messages from npm ci making us think there are errors
$error.Clear()
Write-Output "### gulp build for version $($this.Version.Release)" >> $log 2>&1
npm run build --buildversion=$this.Version.Release >> $log 2>&1
# We can ignore this warning, we need to update to node 12 at some point - https://github.com/jsdom/jsdom/issues/2939
$indexes = [System.Collections.ArrayList]::new()
$index = 0;
$error | ForEach-Object {
# Find which of the errors is the ExperimentalWarning
if($_.ToString().Contains("ExperimentalWarning: The fs.promises API is experimental")) {
[void]$indexes.Add($index)
}
$index++
}
$indexes | ForEach-Object {
# Loop through the list of indexes and remove the errors that we expect and feel confident we can ignore
$error.Remove($error[$_])
}
if (-not $?) { throw "Failed to build" } # that one is expected to work
} finally {
Pop-Location
# FIXME: should we filter the log to find errors?
#get-content .\build.tmp\belle.log | %{ if ($_ -match "build") { write $_}}
# restore
$this.RestoreNode()
}
# setting node_modules folder to hidden
# used to prevent VS13 from crashing on it while loading the websites project
# also makes sure aspnet compiler does not try to handle rogue files and chokes
# in VSO with Microsoft.VisualC.CppCodeProvider -related errors
# use get-item -force 'cos it might be hidden already
Write-Host "Set hidden attribute on node_modules"
$dir = Get-Item -force "$src\Umbraco.Web.UI.Client\node_modules"
$dir.Attributes = $dir.Attributes -bor ([System.IO.FileAttributes]::Hidden)
})
$ubuild.DefineMethod("CompileUmbraco",
{
$buildConfiguration = "Release"
$src = "$($this.SolutionRoot)\src"
$log = "$($this.BuildTemp)\build.umbraco.log"
Write-Host "Compile Umbraco"
Write-Host "Logging to $log"
& dotnet build "$src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" `
--configuration $buildConfiguration `
--output "$($this.BuildTemp)\bin\\" `
> $log
# get files into WebApp\bin
& dotnet publish "$src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" `
--configuration Release --output "$($this.BuildTemp)\WebApp\bin\\" `
> $log
& dotnet publish "$src\Umbraco.Persistence.SqlCe\Umbraco.Persistence.SqlCe.csproj" `
--configuration Release --output "$($this.BuildTemp)\SqlCe\" `
> $log
# remove extra files
$webAppBin = "$($this.BuildTemp)\WebApp\bin"
$excludeDirs = @("$($webAppBin)\refs","$($webAppBin)\runtimes","$($webAppBin)\umbraco","$($webAppBin)\wwwroot")
$excludeFiles = @("$($webAppBin)\appsettings.*","$($webAppBin)\*.deps.json","$($webAppBin)\*.exe","$($webAppBin)\*.config","$($webAppBin)\*.runtimeconfig.json")
$this.RemoveDirectory($excludeDirs)
$this.RemoveFile($excludeFiles)
# copy rest of the files into WebApp
$this.CopyFiles("$($this.SolutionRoot)\src\Umbraco.Web.UI\umbraco", "*", "$($this.BuildTemp)\WebApp\umbraco")
$excludeUmbracoDirs = @("$($this.BuildTemp)\WebApp\umbraco\lib","$($this.BuildTemp)\WebApp\umbraco\Data","$($this.BuildTemp)\WebApp\umbraco\Logs")
$this.RemoveDirectory($excludeUmbracoDirs)
$this.CopyFiles("$($this.SolutionRoot)\src\Umbraco.Web.UI\Views", "*", "$($this.BuildTemp)\WebApp\Views")
Copy-Item "$($this.SolutionRoot)\src\Umbraco.Web.UI\appsettings.json" "$($this.BuildTemp)\WebApp"
if (-not $?) { throw "Failed to compile Umbraco.Web.UI." }
# /p:UmbracoBuild tells the csproj that we are building from PS, not VS
})
$ubuild.DefineMethod("CompileJsonSchema",
{
Write-Host "Generating JSON Schema for AppSettings"
Write-Host "Logging to $($this.BuildTemp)\json.schema.log"
## NOTE: Need to specify the outputfile to point to the build temp folder
&dotnet run --project "$($this.SolutionRoot)\src\JsonSchema\JsonSchema.csproj" `
-c Release > "$($this.BuildTemp)\json.schema.log" `
-- `
--outputFile "$($this.BuildTemp)\WebApp\umbraco\config\appsettings-schema.json"
})
$ubuild.DefineMethod("PrepareTests",
{
Write-Host "Prepare Tests"
# FIXME: - idea is to avoid rebuilding everything for tests
# but because of our weird assembly versioning (with .* stuff)
# everything gets rebuilt all the time...
#Copy-Files "$tmp\bin" "." "$tmp\tests"
# data
Write-Host "Copy data files"
if (-not (Test-Path -Path "$($this.BuildTemp)\tests\Packaging" ))
{
Write-Host "Create packaging directory"
mkdir "$($this.BuildTemp)\tests\Packaging" > $null
}
#$this.CopyFiles("$($this.SolutionRoot)\src\Umbraco.Tests\Packaging\Packages", "*", "$($this.BuildTemp)\tests\Packaging\Packages")
# required for package install tests
if (-not (Test-Path -Path "$($this.BuildTemp)\tests\bin" ))
{
Write-Host "Create bin directory"
mkdir "$($this.BuildTemp)\tests\bin" > $null
}
})
$ubuild.DefineMethod("CompileTests",
{
$buildConfiguration = "Release"
$log = "$($this.BuildTemp)\msbuild.tests.log"
Write-Host "Compile Tests"
Write-Host "Logging to $log"
# beware of the weird double \\ at the end of paths
# see http://edgylogic.com/blog/powershell-and-external-commands-done-right/
&dotnet msbuild "$($this.SolutionRoot)\tests\Umbraco.Tests\Umbraco.Tests.csproj" `
-target:Build `
-property:WarningLevel=0 `
-property:Configuration=$buildConfiguration `
-property:Platform=AnyCPU `
-property:UseWPP_CopyWebApplication=True `
-property:PipelineDependsOnBuild=False `
-property:OutDir="$($this.BuildTemp)\tests\\" `
-property:Verbosity=minimal `
-property:UmbracoBuild=True `
> $log
# copy Umbraco.Persistence.SqlCe files into WebApp
Copy-Item "$($this.BuildTemp)\tests\Umbraco.Persistence.SqlCe.*" "$($this.BuildTemp)\WebApp\bin"
if (-not $?) { throw "Failed to compile tests." }
# /p:UmbracoBuild tells the csproj that we are building from PS
})
$ubuild.DefineMethod("PreparePackages",
{
Write-Host "Prepare Packages"
$src = "$($this.SolutionRoot)\src"
$tmp = "$($this.BuildTemp)"
# cleanup build
Write-Host "Clean build"
$this.RemoveFile("$tmp\bin\*.dll.config")
$this.RemoveFile("$tmp\WebApp\bin\*.dll.config")
# cleanup presentation
Write-Host "Cleanup presentation"
$this.RemoveDirectory("$tmp\WebApp\umbraco.presentation")
# create directories
Write-Host "Create directories"
mkdir "$tmp\WebApp\App_Data" > $null
#mkdir "$tmp\WebApp\Media" > $null
#mkdir "$tmp\WebApp\Views" > $null
# copy various files
Write-Host "Copy xml documentation"
Copy-Item -force "$tmp\bin\*.xml" "$tmp\WebApp\bin"
# offset the modified timestamps on all umbraco dlls, as WebResources
# break if date is in the future, which, due to timezone offsets can happen.
Write-Host "Offset dlls timestamps"
Get-ChildItem -r "$tmp\*.dll" | ForEach-Object {
$_.CreationTime = $_.CreationTime.AddHours(-11)
$_.LastWriteTime = $_.LastWriteTime.AddHours(-11)
}
# copy libs
Write-Host "Copy SqlCE libraries"
$nugetPackages = $env:NUGET_PACKAGES
if (-not $nugetPackages)
{
$nugetPackages = [System.Environment]::ExpandEnvironmentVariables("%userprofile%\.nuget\packages")
}
# copy Belle
Write-Host "Copy Belle"
$this.CopyFiles("$src\Umbraco.Web.UI\wwwroot\umbraco\assets", "*", "$tmp\WebApp\wwwroot\umbraco\assets")
$this.CopyFiles("$src\Umbraco.Web.UI\wwwroot\umbraco\js", "*", "$tmp\WebApp\wwwroot\umbraco\js")
$this.CopyFiles("$src\Umbraco.Web.UI\wwwroot\umbraco\lib", "*", "$tmp\WebApp\wwwroot\umbraco\lib")
$this.CopyFiles("$src\Umbraco.Web.UI\wwwroot\umbraco\views", "*", "$tmp\WebApp\wwwroot\umbraco\views")
})
$ubuild.DefineMethod("PrepareBuild",
{
Write-host "Set environment"
$env:UMBRACO_VERSION=$this.Version.Semver.ToString()
$env:UMBRACO_RELEASE=$this.Version.Release
$env:UMBRACO_COMMENT=$this.Version.Comment
$env:UMBRACO_BUILD=$this.Version.Build
$env:UMBRACO_TMP="$($this.SolutionRoot)\build.tmp"
if ($args -and $args[0] -eq "vso")
{
Write-host "Set VSO environment"
# set environment variable for VSO
# https://github.com/Microsoft/vsts-tasks/issues/375
# https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
Write-Host ("##vso[task.setvariable variable=UMBRACO_VERSION;]$($this.Version.Semver.ToString())")
Write-Host ("##vso[task.setvariable variable=UMBRACO_RELEASE;]$($this.Version.Release)")
Write-Host ("##vso[task.setvariable variable=UMBRACO_COMMENT;]$($this.Version.Comment)")
Write-Host ("##vso[task.setvariable variable=UMBRACO_BUILD;]$($this.Version.Build)")
Write-Host ("##vso[task.setvariable variable=UMBRACO_TMP;]$($this.SolutionRoot)\build.tmp")
}
})
$nugetsourceUmbraco = "https://api.nuget.org/v3/index.json"
$ubuild.DefineMethod("RestoreNuGet",
{
Write-Host "Restore NuGet"
Write-Host "Logging to $($this.BuildTemp)\nuget.restore.log"
$params = "-Source", $nugetsourceUmbraco
&$this.BuildEnv.NuGet restore "$($this.SolutionRoot)\umbraco-netcore-only.sln" > "$($this.BuildTemp)\nuget.restore.log" @params
if (-not $?) { throw "Failed to restore NuGet packages." }
})
$ubuild.DefineMethod("PackageNuGet",
{
$nuspecs = "$($this.SolutionRoot)\build\NuSpecs"
$templates = "$($this.SolutionRoot)\templates"
Write-Host "Create NuGet packages"
&dotnet pack "$($this.SolutionRoot)\umbraco-netcore-only.sln" `
--output "$($this.BuildOutput)" `
--verbosity detailed `
-c Release `
-p:PackageVersion="$($this.Version.Semver.ToString())" > "$($this.BuildTemp)\pack.umbraco.log"
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cms.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms." }
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.SqlCe.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmssqlce.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms.SqlCe." }
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.StaticAssets.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmsstaticassets.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms.StaticAssets." }
&$this.BuildEnv.NuGet Pack "$templates\Umbraco.Templates.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-NoDefaultExcludes `
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.templates.log"
if (-not $?) { throw "Failed to pack NuGet Umbraco.Templates." }
# run hook
if ($this.HasMethod("PostPackageNuGet"))
{
Write-Host "Run PostPackageNuGet hook"
$this.PostPackageNuGet();
if (-not $?) { throw "Failed to run hook." }
}
})
$ubuild.DefineMethod("VerifyNuGet",
{
$this.VerifyNuGetConsistency(
("UmbracoCms"),
("Umbraco.Core", "Umbraco.Infrastructure", "Umbraco.Web.UI", "Umbraco.Examine.Lucene", "Umbraco.PublishedCache.NuCache", "Umbraco.Web.Common", "Umbraco.Web.Website", "Umbraco.Web.BackOffice", "Umbraco.Persistence.SqlCe"))
if ($this.OnError()) { return }
})
$ubuild.DefineMethod("PrepareCSharpDocs",
{
Write-Host "Prepare C# Documentation"
$src = "$($this.SolutionRoot)\src"
$tmp = $this.BuildTemp
$out = $this.BuildOutput
$DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json"
$DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*"
# run DocFx
$DocFx = $this.BuildEnv.DocFx
& $DocFx metadata $DocFxJson
& $DocFx build $DocFxJson
# zip it
& $this.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput
})
$ubuild.DefineMethod("PrepareAngularDocs",
{
Write-Host "Prepare Angular Documentation"
$src = "$($this.SolutionRoot)\src"
$out = $this.BuildOutput
# Check if the solution has been built
if (!(Test-Path "$src\Umbraco.Web.UI.Client\node_modules")) {throw "Umbraco needs to be built before generating the Angular Docs"}
"Moving to Umbraco.Web.UI.Docs folder"
cd $src\Umbraco.Web.UI.Docs
"Generating the docs and waiting before executing the next commands"
& npm ci
& npx gulp docs
Pop-Location
# change baseUrl
$BaseUrl = "https://apidocs.umbraco.com/v9/ui/"
$IndexPath = "./api/index.html"
(Get-Content $IndexPath).replace('origin + location.href.substr(origin.length).replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
# zip it
& $this.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Docs\api\*.*"
})
$ubuild.DefineMethod("Build",
{
$error.Clear()
$this.PrepareBuild()
if ($this.OnError()) { return }
$this.RestoreNuGet()
if ($this.OnError()) { return }
$this.CompileBelle()
if ($this.OnError()) { return }
$this.CompileUmbraco()
if ($this.OnError()) { return }
$this.CompileJsonSchema()
if ($this.OnError()) { return }
$this.PrepareTests()
if ($this.OnError()) { return }
$this.CompileTests()
if ($this.OnError()) { return }
# not running tests
$this.PreparePackages()
if ($this.OnError()) { return }
$this.VerifyNuGet()
if ($this.OnError()) { return }
$this.PackageNuGet()
if ($this.OnError()) { return }
$this.PostPackageHook()
if ($this.OnError()) { return }
Write-Host "Done"
})
$ubuild.DefineMethod("PostPackageHook",
{
# run hook
if ($this.HasMethod("PostPackage"))
{
Write-Host "Run PostPackage hook"
$this.PostPackage();
if (-not $?) { throw "Failed to run hook." }
}
})
# ################################################################
# RUN
# ################################################################
# configure
$ubuild.ReleaseBranches = @( "master" )
# run
if (-not $get)
{
if ($command.Length -eq 0)
{
$command = @( "Build" )
}
$ubuild.RunMethod($command);
if ($ubuild.OnError()) { return }
}
if ($get) { return $ubuild }
@@ -3,18 +3,17 @@
{
"src": [
{
"src": "../",
"src": "../../src",
"files": [
"**/*.csproj",
"**/Umbraco.Infrastructure/**/*.cs"
"**/*.csproj"
],
"exclude": [
"**/obj/**",
"**/bin/**",
"**/Umbraco.Web.csproj",
"**/Umbraco.Infrastructure.csproj",
"**/Umbraco.Web.UI.csproj",
"**/**.Test**/*.csproj"
"**/Umbraco.Cms.StaticAssets.csproj",
"**/JsonSchema.csproj"
]
}
],
+35
View File
@@ -0,0 +1,35 @@
name: Nightly_$(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
pr: none
trigger: none
schedules:
- cron: '0 0 * * *'
displayName: Daily midnight build
branches:
include:
- v10/dev
- v12/dev
- v13/dev
- v14/dev
steps:
- checkout: none
- task: TriggerBuild@4
inputs:
definitionIsInCurrentTeamProject: true
buildDefinition: '301'
queueBuildForUserThatTriggeredBuild: true
ignoreSslCertificateErrors: false
useSameSourceVersion: false
useCustomSourceVersion: false
useSameBranch: true
waitForQueuedBuildsToFinish: false
storeInEnvironmentVariable: false
templateParameters: 'sqlServerIntegrationTests: true, forceReleaseTestFilter: true, myGetDeploy: true, isNightly: true'
authenticationMethod: 'OAuth Token'
enableBuildInQueueCondition: false
dependentOnSuccessfulBuildCondition: false
dependentOnFailedBuildCondition: false
checkbuildsoncurrentbranch: false
failTaskIfConditionsAreNotFulfilled: false
+6
View File
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "6.0.300",
"rollForward": "latestFeature"
}
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+53
View File
@@ -0,0 +1,53 @@
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);
}
-42
View File
@@ -1,42 +0,0 @@
<Project>
<!-- Enable multi-level merging -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<Version>9.5.1</Version>
<AssemblyVersion>9.5.1</AssemblyVersion>
<InformationalVersion>9.5.1</InformationalVersion>
<FileVersion>9.5.1</FileVersion>
<LangVersion Condition="'$(LangVersion)' == ''">9.0</LangVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<Company>Umbraco CMS</Company>
<Copyright>Copyright © Umbraco 2021</Copyright>
<Authors>Umbraco HQ</Authors>
<PackageProjectUrl>https://umbraco.com/</PackageProjectUrl>
<PackageIconUrl>https://umbraco.com/dist/nuget/logo-small.png</PackageIconUrl>
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>umbraco</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/umbraco/umbraco-cms</RepositoryUrl>
</PropertyGroup>
<PropertyGroup>
<!-- SourceLink: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element)-->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- SourceLink: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- SourceLink: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<!-- SourceLink: Deterministic -->
<!-- https://github.com/clairernovotny/DeterministicBuilds -->
<!-- Only for Azure Pipelines CI Build -->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>
+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NoWarn>NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
<PackageVersion Include="Examine" Version="3.0.1" />
<PackageVersion Include="Examine.Core" Version="3.0.1" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.54" />
<PackageVersion Include="IPNetwork2" Version="2.6.618" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.6" />
<PackageVersion Include="MailKit" Version="3.2.0" />
<PackageVersion Include="Markdown" Version="2.2.1" />
<PackageVersion Include="MessagePack" Version="2.5.187" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.24" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.24" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="6.0.24" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.24" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="6.0.24" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="6.0.24" />
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.2.22" />
<PackageVersion Include="ncrontab" Version="3.3.3" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NPoco.SqlServer" Version="5.3.2" />
<PackageVersion Include="Serilog" Version="2.12.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageVersion Include="Serilog.Enrichers.Process" Version="2.0.2" />
<PackageVersion Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageVersion Include="Serilog.Expressions" Version="3.4.1" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="4.2.0" />
<PackageVersion Include="Serilog.Formatting.Compact" Version="1.1.0" />
<PackageVersion Include="Serilog.Formatting.Compact.Reader" Version="1.0.5" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageVersion Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageVersion Include="Serilog.Sinks.Map" Version="1.0.2" />
<PackageVersion Include="SixLabors.ImageSharp" Version="2.1.10" />
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="2.0.2" />
<PackageVersion Include="Smidge.InMemory" Version="4.3.0" />
<PackageVersion Include="Smidge.Nuglify" Version="4.2.1" />
<PackageVersion Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="6.0.4" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="6.0.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
<PackageVersion Include="System.Runtime.Caching" Version="6.0.0" />
<PackageVersion Include="Umbraco.CSharpTest.Net.Collections" Version="14.906.1403.1085" />
<!-- Add dependencies that we force an update to, even that we do not use them explicitly and they seems to be taken from the framework instead of from Nuget -->
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="6.0.1" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
</Project>
+58 -44
View File
@@ -16,7 +16,7 @@ namespace JsonSchema
/// <summary>
/// Gets or sets the Umbraco
/// </summary>
public UmbracoDefinition Umbraco { get; set; }
public UmbracoDefinition? Umbraco { get; set; }
/// <summary>
/// Configuration of Umbraco CMS and packages
@@ -24,76 +24,90 @@ namespace JsonSchema
internal class UmbracoDefinition
{
// ReSharper disable once InconsistentNaming
public CmsDefinition CMS { get; set; }
public CmsDefinition? CMS { get; set; }
public FormsDefinition Forms { get; set; }
public FormsDefinition? Forms { get; set; }
public DeployDefinition Deploy { get; set; }
public DeployDefinition? Deploy { get; set; }
/// <summary>
/// Configurations for the Umbraco CMS
/// </summary>
public class CmsDefinition
{
public ActiveDirectorySettings ActiveDirectory { get; set; }
public ContentSettings? Content { get; set; }
public CoreDebugSettings? Debug { get; set; }
public ContentSettings Content { get; set; }
public ExceptionFilterSettings? ExceptionFilter { get; set; }
public ExceptionFilterSettings ExceptionFilter { get; set; }
public ModelsBuilderSettings? ModelsBuilder { get; set; }
public ModelsBuilderSettings ModelsBuilder { get; set; }
public GlobalSettings? Global { get; set; }
public GlobalSettings Global { get; set; }
public HealthChecksSettings? HealthChecks { get; set; }
public HealthChecksSettings HealthChecks { get; set; }
public HostingSettings? Hosting { get; set; }
public HostingSettings Hosting { get; set; }
public ImagingSettings? Imaging { get; set; }
public ImagingSettings Imaging { get; set; }
public IndexCreatorSettings? Examine { get; set; }
public IndexingSettings? Indexing { get; set; }
public IndexCreatorSettings Examine { get; set; }
public KeepAliveSettings? KeepAlive { get; set; }
public KeepAliveSettings KeepAlive { get; set; }
public LoggingSettings? Logging { get; set; }
public LoggingSettings Logging { get; set; }
public NuCacheSettings? NuCache { get; set; }
public MemberPasswordConfigurationSettings MemberPassword { get; set; }
public RequestHandlerSettings? RequestHandler { get; set; }
public NuCacheSettings NuCache { get; set; }
public RuntimeSettings? Runtime { get; set; }
public RequestHandlerSettings RequestHandler { get; set; }
public SecuritySettings? Security { get; set; }
public RuntimeSettings Runtime { get; set; }
public TourSettings? Tours { get; set; }
public SecuritySettings Security { get; set; }
public TypeFinderSettings? TypeFinder { get; set; }
public TourSettings Tours { get; set; }
public WebRoutingSettings? WebRouting { get; set; }
public TypeFinderSettings TypeFinder { get; set; }
public UmbracoPluginSettings? Plugins { get; set; }
public UserPasswordConfigurationSettings UserPassword { get; set; }
public UnattendedSettings? Unattended { get; set; }
public WebRoutingSettings WebRouting { get; set; }
public RichTextEditorSettings? RichTextEditor { get; set; }
public UmbracoPluginSettings Plugins { get; set; }
public RuntimeMinificationSettings? RuntimeMinification { get; set; }
public UnattendedSettings Unattended { get; set; }
public BasicAuthSettings? BasicAuth { get; set; }
public RichTextEditorSettings RichTextEditor { get; set; }
public PackageMigrationSettings? PackageMigration { get; set; }
public RuntimeMinificationSettings RuntimeMinification { get; set; }
public LegacyPasswordMigrationSettings? LegacyPasswordMigration { get; set; }
public BasicAuthSettings BasicAuth { get; set; }
public ContentDashboardSettings? ContentDashboard { get; set; }
public PackageMigrationSettings PackageMigration { get; set; }
public HelpPageSettings? HelpPage { get; set; }
public LegacyPasswordMigrationSettings LegacyPasswordMigration { get; set; }
public InstallDefaultData? InstallDefaultData { get; set; }
public ContentDashboardSettings ContentDashboard { get; set; }
public DataTypesSettings? DataTypes { get; set; }
public HelpPageSettings HelpPage { get; set; }
public MarketplaceSettings? Marketplace { get; set; }
}
public InstallDefaultDataSettings DefaultDataCreation { 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>
@@ -101,24 +115,24 @@ namespace JsonSchema
/// </summary>
public class FormsDefinition
{
public FormDesignSettings FormDesign { get; set; }
public FormDesignSettings? FormDesign { get; set; }
public PackageOptionSettings Options { get; set; }
public PackageOptionSettings? Options { get; set; }
public Umbraco.Forms.Core.Configuration.SecuritySettings Security { get; set; }
public Umbraco.Forms.Core.Configuration.SecuritySettings? Security { get; set; }
public FieldTypesDefinition FieldTypes { 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 DatePickerSettings? DatePicker { get; set; }
public Recaptcha2Settings Recaptcha2 { get; set; }
public Recaptcha2Settings? Recaptcha2 { get; set; }
public Recaptcha3Settings Recaptcha3 { get; set; }
public Recaptcha3Settings? Recaptcha3 { get; set; }
}
}
@@ -127,11 +141,11 @@ namespace JsonSchema
/// </summary>
public class DeployDefinition
{
public DeploySettings Settings { get; set; }
public DeploySettings? Settings { get; set; }
public DeployProjectConfig Project { get; set; }
public DeployProjectConfig? Project { get; set; }
public DebugSettings Debug { get; set; }
public DebugSettings? Debug { get; set; }
}
}
}
+6 -28
View File
@@ -1,41 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="NJsonSchema" Version="10.5.2" />
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="4.3.0" />
<PackageReference Include="Umbraco.Deploy.Core" Version="9.2.0" />
<PackageReference Include="Umbraco.Forms.Core" Version="9.2.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="NJsonSchema" Version="10.9.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="NJsonSchema" Version="10.5.2" />
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="4.3.0" />
<PackageReference Include="Umbraco.Deploy.Core" Version="9.4.0" />
<PackageReference Include="Umbraco.Forms.Core" Version="9.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<PackageReference Include="Umbraco.Deploy.Core" Version="10.4.0" />
<PackageReference Include="Umbraco.Forms.Core" Version="10.5.4" />
</ItemGroup>
<!-- Copy Forms XML docs-->
<PropertyGroup>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
</PropertyGroup>
<Target Name="CopyPackagesXml" BeforeTargets="Build">
<ItemGroup>
<PackageReferenceFiles Include="$(NugetPackageRoot)%(PackageReference.Identity)\%(PackageReference.Version)%(PackageReference.CopyToOutputDirectory)\lib\**\*.xml" />
</ItemGroup>
<Copy SourceFiles="@(PackageReferenceFiles)" DestinationFolder="$(OutDir)" />
</Target>
</Project>
@@ -8,6 +8,6 @@ namespace JsonSchema
{
internal class NamespacePrefixedSchemaNameGenerator : DefaultSchemaNameGenerator
{
public override string Generate(Type type) => type.Namespace.Replace(".", string.Empty) + base.Generate(type);
public override string Generate(Type type) => type.Namespace?.Replace(".", string.Empty) + base.Generate(type);
}
}
+2 -2
View File
@@ -7,7 +7,7 @@ namespace JsonSchema
{
internal class Options
{
[Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "../../../../Umbraco.Web.UI/umbraco/config/appsettings-schema.json")]
public string OutputFile { get; set; }
[Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "appsettings-schema.json")]
public string OutputFile { get; set; } = null!;
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ namespace JsonSchema
var path = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, options.OutputFile));
Console.WriteLine("Path to use {0}", path);
Directory.CreateDirectory(Path.GetDirectoryName(path));
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
Console.WriteLine("Ensured directory exists");
await File.WriteAllTextAsync(path, schema);
+7 -5
View File
@@ -1,11 +1,10 @@
// Copyright (c) Umbraco.
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NJsonSchema.Generation;
using Umbraco.Cms.Core.Configuration.Models;
namespace JsonSchema
{
@@ -43,14 +42,17 @@ namespace JsonSchema
var result = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<JObject>(result);
return JsonConvert.DeserializeObject<JObject>(result)!;
}
private JObject GenerateUmbracoSchema()
{
NJsonSchema.JsonSchema schema = _innerGenerator.Generate(typeof(AppSettings));
return JsonConvert.DeserializeObject<JObject>(schema.ToJson());
// 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())!;
}
}
}
@@ -0,0 +1,45 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Umbraco.Cms.ManagementApi.Builders;
public class ProblemDetailsBuilder
{
private string? _title;
private string? _detail;
private int _status = StatusCodes.Status400BadRequest;
private string? _type;
public ProblemDetailsBuilder WithTitle(string title)
{
_title = title;
return this;
}
public ProblemDetailsBuilder WithDetail(string detail)
{
_detail = detail;
return this;
}
public ProblemDetailsBuilder WithStatus(int status)
{
_status = status;
return this;
}
public ProblemDetailsBuilder WithType(string type)
{
_type = type;
return this;
}
public ProblemDetails Build() =>
new()
{
Title = _title,
Detail = _detail,
Status = _status,
Type = _type ?? "Error",
};
}
@@ -0,0 +1,26 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Configuration;
public class ConfigureMvcOptions : IConfigureOptions<MvcOptions>
{
private readonly IOptions<GlobalSettings> _globalSettings;
public ConfigureMvcOptions(IOptions<GlobalSettings> globalSettings)
{
_globalSettings = globalSettings;
}
public void Configure(MvcOptions options)
{
// Replace the BackOfficeToken in routes.
var backofficePath = _globalSettings.Value.UmbracoPath.TrimStart(Constants.CharArrays.TildeForwardSlash);
options.Conventions.Add(new UmbracoBackofficeToken(Constants.Web.AttributeRouting.BackOfficeToken, backofficePath));
}
}
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
public class AllAnalyticsController : AnalyticsControllerBase
{
[HttpGet("all")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<TelemetryLevel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<TelemetryLevel>> GetAll(int skip, int take)
{
TelemetryLevel[] levels = Enum.GetValues<TelemetryLevel>();
return await Task.FromResult(new PagedViewModel<TelemetryLevel>
{
Total = levels.Length,
Items = levels.Skip(skip).Take(take),
});
}
}
@@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/analytics")]
[OpenApiTag("Analytics")]
[ApiVersion("1.0")]
public abstract class AnalyticsControllerBase : ManagementApiControllerBase
{
}
@@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Analytics;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
public class GetAnalyticsController : AnalyticsControllerBase
{
private readonly IMetricsConsentService _metricsConsentService;
public GetAnalyticsController(IMetricsConsentService metricsConsentService) => _metricsConsentService = metricsConsentService;
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(AnalyticsLevelViewModel), StatusCodes.Status200OK)]
public async Task<AnalyticsLevelViewModel> Get() => await Task.FromResult(new AnalyticsLevelViewModel { AnalyticsLevel = _metricsConsentService.GetConsentLevel() });
}
@@ -0,0 +1,36 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Analytics;
using Umbraco.Cms.ManagementApi.ViewModels.Server;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
public class SetAnalyticsController : AnalyticsControllerBase
{
private readonly IMetricsConsentService _metricsConsentService;
public SetAnalyticsController(IMetricsConsentService metricsConsentService) => _metricsConsentService = metricsConsentService;
[HttpPost]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<IActionResult> SetConsentLevel(AnalyticsLevelViewModel analyticsLevelViewModel)
{
if (!Enum.IsDefined(analyticsLevelViewModel.AnalyticsLevel))
{
var invalidModelProblem = new ProblemDetails
{
Title = "Invalid AnalyticsLevel value",
Detail = "The provided value for AnalyticsLevel is not valid",
Status = StatusCodes.Status400BadRequest,
Type = "Error",
};
return BadRequest(invalidModelProblem);
}
_metricsConsentService.SetConsentLevel(analyticsLevelViewModel.AnalyticsLevel);
return await Task.FromResult(Ok());
}
}
@@ -0,0 +1,33 @@
using System.Globalization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.ManagementApi.ViewModels.Culture;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
namespace Umbraco.Cms.ManagementApi.Controllers.Culture;
public class AllCultureController : CultureControllerBase
{
private readonly IUmbracoMapper _umbracoMapper;
public AllCultureController(IUmbracoMapper umbracoMapper) => _umbracoMapper = umbracoMapper;
/// <summary>
/// Returns all cultures available for creating languages.
/// </summary>
/// <returns></returns>
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<CultureViewModel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<CultureViewModel>> GetAll(int skip, int take)
{
IEnumerable<CultureInfo> list = CultureInfo.GetCultures(CultureTypes.AllCultures)
.DistinctBy(x => x.Name)
.OrderBy(x => x.EnglishName)
.Skip(skip)
.Take(take);
return await Task.FromResult(_umbracoMapper.Map<PagedViewModel<CultureViewModel>>(list)!);
}
}
@@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Culture;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/culture")]
[OpenApiTag("Culture")]
[ApiVersion("1.0")]
public abstract class CultureControllerBase : ManagementApiControllerBase
{
}
@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DataType.Tree;
public class ChildrenDataTypeTreeController : DataTypeTreeControllerBase
{
public ChildrenDataTypeTreeController(IEntityService entityService, IDataTypeService dataTypeService)
: base(entityService, dataTypeService)
{
}
[HttpGet("children")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<FolderTreeItemViewModel>>> Children(Guid parentKey, int skip = 0, int take = 100, bool foldersOnly = false)
{
RenderFoldersOnly(foldersOnly);
return await GetChildren(parentKey, skip, take);
}
}
@@ -0,0 +1,46 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.DataType.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DataType}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DataType))]
public class DataTypeTreeControllerBase : FolderTreeControllerBase<FolderTreeItemViewModel>
{
private readonly IDataTypeService _dataTypeService;
public DataTypeTreeControllerBase(IEntityService entityService, IDataTypeService dataTypeService)
: base(entityService) =>
_dataTypeService = dataTypeService;
protected override UmbracoObjectTypes ItemObjectType => UmbracoObjectTypes.DataType;
protected override UmbracoObjectTypes FolderObjectType => UmbracoObjectTypes.DataTypeContainer;
protected override FolderTreeItemViewModel[] MapTreeItemViewModels(Guid? parentKey, IEntitySlim[] entities)
{
var dataTypes = _dataTypeService
.GetAll(entities.Select(entity => entity.Id).ToArray())
.ToDictionary(contentType => contentType.Id);
return entities.Select(entity =>
{
FolderTreeItemViewModel viewModel = MapTreeItemViewModel(parentKey, entity);
if (dataTypes.TryGetValue(entity.Id, out IDataType? dataType))
{
viewModel.Icon = dataType.Editor?.Icon ?? viewModel.Icon;
}
return viewModel;
}).ToArray();
}
}
@@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DataType.Tree;
public class ItemsDataTypeTreeController : DataTypeTreeControllerBase
{
public ItemsDataTypeTreeController(IEntityService entityService, IDataTypeService dataTypeService)
: base(entityService, dataTypeService)
{
}
[HttpGet("items")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FolderTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
=> await GetItems(keys);
}
@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DataType.Tree;
public class RootDataTypeTreeController : DataTypeTreeControllerBase
{
public RootDataTypeTreeController(IEntityService entityService, IDataTypeService dataTypeService)
: base(entityService, dataTypeService)
{
}
[HttpGet("root")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<FolderTreeItemViewModel>>> Root(int skip = 0, int take = 100, bool foldersOnly = false)
{
RenderFoldersOnly(foldersOnly);
return await GetRoot(skip, take);
}
}
@@ -0,0 +1,69 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Dictionary;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class AllDictionaryController : DictionaryControllerBase
{
private readonly ILocalizationService _localizationService;
private readonly IUmbracoMapper _umbracoMapper;
public AllDictionaryController(ILocalizationService localizationService, IUmbracoMapper umbracoMapper)
{
_localizationService = localizationService;
_umbracoMapper = umbracoMapper;
}
/// <summary>
/// Retrieves a list with all dictionary items
/// </summary>
/// <returns>
/// The <see cref="IEnumerable{T}" />.
/// </returns>
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<DictionaryOverviewViewModel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<DictionaryOverviewViewModel>> All(int skip, int take)
{
IDictionaryItem[] items = _localizationService.GetDictionaryItemDescendants(null).ToArray();
var list = new List<DictionaryOverviewViewModel>(items.Length);
// Build the proper tree structure, as we can have nested dictionary items
BuildTree(list, items);
var model = new PagedViewModel<DictionaryOverviewViewModel>
{
Total = list.Count,
Items = list.Skip(skip).Take(take),
};
return await Task.FromResult(model);
}
// recursive method to build a tree structure from the flat structure returned above
private void BuildTree(List<DictionaryOverviewViewModel> list, IDictionaryItem[] items, int level = 0, Guid? parentId = null)
{
IDictionaryItem[] children = items.Where(t => t.ParentId == parentId).ToArray();
if (children.Any() == false)
{
return;
}
foreach (IDictionaryItem child in children.OrderBy(item => item.ItemKey))
{
DictionaryOverviewViewModel? display = _umbracoMapper.Map<IDictionaryItem, DictionaryOverviewViewModel>(child);
if (display is not null)
{
display.Level = level;
list.Add(display);
}
BuildTree(list, items, level + 1, child.Key);
}
}
}
@@ -0,0 +1,47 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Dictionary;
using Umbraco.New.Cms.Core.Factories;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class ByIdDictionaryController : DictionaryControllerBase
{
private readonly ILocalizationService _localizationService;
private readonly IDictionaryFactory _dictionaryFactory;
public ByIdDictionaryController(
ILocalizationService localizationService,
IDictionaryFactory dictionaryFactory)
{
_localizationService = localizationService;
_dictionaryFactory = dictionaryFactory;
}
/// <summary>
/// Gets a dictionary item by guid
/// </summary>
/// <param name="key">
/// The id.
/// </param>
/// <returns>
/// The <see cref="DictionaryDisplay" />. Returns a not found response when dictionary item does not exist
/// </returns>
[HttpGet("{key:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(DictionaryViewModel), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(NotFoundResult), StatusCodes.Status404NotFound)]
public async Task<ActionResult<DictionaryViewModel>> ByKey(Guid key)
{
IDictionaryItem? dictionary = _localizationService.GetDictionaryItemById(key);
if (dictionary == null)
{
return NotFound();
}
return await Task.FromResult(_dictionaryFactory.CreateDictionaryViewModel(dictionary));
}
}
@@ -0,0 +1,90 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Dictionary;
using Umbraco.Extensions;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class CreateDictionaryController : DictionaryControllerBase
{
private readonly ILocalizationService _localizationService;
private readonly ILocalizedTextService _localizedTextService;
private readonly GlobalSettings _globalSettings;
private readonly IBackOfficeSecurityAccessor _backofficeSecurityAccessor;
private readonly ILogger<CreateDictionaryController> _logger;
public CreateDictionaryController(
ILocalizationService localizationService,
ILocalizedTextService localizedTextService,
IOptionsSnapshot<GlobalSettings> globalSettings,
IBackOfficeSecurityAccessor backofficeSecurityAccessor,
ILogger<CreateDictionaryController> logger)
{
_localizationService = localizationService;
_localizedTextService = localizedTextService;
_globalSettings = globalSettings.Value;
_backofficeSecurityAccessor = backofficeSecurityAccessor;
_logger = logger;
}
/// <summary>
/// Creates a new dictionary item
/// </summary>
/// <param name="dictionaryViewModel">The viewmodel to pass to the action</param>
/// <returns>
/// The <see cref="HttpResponseMessage" />.
/// </returns>
[HttpPost("create")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(CreatedResult), StatusCodes.Status201Created)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<ActionResult<int>> Create(DictionaryItemViewModel dictionaryViewModel)
{
if (string.IsNullOrEmpty(dictionaryViewModel.Key.ToString()))
{
return ValidationProblem("Key can not be empty."); // TODO: translate
}
if (_localizationService.DictionaryItemExists(dictionaryViewModel.Key.ToString()))
{
var message = _localizedTextService.Localize(
"dictionaryItem",
"changeKeyError",
_backofficeSecurityAccessor.BackOfficeSecurity?.CurrentUser?.GetUserCulture(_localizedTextService, _globalSettings),
new Dictionary<string, string?>
{
{ "0", dictionaryViewModel.Key.ToString() },
});
return await Task.FromResult(ValidationProblem(message));
}
try
{
Guid? parentGuid = null;
if (dictionaryViewModel.ParentId.HasValue)
{
parentGuid = dictionaryViewModel.ParentId;
}
IDictionaryItem item = _localizationService.CreateDictionaryItemWithIdentity(
dictionaryViewModel.Key.ToString(),
parentGuid,
string.Empty);
return await Task.FromResult(Created($"api/v1.0/dictionary/{item.Key}", item.Key));
}
catch (Exception ex)
{
_logger.LogError(ex, "Error creating dictionary with {Name} under {ParentId}", dictionaryViewModel.Key, dictionaryViewModel.ParentId);
return await Task.FromResult(ValidationProblem("Error creating dictionary item"));
}
}
}
@@ -0,0 +1,51 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class DeleteDictionaryController : DictionaryControllerBase
{
private readonly ILocalizationService _localizationService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
public DeleteDictionaryController(ILocalizationService localizationService, IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
{
_localizationService = localizationService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
}
/// <summary>
/// Deletes a data type with a given ID
/// </summary>
/// <param name="key">The key of the dictionary item to delete</param>
/// <returns>
/// <see cref="HttpResponseMessage" />
/// </returns>
[HttpDelete("{key}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(typeof(NotFoundResult), StatusCodes.Status404NotFound)]
public async Task<IActionResult> Delete(Guid key)
{
IDictionaryItem? foundDictionary = _localizationService.GetDictionaryItemByKey(key.ToString());
if (foundDictionary == null)
{
return await Task.FromResult(NotFound());
}
IEnumerable<IDictionaryItem> foundDictionaryDescendants =
_localizationService.GetDictionaryItemDescendants(foundDictionary.Key);
foreach (IDictionaryItem dictionaryItem in foundDictionaryDescendants)
{
_localizationService.Delete(dictionaryItem, _backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser?.Id ?? -1);
}
_localizationService.Delete(foundDictionary, _backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser?.Id ?? -1);
return await Task.FromResult(Ok());
}
}
@@ -0,0 +1,14 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/dictionary")]
[OpenApiTag("Dictionary")]
[ApiVersion("1.0")]
// TODO: Add authentication
public abstract class DictionaryControllerBase : ManagementApiControllerBase
{
}
@@ -0,0 +1,44 @@
using System.Net.Mime;
using System.Text;
using System.Xml.Linq;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class ExportDictionaryController : DictionaryControllerBase
{
private readonly ILocalizationService _localizationService;
private readonly IEntityXmlSerializer _entityXmlSerializer;
public ExportDictionaryController(ILocalizationService localizationService, IEntityXmlSerializer entityXmlSerializer)
{
_localizationService = localizationService;
_entityXmlSerializer = entityXmlSerializer;
}
[HttpGet("export/{key:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(FileContentResult), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(NotFoundObjectResult), StatusCodes.Status404NotFound)]
public async Task<IActionResult> ExportDictionary(Guid key, bool includeChildren = false)
{
IDictionaryItem? dictionaryItem = _localizationService.GetDictionaryItemById(key);
if (dictionaryItem is null)
{
return await Task.FromResult(NotFound("No dictionary item found with id "));
}
XElement xml = _entityXmlSerializer.Serialize(dictionaryItem, includeChildren);
var fileName = $"{dictionaryItem.ItemKey}.udt";
// Set custom header so umbRequestHelper.downloadFile can save the correct filename
HttpContext.Response.Headers.Add("x-filename", fileName);
return await Task.FromResult(File(Encoding.UTF8.GetBytes(xml.ToDataString()), MediaTypeNames.Application.Octet, fileName));
}
}
@@ -0,0 +1,54 @@
using System.Net.Mime;
using System.Text;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Services;
using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class ImportDictionaryController : DictionaryControllerBase
{
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IDictionaryService _dictionaryService;
private readonly IWebHostEnvironment _webHostEnvironment;
private readonly ILoadDictionaryItemService _loadDictionaryItemService;
public ImportDictionaryController(
IHostingEnvironment hostingEnvironment,
IDictionaryService dictionaryService,
IWebHostEnvironment webHostEnvironment,
ILoadDictionaryItemService loadDictionaryItemService)
{
_hostingEnvironment = hostingEnvironment;
_dictionaryService = dictionaryService;
_webHostEnvironment = webHostEnvironment;
_loadDictionaryItemService = loadDictionaryItemService;
}
[HttpPost("import")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ContentResult), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(NotFoundResult), StatusCodes.Status404NotFound)]
public async Task<IActionResult> ImportDictionary(string file, int? parentId)
{
if (string.IsNullOrWhiteSpace(file))
{
return NotFound();
}
var filePath = Path.Combine(_hostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.Data), file);
if (_webHostEnvironment.ContentRootFileProvider.GetFileInfo(filePath) is null)
{
return await Task.FromResult(NotFound());
}
IDictionaryItem dictionaryItem = _loadDictionaryItemService.Load(filePath, parentId);
return await Task.FromResult(Content(_dictionaryService.CalculatePath(dictionaryItem.ParentId, dictionaryItem.Id), MediaTypeNames.Text.Plain, Encoding.UTF8));
}
}
@@ -0,0 +1,75 @@
using System.Net.Mime;
using System.Text;
using System.Text.Json;
using Json.Patch;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Serialization;
using Umbraco.Cms.ManagementApi.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Dictionary;
using Umbraco.Cms.ManagementApi.ViewModels.JsonPatch;
using Umbraco.New.Cms.Core.Factories;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class UpdateDictionaryController : DictionaryControllerBase
{
private readonly ILocalizationService _localizationService;
private readonly IUmbracoMapper _umbracoMapper;
private readonly IDictionaryService _dictionaryService;
private readonly IDictionaryFactory _dictionaryFactory;
private readonly IJsonPatchService _jsonPatchService;
private readonly ISystemTextJsonSerializer _systemTextJsonSerializer;
public UpdateDictionaryController(
ILocalizationService localizationService,
IUmbracoMapper umbracoMapper,
IDictionaryService dictionaryService,
IDictionaryFactory dictionaryFactory,
IJsonPatchService jsonPatchService,
ISystemTextJsonSerializer systemTextJsonSerializer)
{
_localizationService = localizationService;
_umbracoMapper = umbracoMapper;
_dictionaryService = dictionaryService;
_dictionaryFactory = dictionaryFactory;
_jsonPatchService = jsonPatchService;
_systemTextJsonSerializer = systemTextJsonSerializer;
}
[HttpPatch("{id:Guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ContentResult), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(NotFoundResult), StatusCodes.Status404NotFound)]
public async Task<IActionResult> Update(Guid id, JsonPatchViewModel[] updateViewModel)
{
IDictionaryItem? dictionaryItem = _localizationService.GetDictionaryItemById(id);
if (dictionaryItem is null)
{
return NotFound();
}
DictionaryViewModel dictionaryToPatch = _umbracoMapper.Map<DictionaryViewModel>(dictionaryItem)!;
PatchResult? result = _jsonPatchService.Patch(updateViewModel, dictionaryToPatch);
if (result?.Result is null)
{
throw new JsonException("Could not patch the JsonPatchViewModel");
}
DictionaryViewModel? updatedDictionaryItem = _systemTextJsonSerializer.Deserialize<DictionaryViewModel>(result.Result.ToJsonString());
if (updatedDictionaryItem is null)
{
throw new JsonException("Could not serialize from PatchResult to DictionaryViewModel");
}
IDictionaryItem dictionaryToSave = _dictionaryFactory.CreateDictionaryItem(updatedDictionaryItem!);
_localizationService.Save(dictionaryToSave);
return await Task.FromResult(Content(_dictionaryService.CalculatePath(dictionaryToSave.ParentId, dictionaryToSave.Id), MediaTypeNames.Text.Plain, Encoding.UTF8));
}
}
@@ -0,0 +1,51 @@
using System.Xml;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Models;
using Umbraco.Cms.ManagementApi.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Dictionary;
using Umbraco.Extensions;
using Umbraco.New.Cms.Core.Factories;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class UploadDictionaryController : DictionaryControllerBase
{
private readonly ILocalizedTextService _localizedTextService;
private readonly IUploadFileService _uploadFileService;
private readonly IDictionaryFactory _dictionaryFactory;
public UploadDictionaryController(ILocalizedTextService localizedTextService, IUploadFileService uploadFileService, IDictionaryFactory dictionaryFactory)
{
_localizedTextService = localizedTextService;
_uploadFileService = uploadFileService;
_dictionaryFactory = dictionaryFactory;
}
[HttpPost("upload")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(DictionaryImportViewModel), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<ActionResult<DictionaryImportViewModel>> Upload(IFormFile file)
{
FormFileUploadResult formFileUploadResult = _uploadFileService.TryLoad(file);
if (formFileUploadResult.CouldLoad is false || formFileUploadResult.XmlDocument is null)
{
return await Task.FromResult(ValidationProblem(
_localizedTextService.Localize("media", "failedFileUpload"),
formFileUploadResult.ErrorMessage));
}
DictionaryImportViewModel model = _dictionaryFactory.CreateDictionaryImportViewModel(formFileUploadResult);
if (!model.DictionaryItems.Any())
{
return ValidationProblem(
_localizedTextService.Localize("media", "failedFileUpload"),
_localizedTextService.Localize("dictionary", "noItemsInFile"));
}
return await Task.FromResult(model);
}
}
@@ -0,0 +1,39 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Services.Paging;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
public class ChildrenDictionaryItemTreeController : DictionaryItemTreeControllerBase
{
public ChildrenDictionaryItemTreeController(IEntityService entityService, ILocalizationService localizationService)
: base(entityService, localizationService)
{
}
[HttpGet("children")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<EntityTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<EntityTreeItemViewModel>>> Children(Guid parentKey, int skip = 0, int take = 100)
{
if (PaginationService.ConvertSkipTakeToPaging(skip, take, out var pageNumber, out var pageSize, out ProblemDetails? error) == false)
{
return BadRequest(error);
}
IDictionaryItem[] dictionaryItems = PaginatedDictionaryItems(
pageNumber,
pageSize,
LocalizationService.GetDictionaryItemChildren(parentKey),
out var totalItems);
EntityTreeItemViewModel[] viewModels = MapTreeItemViewModels(null, dictionaryItems);
PagedViewModel<EntityTreeItemViewModel> result = PagedViewModel(viewModels, totalItems);
return await Task.FromResult(Ok(result));
}
}
@@ -0,0 +1,53 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DictionaryItem}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DictionaryItem))]
// NOTE: at the moment dictionary items aren't supported by EntityService, so we have little use of the
// tree controller base. We'll keep it though, in the hope that we can mend EntityService.
public class DictionaryItemTreeControllerBase : EntityTreeControllerBase<EntityTreeItemViewModel>
{
public DictionaryItemTreeControllerBase(IEntityService entityService, ILocalizationService localizationService)
: base(entityService) =>
LocalizationService = localizationService;
// dictionary items do not currently have a known UmbracoObjectType, so we'll settle with Unknown for now
protected override UmbracoObjectTypes ItemObjectType => UmbracoObjectTypes.Unknown;
protected ILocalizationService LocalizationService { get; }
protected EntityTreeItemViewModel[] MapTreeItemViewModels(Guid? parentKey, IDictionaryItem[] dictionaryItems)
=> dictionaryItems.Select(dictionaryItem => new EntityTreeItemViewModel
{
Icon = Constants.Icons.RelationType,
Name = dictionaryItem.ItemKey,
Key = dictionaryItem.Key,
Type = Constants.UdiEntityType.DictionaryItem,
HasChildren = false,
IsContainer = LocalizationService.GetDictionaryItemChildren(dictionaryItem.Key).Any(),
ParentKey = parentKey
}).ToArray();
// localization service does not (yet) allow pagination of dictionary items, we have to do it in memory for now
protected IDictionaryItem[] PaginatedDictionaryItems(long pageNumber, int pageSize, IEnumerable<IDictionaryItem> allDictionaryItems, out long totalItems)
{
IDictionaryItem[] allDictionaryItemsAsArray = allDictionaryItems.ToArray();
totalItems = allDictionaryItemsAsArray.Length;
return allDictionaryItemsAsArray
.OrderBy(item => item.ItemKey)
.Skip((int)pageNumber * pageSize)
.Take(pageSize)
.ToArray();
}
}
@@ -0,0 +1,27 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
public class ItemsDictionaryItemTreeController : DictionaryItemTreeControllerBase
{
public ItemsDictionaryItemTreeController(IEntityService entityService, ILocalizationService localizationService)
: base(entityService, localizationService)
{
}
[HttpGet("items")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FolderTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
{
IDictionaryItem[] dictionaryItems = LocalizationService.GetDictionaryItemsByIds(keys).ToArray();
EntityTreeItemViewModel[] viewModels = MapTreeItemViewModels(null, dictionaryItems);
return await Task.FromResult(Ok(viewModels));
}
}
@@ -0,0 +1,39 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Services.Paging;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
public class RootDictionaryItemTreeController : DictionaryItemTreeControllerBase
{
public RootDictionaryItemTreeController(IEntityService entityService, ILocalizationService localizationService)
: base(entityService, localizationService)
{
}
[HttpGet("root")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<EntityTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<EntityTreeItemViewModel>>> Root(int skip = 0, int take = 100)
{
if (PaginationService.ConvertSkipTakeToPaging(skip, take, out var pageNumber, out var pageSize, out ProblemDetails? error) == false)
{
return BadRequest(error);
}
IDictionaryItem[] dictionaryItems = PaginatedDictionaryItems(
pageNumber,
pageSize,
LocalizationService.GetRootDictionaryItems(),
out var totalItems);
EntityTreeItemViewModel[] viewModels = MapTreeItemViewModels(null, dictionaryItems);
PagedViewModel<EntityTreeItemViewModel> result = PagedViewModel(viewModels, totalItems);
return await Task.FromResult(Ok(result));
}
}
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.RecycleBin;
namespace Umbraco.Cms.ManagementApi.Controllers.Document.RecycleBin;
public class ChildrenDocumentRecycleBinController : DocumentRecycleBinControllerBase
{
public ChildrenDocumentRecycleBinController(IEntityService entityService)
: base(entityService)
{
}
[HttpGet("children")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<RecycleBinItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<RecycleBinItemViewModel>>> Children(Guid parentKey, int skip = 0, int take = 100)
=> await GetChildren(parentKey, skip, take);
}
@@ -0,0 +1,43 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Controllers.RecycleBin;
using Umbraco.Cms.ManagementApi.Filters;
using Umbraco.Cms.ManagementApi.ViewModels.RecycleBin;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Document.RecycleBin;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Document}/recycle-bin")]
[RequireDocumentTreeRootAccess]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[OpenApiTag(nameof(Constants.UdiEntityType.Document))]
public class DocumentRecycleBinControllerBase : RecycleBinControllerBase<RecycleBinItemViewModel>
{
public DocumentRecycleBinControllerBase(IEntityService entityService)
: base(entityService)
{
}
protected override UmbracoObjectTypes ItemObjectType => UmbracoObjectTypes.Document;
protected override int RecycleBinRootId => Constants.System.RecycleBinContent;
protected override RecycleBinItemViewModel MapRecycleBinViewModel(Guid? parentKey, IEntitySlim entity)
{
RecycleBinItemViewModel viewModel = base.MapRecycleBinViewModel(parentKey, entity);
if (entity is IDocumentEntitySlim documentEntitySlim)
{
viewModel.Icon = documentEntitySlim.ContentTypeIcon ?? viewModel.Icon;
}
return viewModel;
}
}
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.RecycleBin;
namespace Umbraco.Cms.ManagementApi.Controllers.Document.RecycleBin;
public class RootDocumentRecycleBinController : DocumentRecycleBinControllerBase
{
public RootDocumentRecycleBinController(IEntityService entityService)
: base(entityService)
{
}
[HttpGet("root")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<RecycleBinItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<RecycleBinItemViewModel>>> Root(int skip = 0, int take = 100)
=> await GetRoot(skip, take);
}
@@ -0,0 +1,34 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Services.Entities;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.Document.Tree;
public class ChildrenDocumentTreeController : DocumentTreeControllerBase
{
public ChildrenDocumentTreeController(
IEntityService entityService,
IUserStartNodeEntitiesService userStartNodeEntitiesService,
IDataTypeService dataTypeService,
IPublicAccessService publicAccessService,
AppCaches appCaches,
IBackOfficeSecurityAccessor backofficeSecurityAccessor)
: base(entityService, userStartNodeEntitiesService, dataTypeService, publicAccessService, appCaches, backofficeSecurityAccessor)
{
}
[HttpGet("children")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<DocumentTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<DocumentTreeItemViewModel>>> Children(Guid parentKey, int skip = 0, int take = 100, Guid? dataTypeKey = null, string? culture = null)
{
IgnoreUserStartNodesForDataType(dataTypeKey);
RenderForClientCulture(culture);
return await GetChildren(parentKey, skip, take);
}
}
@@ -0,0 +1,94 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
using Umbraco.Cms.ManagementApi.Services.Entities;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
using Umbraco.Extensions;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Document.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Document}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.Document))]
public abstract class DocumentTreeControllerBase : UserStartNodeTreeControllerBase<DocumentTreeItemViewModel>
{
private readonly IPublicAccessService _publicAccessService;
private readonly AppCaches _appCaches;
private readonly IBackOfficeSecurityAccessor _backofficeSecurityAccessor;
private string? _culture;
protected DocumentTreeControllerBase(
IEntityService entityService,
IUserStartNodeEntitiesService userStartNodeEntitiesService,
IDataTypeService dataTypeService,
IPublicAccessService publicAccessService,
AppCaches appCaches,
IBackOfficeSecurityAccessor backofficeSecurityAccessor)
: base(entityService, userStartNodeEntitiesService, dataTypeService)
{
_publicAccessService = publicAccessService;
_appCaches = appCaches;
_backofficeSecurityAccessor = backofficeSecurityAccessor;
}
protected override UmbracoObjectTypes ItemObjectType => UmbracoObjectTypes.Document;
protected override Ordering ItemOrdering => Ordering.By(nameof(Infrastructure.Persistence.Dtos.NodeDto.SortOrder));
protected void RenderForClientCulture(string? culture) => _culture = culture;
protected override DocumentTreeItemViewModel MapTreeItemViewModel(Guid? parentKey, IEntitySlim entity)
{
DocumentTreeItemViewModel viewModel = base.MapTreeItemViewModel(parentKey, entity);
if (entity is IDocumentEntitySlim documentEntitySlim)
{
viewModel.IsPublished = documentEntitySlim.Published;
viewModel.IsEdited = documentEntitySlim.Edited;
viewModel.Icon = documentEntitySlim.ContentTypeIcon ?? viewModel.Icon;
viewModel.IsProtected = _publicAccessService.IsProtected(entity.Path);
if (_culture != null && documentEntitySlim.Variations.VariesByCulture())
{
viewModel.Name = documentEntitySlim.CultureNames.TryGetValue(_culture, out var cultureName)
? cultureName
: $"({viewModel.Name})";
viewModel.IsPublished = documentEntitySlim.PublishedCultures.Contains(_culture);
viewModel.IsEdited = documentEntitySlim.EditedCultures.Contains(_culture);
}
viewModel.IsEdited &= viewModel.IsPublished;
}
return viewModel;
}
// TODO: delete these (faking start node setup for unlimited editor)
protected override int[] GetUserStartNodeIds() => new[] { -1 };
protected override string[] GetUserStartNodePaths() => Array.Empty<string>();
// TODO: use these implementations instead of the dummy ones above once we have backoffice auth in place
// protected override int[] GetUserStartNodeIds()
// => _backofficeSecurityAccessor
// .BackOfficeSecurity?
// .CurrentUser?
// .CalculateContentStartNodeIds(EntityService, _appCaches)
// ?? Array.Empty<int>();
//
// protected override string[] GetUserStartNodePaths()
// => _backofficeSecurityAccessor
// .BackOfficeSecurity?
// .CurrentUser?
// .GetContentStartNodePaths(EntityService, _appCaches)
// ?? Array.Empty<string>();
}
@@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Services.Entities;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.Document.Tree;
public class ItemsDocumentTreeController : DocumentTreeControllerBase
{
public ItemsDocumentTreeController(
IEntityService entityService,
IUserStartNodeEntitiesService userStartNodeEntitiesService,
IDataTypeService dataTypeService,
IPublicAccessService publicAccessService,
AppCaches appCaches,
IBackOfficeSecurityAccessor backofficeSecurityAccessor)
: base(entityService, userStartNodeEntitiesService, dataTypeService, publicAccessService, appCaches, backofficeSecurityAccessor)
{
}
[HttpGet("items")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<DocumentTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys, Guid? dataTypeKey = null, string? culture = null)
{
IgnoreUserStartNodesForDataType(dataTypeKey);
RenderForClientCulture(culture);
return await GetItems(keys);
}
}
@@ -0,0 +1,34 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Services.Entities;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.Document.Tree;
public class RootDocumentTreeController : DocumentTreeControllerBase
{
public RootDocumentTreeController(
IEntityService entityService,
IUserStartNodeEntitiesService userStartNodeEntitiesService,
IDataTypeService dataTypeService,
IPublicAccessService publicAccessService,
AppCaches appCaches,
IBackOfficeSecurityAccessor backofficeSecurityAccessor)
: base(entityService, userStartNodeEntitiesService, dataTypeService, publicAccessService, appCaches, backofficeSecurityAccessor)
{
}
[HttpGet("root")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<DocumentTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<DocumentTreeItemViewModel>>> Root(int skip = 0, int take = 100, Guid? dataTypeKey = null, string? culture = null)
{
IgnoreUserStartNodesForDataType(dataTypeKey);
RenderForClientCulture(culture);
return await GetRoot(skip, take);
}
}
@@ -0,0 +1,56 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.DocumentBlueprint.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DocumentBlueprint}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DocumentBlueprint))]
public class DocumentBlueprintTreeControllerBase : EntityTreeControllerBase<DocumentBlueprintTreeItemViewModel>
{
private readonly IContentTypeService _contentTypeService;
public DocumentBlueprintTreeControllerBase(IEntityService entityService, IContentTypeService contentTypeService)
: base(entityService) =>
_contentTypeService = contentTypeService;
protected override UmbracoObjectTypes ItemObjectType => UmbracoObjectTypes.DocumentBlueprint;
protected override DocumentBlueprintTreeItemViewModel[] MapTreeItemViewModels(Guid? parentKey, IEntitySlim[] entities)
{
var contentTypeAliases = entities
.OfType<IDocumentEntitySlim>()
.Select(entity => entity.ContentTypeAlias)
.ToArray();
var contentTypeIds = _contentTypeService.GetAllContentTypeIds(contentTypeAliases).ToArray();
var contentTypeByAlias = _contentTypeService
.GetAll(contentTypeIds)
.ToDictionary(contentType => contentType.Alias);
return entities.Select(entity =>
{
DocumentBlueprintTreeItemViewModel viewModel = base.MapTreeItemViewModel(parentKey, entity);
viewModel.Icon = Constants.Icons.Blueprint;
viewModel.HasChildren = false;
if (entity is IDocumentEntitySlim documentEntitySlim
&& contentTypeByAlias.TryGetValue(documentEntitySlim.ContentTypeAlias, out IContentType? contentType))
{
viewModel.DocumentTypeKey = contentType.Key;
viewModel.DocumentTypeAlias = contentType.Alias;
viewModel.DocumentTypeName = contentType.Name;
}
return viewModel;
}).ToArray();
}
}
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DocumentBlueprint.Tree;
public class ItemsDocumentBlueprintTreeController : DocumentBlueprintTreeControllerBase
{
public ItemsDocumentBlueprintTreeController(IEntityService entityService, IContentTypeService contentTypeService)
: base(entityService, contentTypeService)
{
}
[HttpGet("items")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentBlueprintTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<DocumentBlueprintTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
=> await GetItems(keys);
}
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DocumentBlueprint.Tree;
public class RootDocumentBlueprintTreeController : DocumentBlueprintTreeControllerBase
{
public RootDocumentBlueprintTreeController(IEntityService entityService, IContentTypeService contentTypeService)
: base(entityService, contentTypeService)
{
}
[HttpGet("root")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<DocumentBlueprintTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<DocumentBlueprintTreeItemViewModel>>> Root(int skip = 0, int take = 100)
=> await GetRoot(skip, take);
}
@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DocumentType.Tree;
public class ChildrenDocumentTypeTreeController : DocumentTypeTreeControllerBase
{
public ChildrenDocumentTypeTreeController(IEntityService entityService, IContentTypeService contentTypeService)
: base(entityService, contentTypeService)
{
}
[HttpGet("children")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<DocumentTypeTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<DocumentTypeTreeItemViewModel>>> Children(Guid parentKey, int skip = 0, int take = 100, bool foldersOnly = false)
{
RenderFoldersOnly(foldersOnly);
return await GetChildren(parentKey, skip, take);
}
}
@@ -0,0 +1,47 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.DocumentType.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DocumentType}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DocumentType))]
public class DocumentTypeTreeControllerBase : FolderTreeControllerBase<DocumentTypeTreeItemViewModel>
{
private readonly IContentTypeService _contentTypeService;
public DocumentTypeTreeControllerBase(IEntityService entityService, IContentTypeService contentTypeService)
: base(entityService) =>
_contentTypeService = contentTypeService;
protected override UmbracoObjectTypes ItemObjectType => UmbracoObjectTypes.DocumentType;
protected override UmbracoObjectTypes FolderObjectType => UmbracoObjectTypes.DocumentTypeContainer;
protected override DocumentTypeTreeItemViewModel[] MapTreeItemViewModels(Guid? parentKey, IEntitySlim[] entities)
{
var contentTypes = _contentTypeService
.GetAll(entities.Select(entity => entity.Id).ToArray())
.ToDictionary(contentType => contentType.Id);
return entities.Select(entity =>
{
DocumentTypeTreeItemViewModel viewModel = MapTreeItemViewModel(parentKey, entity);
if (contentTypes.TryGetValue(entity.Id, out IContentType? contentType))
{
viewModel.Icon = contentType.Icon ?? viewModel.Icon;
viewModel.IsElement = contentType.IsElement;
}
return viewModel;
}).ToArray();
}
}
@@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DocumentType.Tree;
public class ItemsDocumentTypeTreeController : DocumentTypeTreeControllerBase
{
public ItemsDocumentTypeTreeController(IEntityService entityService, IContentTypeService contentTypeService)
: base(entityService, contentTypeService)
{
}
[HttpGet("items")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentTypeTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<DocumentTypeTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
=> await GetItems(keys);
}
@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DocumentType.Tree;
public class RootDocumentTypeTreeController : DocumentTypeTreeControllerBase
{
public RootDocumentTypeTreeController(IEntityService entityService, IContentTypeService contentTypeService)
: base(entityService, contentTypeService)
{
}
[HttpGet("root")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<DocumentTypeTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<DocumentTypeTreeItemViewModel>>> Root(int skip = 0, int take = 100, bool foldersOnly = false)
{
RenderFoldersOnly(foldersOnly);
return await GetRoot(skip, take);
}
}
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/examineManagement")]
[OpenApiTag("ExamineManagement")]
public class ExamineManagementControllerBase : ManagementApiControllerBase
{
}
@@ -0,0 +1,54 @@
using Examine;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.ManagementApi.Factories;
using Umbraco.Cms.ManagementApi.ViewModels.ExamineManagement;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
[ApiVersion("1.0")]
public class IndexExamineManagementController : ExamineManagementControllerBase
{
private readonly IExamineIndexViewModelFactory _examineIndexViewModelFactory;
private readonly IExamineManager _examineManager;
public IndexExamineManagementController(
IExamineIndexViewModelFactory examineIndexViewModelFactory,
IExamineManager examineManager)
{
_examineIndexViewModelFactory = examineIndexViewModelFactory;
_examineManager = examineManager;
}
/// <summary>
/// Check if the index has been rebuilt
/// </summary>
/// <param name="indexName"></param>
/// <returns></returns>
/// <remarks>
/// This is kind of rudimentary since there's no way we can know that the index has rebuilt, we
/// have a listener for the index op complete so we'll just check if that key is no longer there in the runtime cache
/// </remarks>
[HttpGet("index")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ExamineIndexViewModel), StatusCodes.Status200OK)]
public async Task<ActionResult<ExamineIndexViewModel?>> Index(string indexName)
{
if (_examineManager.TryGetIndex(indexName, out IIndex? index))
{
return await Task.FromResult(_examineIndexViewModelFactory.Create(index!));
}
var invalidModelProblem = new ProblemDetails
{
Title = "Index Not Found",
Detail = $"No index found with name = {indexName}",
Status = StatusCodes.Status400BadRequest,
Type = "Error",
};
return await Task.FromResult(BadRequest(invalidModelProblem));
}
}

Some files were not shown because too many files have changed in this diff Show More