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
This commit is contained in:
Bjarke Berg
2022-05-02 11:42:00 +02:00
9 changed files with 102 additions and 112 deletions

View File

@@ -271,7 +271,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
@@ -375,7 +375,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:

View File

@@ -5,7 +5,7 @@
<PropertyGroup>
<Version>10.0.0</Version>
<AssemblyVersion>10.0.0</AssemblyVersion>
<InformationalVersion>10.0.0-rc</InformationalVersion>
<InformationalVersion>10.0.0-rc1</InformationalVersion>
<FileVersion>10.0.0</FileVersion>
<LangVersion Condition="'$(LangVersion)' == ''">10.0</LangVersion>
<NeutralLanguage>en-US</NeutralLanguage>

View File

@@ -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 = {

View File

@@ -16,7 +16,7 @@
label-key="general_edit" ng-if="vm.canEditProfile" type="button">
</umb-button>
<umb-button action="vm.togglePasswordFields()" alias="changePassword" button-style="action"
<umb-button action="vm.toggleChangePassword()" alias="changePassword" button-style="action"
label="Change password" label-key="general_changePassword" ng-if="!vm.denyLocalLogin" type="button">
</umb-button>
@@ -91,29 +91,6 @@
</umb-box>
</div>
<div ng-if="vm.showPasswordFields && !vm.denyLocalLogin">
<h5>
<localize key="general_changePassword">Change password</localize>
</h5>
<form class="block-form" name="passwordForm" ng-submit="vm.changePassword()" novalidate val-form-manager>
<change-password config="vm.changePasswordModel.config" password-values="vm.changePasswordModel.value">
</change-password>
<umb-button action="vm.togglePasswordFields()" button-style="cancel" label="Back" label-key="general_back"
type="button">
</umb-button>
<umb-button button-style="success" label="Change password" label-key="general_changePassword"
state="changePasswordButtonState" type="submit">
</umb-button>
</form>
</div>
<div class="umb-control-group" ng-if="vm.dashboard.length > 0">
<div ng-repeat="tab in vm.dashboard">
<h5 ng-if="tab.label">{{tab.label}}</h5>

View File

@@ -16,8 +16,9 @@
<!-- we need to show the old pass field when the provider cannot retrieve the password -->
<umb-control-group alias="oldPassword" label="@user_oldPassword" ng-if="vm.showOldPass()" required="true">
<input type="password" name="oldPassword" id="oldPassword" ng-model="vm.passwordValues.oldPassword"
<input type="password" name="password" id="oldPassword" ng-model="vm.passwordValues.oldPassword"
class="input-block-level umb-textstring textstring"
autocomplete="current-password"
required
val-server-field="oldPassword"
no-dirty-check />
@@ -28,8 +29,9 @@
</umb-control-group>
<umb-control-group alias="password" label="@user_newPassword" required="true">
<input type="password" name="password" id="password"
<input type="password" name="newPassword" id="password"
class="input-block-level umb-textstring textstring"
autocomplete="new-password"
required
val-server-field="password"
ng-model="vm.passwordValues.newPassword"
@@ -47,7 +49,8 @@
<umb-control-group alias="confirmPassword" label="@user_confirmNewPassword" required="true">
<input type="password" name="confirmPassword" id="confirmPassword" ng-model="vm.passwordValues.confirm"
class="input-block-level umb-textstring textstring"
val-compare="password"
autocomplete="new-password"
val-compare="newPassword"
no-dirty-check />
<span ng-messages="changePasswordForm.confirmPassword.$error" show-validation-on-submit>
<span class="help-inline" ng-message="valCompare"><localize key="user_passwordMismatch">The confirmed password doesn't match the new password!</localize></span>

View File

@@ -5,12 +5,14 @@
<localize key="analytics_consentForAnalytics">Consent for analytics</localize>
</h3>
<div class="umb-healthcheck-help-text">
<p>In order to improve Umbraco and add new functionality based on as relevant information as possible,
<localize key="analytics_analyticsDescription">
In order to improve Umbraco and add new functionality based on as relevant information as possible,
<br>we would like to collect system- and usage information from your installation.
<br>We will NOT collect any personal data like content, code or users, and all data will be fully anonymous.
<br>Aggregate data will be shared on a regular basis as well as learnings from these metrics.
<br>Hopefully, you will help us collect some valuable data.
<br>
<br>We will on a regular basis share some of the overall learnings from these metrics.
Hopefully, you'll help us collect some valuable data.</p>
<br>We <b>WILL NOT</b> collect any personal data such as content, code, user information, and all data will be fully anonymized.
</localize>
<div ng-if="!vm.loading" style="padding-left: 12px;padding-top: 50px; padding-bottom: 50px; width: 25%">
<umb-range-slider
ng-model="vm.val"
@@ -20,29 +22,33 @@
</umb-range-slider>
</div>
<p>
<div ng-if="vm.sliderVal === 'Minimal'">
<b>{{vm.sliderVal}}</b>
<br>We'll only send an anonymous site ID to let us know that the site exists.
<br>
<localize key="analytics_minimalLevelDescription">We'll only send an anonymous site ID to let us know that the
site exists.
</localize>
</div>
<div ng-if="vm.sliderVal === 'Basic'">
<b>{{vm.sliderVal}}</b>
<br>We'll send site ID, umbraco version and packages installed
<br>
<localize key="analytics_basicLevelDescription">We'll send site ID, umbraco version and packages installed
</localize>
</div>
<div ng-if="vm.sliderVal === 'Detailed'">
<b>{{vm.sliderVal}}</b>
<br> We'll send:
<br>- Site ID, umbraco version and packages installed
<br>- System information like Server OS and Webserver
<br>- Statistics, like number of content nodes and number of media items
<br>- Configuration settings, like modelsbuilder mode and used languages
<br>
<br>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
<localize key="analytics_detailedLevelDescription">
<br> We will send:
<br>- Anonymized site ID, umbraco version, and packages installed.
<br>- Number of: Root nodes, Content nodes, Macros, Media, Document Types, Templates, Languages, Domains, User Group, Users, Members, and Property Editors in use.
<br>- System information: Webserver, server OS, server framework, server OS language, and database provider.
<br>- Configuration settings: Modelsbuilder mode, if custom Umbraco path exists, ASP environment, and if you are in debug mode.
<br>
<br><i>We might change what we send on the Detailed level in the future. If so, it will be listed above.
<br>By choosing "Detailed" you agree to current and future anonymized information being collected.</i>
</localize>
</div>
</p>
</div>
<div class="umb-panel-group__details-status-actions">
<umb-button type="button"

View File

@@ -2870,5 +2870,29 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<area alias="analytics">
<key alias="consentForAnalytics">Consent for analytics</key>
<key alias="analyticsLevelSavedSuccess">Analytics level saved!</key>
<key alias="analyticsDescription">
<![CDATA[
In order to improve Umbraco and add new functionality based on as relevant information as possible,
<br>we would like to collect system- and usage information from your installation.
<br>Aggregate data will be shared on a regular basis as well as learnings from these metrics.
<br>Hopefully, you will help us collect some valuable data.
<br>
<br>We <b>WILL NOT</b> collect any personal data such as content, code, user information, and all data will be fully anonymized.
]]>
</key>
<key alias="minimalLevelDescription">We will only send an anonymized site ID to let us know that the site exists.</key>
<key alias="basicLevelDescription">We will send an anonymized site ID, umbraco version, and packages installed</key>
<key alias="detailedLevelDescription">
<![CDATA[
<br> We will send:
<br>- Anonymized site ID, umbraco version, and packages installed.
<br>- Number of: Root nodes, Content nodes, Macros, Media, Document Types, Templates, Languages, Domains, User Group, Users, Members, and Property Editors in use.
<br>- System information: Webserver, server OS, server framework, server OS language, and database provider.
<br>- Configuration settings: Modelsbuilder mode, if custom Umbraco path exists, ASP environment, and if you are in debug mode.
<br>
<br><i>We might change what we send on the Detailed level in the future. If so, it will be listed above.
<br>By choosing "Detailed" you agree to current and future anonymized information being collected.</i>
]]>
</key>
</area>
</language>

View File

@@ -41,7 +41,7 @@
"description": "The version of Umbraco.Cms to add as PackageReference.",
"type": "parameter",
"datatype": "string",
"defaultValue": "10.0.0-rc",
"defaultValue": "10.0.0-rc1",
"replaces": "UMBRACO_VERSION_FROM_TEMPLATE"
},
"namespaceReplacer": {

View File

@@ -39,7 +39,7 @@
"description": "The version of Umbraco.Cms to add as PackageReference.",
"type": "parameter",
"datatype": "string",
"defaultValue": "10.0.0-rc",
"defaultValue": "10.0.0-rc1",
"replaces": "UMBRACO_VERSION_FROM_TEMPLATE"
},
"UseHttpsRedirect": {