- Set your notification for{{ currentNode.name }}
+
- {{source.name}} was moved underneath {{target.name}}
+ {{source.name}}
+ was moved to
+ {{target.name}}
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
index 8d8ac8e506..383dc855fd 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
@@ -32,8 +32,11 @@
OmdøbGendanSæt rettigheder for siden %0%
+ Vælg hvor du vil kopiereVælg hvortil du vil flytte
- I træstrukturen nedenfor
+ til i træstrukturen nedenfor
+ blev flyttet til
+ blev kopieret tilRettighederFortryd ændringerSend til udgivelse
@@ -772,7 +775,8 @@
Relater det kopierede element til originalen
- Rediger dine notificeringer for %0%
+ %0%]]>
+ Notificeringer er gemt forFortryd
+ Vælg en version at sammenligne med den nuværende versionNuværende versionRød tekst vil ikke blive vist i den valgte version. Grøn betyder tilføjet]]>Dokument tilbagerullet
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
index cc4e694b3c..69f106a775 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
@@ -33,8 +33,11 @@
RenameRestoreSet permissions for the page %0%
+ Choose where to copyChoose where to move
- In the tree structure below
+ to in the tree structure below
+ was moved to
+ was copied toPermissionsRollbackSend To Publish
@@ -942,7 +945,8 @@ To manage your website, simply open the Umbraco back office and start adding con
Relate copied items to original
- Edit your notification for %0%
+ %0%]]>
+ Notification settings saved forUndo edits
+ Select a version to compare with the current versionCurrent versionRed text will not be shown in the selected version. , green means added]]>Document has been rolled back
diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
index 3235aadac4..dcf62becb5 100644
--- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
@@ -33,8 +33,11 @@
RenameRestoreSet permissions for the page %0%
+ Choose where to copyChoose where to move
- In the tree structure below
+ to in the tree structure below
+ was moved to
+ was copied toPermissionsRollbackSend To Publish
@@ -967,7 +970,8 @@ To manage your website, simply open the Umbraco back office and start adding con
Relate copied items to original
- Edit your notification for %0%
+ %0%]]>
+ Notification settings saved forUndo edits
+ Select a version to compare with the current versionCurrent versionRed text will not be shown in the selected version. , green means added]]>Document has been rolled back
@@ -2019,10 +2024,6 @@ To manage your website, simply open the Umbraco back office and start adding con
There is no 'restore' relation found for this node. Use the Move menu item to move it manually.The item you want to restore it under ('%0%') is in the recycle bin. Use the Move menu item to move the item manually.
-
- Select your notifications for
- Notification settings saved for
-
DirectionParent to child
diff --git a/src/Umbraco.Web/Editors/LogController.cs b/src/Umbraco.Web/Editors/LogController.cs
index dcd69d10b7..cc15b27977 100644
--- a/src/Umbraco.Web/Editors/LogController.cs
+++ b/src/Umbraco.Web/Editors/LogController.cs
@@ -27,7 +27,7 @@ namespace Umbraco.Web.Editors
long totalRecords;
var dateQuery = sinceDate.HasValue ? SqlContext.Query().Where(x => x.CreateDate >= sinceDate) : null;
var result = Services.AuditService.GetPagedItemsByEntity(id, pageNumber - 1, pageSize, out totalRecords, orderDirection, customFilter: dateQuery);
- var mapped = Mapper.Map>(result);
+ var mapped = result.Select(item => Mapper.Map(item));
var page = new PagedResult(totalRecords, pageNumber, pageSize)
{
@@ -56,11 +56,12 @@ namespace Umbraco.Web.Editors
private IEnumerable MapAvatarsAndNames(IEnumerable items)
{
- var userIds = items.Select(x => x.UserId).ToArray();
+ var mappedItems = items.ToList();
+ var userIds = mappedItems.Select(x => x.UserId).ToArray();
var userAvatars = Services.UserService.GetUsersById(userIds)
.ToDictionary(x => x.Id, x => x.GetUserAvatarUrls(ApplicationCache.RuntimeCache));
var userNames = Services.UserService.GetUsersById(userIds).ToDictionary(x => x.Id, x => x.Name);
- foreach (var item in items)
+ foreach (var item in mappedItems)
{
if (userAvatars.TryGetValue(item.UserId, out var avatars))
{
@@ -73,7 +74,7 @@ namespace Umbraco.Web.Editors
}
- return items;
+ return mappedItems;
}
}
}
diff --git a/src/Umbraco.Web/Editors/PasswordChanger.cs b/src/Umbraco.Web/Editors/PasswordChanger.cs
index 54c3d12ea9..6777ae1f56 100644
--- a/src/Umbraco.Web/Editors/PasswordChanger.cs
+++ b/src/Umbraco.Web/Editors/PasswordChanger.cs
@@ -96,7 +96,7 @@ namespace Umbraco.Web.Editors
{
var errors = string.Join(". ", resetResult.Errors);
_logger.Warn("Could not reset user password {PasswordErrors}", errors);
- return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not reset password, errors: " + errors, new[] { "resetPassword" }) });
+ return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult(errors, new[] { "resetPassword" }) });
}
return Attempt.Succeed(new PasswordChangedModel());
@@ -116,21 +116,30 @@ namespace Umbraco.Web.Editors
return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password cannot be changed without the old password", new[] { "oldPassword" }) });
}
- if (passwordModel.OldPassword.IsNullOrWhiteSpace() == false)
+ //get the user
+ var backOfficeIdentityUser = await userMgr.FindByIdAsync(savingUser.Id);
+ if (backOfficeIdentityUser == null)
{
- //if an old password is suplied try to change it
- var changeResult = await userMgr.ChangePasswordAsync(savingUser.Id, passwordModel.OldPassword, passwordModel.NewPassword);
- if (changeResult.Succeeded == false)
- {
- var errors = string.Join(". ", changeResult.Errors);
- _logger.Warn("Could not change user password {PasswordErrors}", errors);
- return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, errors: " + errors, new[] { "oldPassword" }) });
- }
- return Attempt.Succeed(new PasswordChangedModel());
+ //this really shouldn't ever happen... but just in case
+ return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Password could not be verified", new[] { "oldPassword" }) });
}
-
- //We shouldn't really get here
- return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Could not change password, invalid information supplied", new[] { "value" }) });
+ //is the old password correct?
+ var validateResult = await userMgr.CheckPasswordAsync(backOfficeIdentityUser, passwordModel.OldPassword);
+ if(validateResult == false)
+ {
+ //no, fail with an error message for "oldPassword"
+ return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult("Incorrect password", new[] { "oldPassword" }) });
+ }
+ //can we change to the new password?
+ var changeResult = await userMgr.ChangePasswordAsync(savingUser.Id, passwordModel.OldPassword, passwordModel.NewPassword);
+ if (changeResult.Succeeded == false)
+ {
+ //no, fail with error messages for "password"
+ var errors = string.Join(". ", changeResult.Errors);
+ _logger.Warn("Could not change user password {PasswordErrors}", errors);
+ return Attempt.Fail(new PasswordChangedModel { ChangeError = new ValidationResult(errors, new[] { "password" }) });
+ }
+ return Attempt.Succeed(new PasswordChangedModel());
}
///