New Backoffice: Fix feedback to users controller (#14031)

* Add specific not found results

* Add tests for the enable/disable not found tweak

* Cache ids and key in UserIdKeyResolver

* Don't cache null keys

* BackOffice not Backoffice

* Move fetching the user out of the ChangePasswordUsersController

* Move resolving user out of SetAvatar

* Move resolving user out of Update

* Return more specific notfound in bykey

* Use ErrorResult for all endpoints with unknown errors

* Split integration tests

* Add mappers

* Use ?: consistently

* Add reuseable iso code validator

* Validate ISO code

* Update supressions

* Use method from base to get current user key

* Rename ISo to Iso

* Use keys in services instead of user groups + Added a couple of new validations

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Mole
2023-04-04 15:41:12 +02:00
committed by GitHub
parent 6313b8b3a1
commit 21b0a7ffae
61 changed files with 731 additions and 364 deletions

View File

@@ -352,7 +352,7 @@ public class MemberControllerUnitTests
IPasswordChanger<MemberIdentityUser> passwordChanger,
bool successful = true)
{
var passwordChanged = new PasswordChangedModel { ChangeError = null, ResetPassword = null };
var passwordChanged = new PasswordChangedModel { Error = null, ResetPassword = null };
if (!successful)
{
var attempt = Attempt.Fail(passwordChanged);