Fixed issue with Paths-integers being converted using local culture. (#11180)

* Fixed issue with Paths-integers being converted using local culture.

* Align with the old implementation

* Use int.TryParse insteaad of TryConvertTo when we do not want culture specific parsing

* More fixes for cultures and fixed wrong test. Users should be part of all groups to have access

* Fix casing for requested file

* Force tests to not use NLS

* try force tests to not use NLS

* try force tests to not use NLS

* Force tests on windows to run ICU

* More fixes for invariant int parsing

* Change key on actions/emptyRecycleBin, so the casing aligns with the view file, that is named emptyrecyclebin.html

* Fixed casing issue

* use Attempt to align with other code
This commit is contained in:
Bjarke Berg
2021-09-24 17:42:31 +02:00
committed by GitHub
parent 936757297e
commit 452097d975
49 changed files with 174 additions and 262 deletions

View File

@@ -554,7 +554,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
// This needs to be in the correct mailto format including the name, else
// the name cannot be captured in the email sending notification.
// i.e. "Some Person" <hello@example.com>
// i.e. "Some Person" <hello@example.com>
var toMailBoxAddress = new MailboxAddress(to.Name, to.Email);
var mailMessage = new EmailMessage(fromEmail, toMailBoxAddress.ToString(), emailSubject, emailBody, true);
@@ -577,12 +577,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
return ValidationProblem(ModelState);
}
var intId = userSave.Id.TryConvertTo<int>();
if (intId.Success == false)
return NotFound();
var found = _userService.GetUserById(intId.Result);
var found = _userService.GetUserById(userSave.Id);
if (found == null)
return NotFound();
@@ -673,13 +668,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
return ValidationProblem(ModelState);
}
Attempt<int> intId = changingPasswordModel.Id.TryConvertTo<int>();
if (intId.Success == false)
{
return NotFound();
}
IUser found = _userService.GetUserById(intId.Result);
IUser found = _userService.GetUserById(changingPasswordModel.Id);
if (found == null)
{
return NotFound();