From f025b72d6bc5a0e71c4cfadd7f813f9b53f0fb09 Mon Sep 17 00:00:00 2001 From: nikolajlauridsen Date: Mon, 25 Apr 2022 09:44:33 +0200 Subject: [PATCH 1/7] Bump version to rc2 --- src/Directory.Build.props | 2 +- templates/UmbracoPackage/.template.config/template.json | 2 +- templates/UmbracoProject/.template.config/template.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index fb29b57d91..eff65adbcb 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -5,7 +5,7 @@ 9.5.0 9.5.0 - 9.5.0-rc + 9.5.0-rc2 9.5.0 9.0 en-US diff --git a/templates/UmbracoPackage/.template.config/template.json b/templates/UmbracoPackage/.template.config/template.json index d0bbc2b925..6284664c04 100644 --- a/templates/UmbracoPackage/.template.config/template.json +++ b/templates/UmbracoPackage/.template.config/template.json @@ -46,7 +46,7 @@ "description": "The version of Umbraco.Cms to add as PackageReference.", "type": "parameter", "datatype": "string", - "defaultValue": "9.5.0-rc", + "defaultValue": "9.5.0-rc2", "replaces": "UMBRACO_VERSION_FROM_TEMPLATE" }, "namespaceReplacer": { diff --git a/templates/UmbracoProject/.template.config/template.json b/templates/UmbracoProject/.template.config/template.json index be82ef9b5f..f73bd98922 100644 --- a/templates/UmbracoProject/.template.config/template.json +++ b/templates/UmbracoProject/.template.config/template.json @@ -44,7 +44,7 @@ "description": "The version of Umbraco.Cms to add as PackageReference.", "type": "parameter", "datatype": "string", - "defaultValue": "9.5.0-rc", + "defaultValue": "9.5.0-rc2", "replaces": "UMBRACO_VERSION_FROM_TEMPLATE" }, "UseHttpsRedirect": { From 8dfcdeea233bd1c78b5946684e0b02f50ac58d6b Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Tue, 26 Apr 2022 08:50:50 +0200 Subject: [PATCH 2/7] 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 --- .../Services/MetricsConsentService.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Umbraco.Core/Services/MetricsConsentService.cs b/src/Umbraco.Core/Services/MetricsConsentService.cs index 3e93a34d8a..d494dbcf4b 100644 --- a/src/Umbraco.Core/Services/MetricsConsentService.cs +++ b/src/Umbraco.Core/Services/MetricsConsentService.cs @@ -1,5 +1,9 @@ using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Web.Common.DependencyInjection; namespace Umbraco.Cms.Core.Services { @@ -8,10 +12,27 @@ namespace Umbraco.Cms.Core.Services internal const string Key = "UmbracoAnalyticsLevel"; private readonly IKeyValueService _keyValueService; + private readonly ILogger _logger; + private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor; + // Scheduled for removal in V12 + [Obsolete("Please use the constructor that takes and ILogger and IBackOfficeSecurity instead")] public MetricsConsentService(IKeyValueService keyValueService) + : this( + keyValueService, + StaticServiceProvider.Instance.GetRequiredService>(), + StaticServiceProvider.Instance.GetRequiredService()) + { + } + + public MetricsConsentService( + IKeyValueService keyValueService, + ILogger logger, + IBackOfficeSecurityAccessor backOfficeSecurityAccessor) { _keyValueService = keyValueService; + _logger = logger; + _backOfficeSecurityAccessor = backOfficeSecurityAccessor; } public TelemetryLevel GetConsentLevel() @@ -28,6 +49,8 @@ namespace Umbraco.Cms.Core.Services public void SetConsentLevel(TelemetryLevel telemetryLevel) { + var currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser; + _logger.LogInformation("Telemetry level set to {telemetryLevel} by {username}", telemetryLevel, currentUser?.Username); _keyValueService.SetValue(Key, telemetryLevel.ToString()); } } From a51c3f4cdbe249f6e498321d1d84c0de48ea78f1 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Tue, 26 Apr 2022 11:15:11 +0200 Subject: [PATCH 3/7] Updated references to latest versions of Forms and Deploy in JSONSchema project. (#12305) --- src/JsonSchema/JsonSchema.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JsonSchema/JsonSchema.csproj b/src/JsonSchema/JsonSchema.csproj index d2ef20e741..9d6079c3b4 100644 --- a/src/JsonSchema/JsonSchema.csproj +++ b/src/JsonSchema/JsonSchema.csproj @@ -18,8 +18,8 @@ - - + + From 41662c4cff4651431f87ad497ffa7857a8048520 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Fri, 29 Apr 2022 09:26:03 +0200 Subject: [PATCH 4/7] Use static id for acceptance tests (#12318) --- build/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index ecfcd84dca..3361efc9b9 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -210,7 +210,7 @@ stages: gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js targets: build workingDirectory: src\Umbraco.Web.UI.Client - - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" + - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI\Umbraco.Web.UI.csproj /Umbraco:CMS:Global:Id=0000000-0000-0000-0000-000000000042" displayName: dotnet run # - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj # displayName: dotnet run @@ -313,7 +313,7 @@ stages: displayName: dotnet run inputs: targetType: 'inline' - script: 'nohup dotnet run --no-build -p ./src/Umbraco.Web.UI/ > $(Build.ArtifactStagingDirectory)/dotnet_run_log_linux.txt &' + script: 'nohup dotnet run --no-build -p ./src/Umbraco.Web.UI/ /Umbraco:CMS:Global:Id=0000000-0000-0000-0000-000000000042 > $(Build.ArtifactStagingDirectory)/dotnet_run_log_linux.txt &' - task: Bash@3 displayName: Generate Cypress.env.json inputs: From 35acaa2b13bea7962cf7059a7205240fd0ca84f6 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:41:17 +0200 Subject: [PATCH 5/7] Regression: User cannot change password using the user pane (#12320) * add support for UserService to change password * for 'users' section use UserService to change password * user infinite editor should now use the changepassword dialog as seen in the 'users' section * add some autocomplete and name changes to change-password form to support autofill and password managers * Revert "for 'users' section use UserService to change password" This reverts commit 68c5972777baa4a60cc8cfc88b2572f1f47ece64. * Revert "add support for UserService to change password" This reverts commit a64b756ad31dfede91ba49f720afa7d073d9a7e8. * use the currentUserResource to change password * only return true on success since notifications are handled in the resource --- .../infiniteeditors/user/user.controller.js | 106 +++++++----------- .../common/infiniteeditors/user/user.html | 25 +---- .../components/users/change-password.html | 9 +- 3 files changed, 50 insertions(+), 90 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.controller.js index 7f9e546709..53c8b13bff 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.controller.js @@ -1,14 +1,12 @@ angular.module("umbraco") - .controller("Umbraco.Editors.UserController", function ($scope, $location, $timeout, + .controller("Umbraco.Editors.UserController", function ($scope, $location, dashboardResource, userService, historyService, eventsService, - externalLoginInfoService, authResource, - currentUserResource, formHelper, localizationService, editorService, twoFactorLoginResource) { + externalLoginInfoService, authResource, contentEditingHelper, + currentUserResource, overlayService, localizationService, editorService, twoFactorLoginResource) { let vm = this; vm.history = historyService.getCurrent(); - vm.showPasswordFields = false; - vm.changePasswordButtonState = "init"; vm.hasTwoFactorProviders = false; localizationService.localize("general_user").then(function (value) { @@ -51,20 +49,7 @@ angular.module("umbraco") $location.path(link); vm.close(); }; - /* - //Manually update the remaining timeout seconds - function updateTimeout() { - $timeout(function () { - if (vm.remainingAuthSeconds > 0) { - vm.remainingAuthSeconds--; - $scope.$digest(); - //recurse - updateTimeout(); - } - }, 1000, false); // 1 second, do NOT execute a global digest - } - */ function updateUserInfo() { //get the user userService.getCurrentUser().then(function (user) { @@ -72,8 +57,6 @@ angular.module("umbraco") if (vm.user) { vm.remainingAuthSeconds = vm.user.remainingAuthSeconds; vm.canEditProfile = _.indexOf(vm.user.allowedSections, "users") > -1; - //set the timer - //updateTimeout(); currentUserResource.getCurrentUserLinkedLogins().then(function (logins) { @@ -107,10 +90,20 @@ angular.module("umbraco") } }); - - } + function changePassword() { + return currentUserResource.changePassword(vm.changePasswordModel.value).then(function () { + return true; + }, function (err) { + contentEditingHelper.handleSaveError({ + err: err, + showNotifications: true + }); + return false; + }); + }; + vm.linkProvider = function (e) { e.target.submit(); } @@ -144,53 +137,40 @@ angular.module("umbraco") }); - vm.changePassword = function () { - - if (formHelper.submitForm({ scope: $scope })) { - - vm.changePasswordButtonState = "busy"; - - currentUserResource.changePassword(vm.changePasswordModel.value).then(function (data) { - - //reset old data - clearPasswordFields(); - - formHelper.resetForm({ scope: $scope }); - - vm.changePasswordButtonState = "success"; - $timeout(function () { - vm.togglePasswordFields(); - }, 2000); - - }, function (err) { - formHelper.resetForm({ scope: $scope, hasErrors: true }); - formHelper.handleError(err); - - vm.changePasswordButtonState = "error"; - - }); - - } - - }; - - vm.togglePasswordFields = function () { - clearPasswordFields(); - vm.showPasswordFields = !vm.showPasswordFields; - } - - function clearPasswordFields() { - vm.changePasswordModel.value.oldPassword = ""; - vm.changePasswordModel.value.newPassword = ""; - vm.changePasswordModel.value.confirm = ""; - } - vm.editUser = function () { $location .path('/users/users/user/' + vm.user.id); vm.close(); } + vm.toggleChangePassword = function () { + //reset it + vm.user.changePassword = null; + + localizationService.localizeMany(["general_cancel", "general_confirm", "general_changePassword"]) + .then(function (data) { + const overlay = { + view: "changepassword", + title: data[2], + changePassword: vm.user.changePassword, + config: vm.changePasswordModel.config, + closeButtonLabel: data[0], + submitButtonLabel: data[1], + submitButtonStyle: 'success', + close: () => overlayService.close(), + submit: model => { + vm.changePasswordModel.value = model.changePassword; + changePassword().then(result => { + if (result) { + overlayService.close(); + } + }); + } + }; + overlayService.open(overlay); + }); + } + vm.toggleConfigureTwoFactor = function () { const configureTwoFactorSettings = { diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.html index c67f65a7d2..ed8cbd13e0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/user/user.html @@ -16,7 +16,7 @@ label-key="general_edit" ng-if="vm.canEditProfile" type="button"> - @@ -91,29 +91,6 @@ -
- -
- Change password -
- -
- - - - - - - - - - -
- -
-
{{tab.label}}
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html b/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html index 81dd8d6fe8..74cba97696 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html @@ -16,8 +16,9 @@ - @@ -28,8 +29,9 @@ - The confirmed password doesn't match the new password! From 8148e4aee0d6a1e3c60611a6164d9115aa633931 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 2 May 2022 09:38:22 +0200 Subject: [PATCH 6/7] V9: make hardcoded text localized (#12325) * use localize keys instead of hard coded text * Update text * Remove duplicate - * Add italics to bottom text Co-authored-by: Nikolaj Geisle --- .../views/dashboard/settings/analytics.html | 40 +++++++++++-------- .../umbraco/config/lang/en_us.xml | 24 +++++++++++ 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/analytics.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/analytics.html index 361b0c8bdc..ad798dc613 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/analytics.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/analytics.html @@ -5,12 +5,14 @@ Consent for analytics
-

In order to improve Umbraco and add new functionality based on as relevant information as possible, + + In order to improve Umbraco and add new functionality based on as relevant information as possible,
we would like to collect system- and usage information from your installation. -
We will NOT collect any personal data like content, code or users, and all data will be fully anonymous. +
Aggregate data will be shared on a regular basis as well as learnings from these metrics. +
Hopefully, you will help us collect some valuable data.
-
We will on a regular basis share some of the overall learnings from these metrics. - Hopefully, you'll help us collect some valuable data.

+
We WILL NOT collect any personal data such as content, code, user information, and all data will be fully anonymized. +
-

{{vm.sliderVal}} -
We'll only send an anonymous site ID to let us know that the site exists. +
+ We'll only send an anonymous site ID to let us know that the + site exists. +
{{vm.sliderVal}} -
We'll send site ID, umbraco version and packages installed +
+ We'll send site ID, umbraco version and packages installed +
{{vm.sliderVal}} -
We'll send: -
- Site ID, umbraco version and packages installed -
- System information like Server OS and Webserver -
- Statistics, like number of content nodes and number of media items -
- Configuration settings, like modelsbuilder mode and used languages -
-
We might change/extend what we send on the detailed level in the future, but if so, it will be listed in - this view. - By choosing "detailed" I accept these future changes + +
We will send: +
- Anonymized site ID, umbraco version, and packages installed. +
- Number of: Root nodes, Content nodes, Macros, Media, Document Types, Templates, Languages, Domains, User Group, Users, Members, and Property Editors in use. +
- System information: Webserver, server OS, server framework, server OS language, and database provider. +
- Configuration settings: Modelsbuilder mode, if custom Umbraco path exists, ASP environment, and if you are in debug mode. +
+
We might change what we send on the Detailed level in the future. If so, it will be listed above. +
By choosing "Detailed" you agree to current and future anonymized information being collected.
+
-

Consent for analytics Analytics level saved! + + we would like to collect system- and usage information from your installation. +
Aggregate data will be shared on a regular basis as well as learnings from these metrics. +
Hopefully, you will help us collect some valuable data. +
+
We WILL NOT collect any personal data such as content, code, user information, and all data will be fully anonymized. + ]]> +
+ We will only send an anonymized site ID to let us know that the site exists. + We will send an anonymized site ID, umbraco version, and packages installed + + We will send: +
- Anonymized site ID, umbraco version, and packages installed. +
- Number of: Root nodes, Content nodes, Macros, Media, Document Types, Templates, Languages, Domains, User Group, Users, Members, and Property Editors in use. +
- System information: Webserver, server OS, server framework, server OS language, and database provider. +
- Configuration settings: Modelsbuilder mode, if custom Umbraco path exists, ASP environment, and if you are in debug mode. +
+
We might change what we send on the Detailed level in the future. If so, it will be listed above. +
By choosing "Detailed" you agree to current and future anonymized information being collected.
+ ]]> +
From eba7e41fd4ca6995ada4075354b4a62b9e7ae75a Mon Sep 17 00:00:00 2001 From: nikolajlauridsen Date: Mon, 2 May 2022 09:43:16 +0200 Subject: [PATCH 7/7] Bump version to rc3 --- src/Directory.Build.props | 2 +- templates/UmbracoPackage/.template.config/template.json | 2 +- templates/UmbracoProject/.template.config/template.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index eff65adbcb..6c4d832170 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -5,7 +5,7 @@ 9.5.0 9.5.0 - 9.5.0-rc2 + 9.5.0-rc3 9.5.0 9.0 en-US diff --git a/templates/UmbracoPackage/.template.config/template.json b/templates/UmbracoPackage/.template.config/template.json index 6284664c04..05220817e8 100644 --- a/templates/UmbracoPackage/.template.config/template.json +++ b/templates/UmbracoPackage/.template.config/template.json @@ -46,7 +46,7 @@ "description": "The version of Umbraco.Cms to add as PackageReference.", "type": "parameter", "datatype": "string", - "defaultValue": "9.5.0-rc2", + "defaultValue": "9.5.0-rc3", "replaces": "UMBRACO_VERSION_FROM_TEMPLATE" }, "namespaceReplacer": { diff --git a/templates/UmbracoProject/.template.config/template.json b/templates/UmbracoProject/.template.config/template.json index f73bd98922..8e0723944d 100644 --- a/templates/UmbracoProject/.template.config/template.json +++ b/templates/UmbracoProject/.template.config/template.json @@ -44,7 +44,7 @@ "description": "The version of Umbraco.Cms to add as PackageReference.", "type": "parameter", "datatype": "string", - "defaultValue": "9.5.0-rc2", + "defaultValue": "9.5.0-rc3", "replaces": "UMBRACO_VERSION_FROM_TEMPLATE" }, "UseHttpsRedirect": {