fix: ensure event order in setDefaultAuthFactorsInCustomLoginPolicy (for testability) (#1595)

* fix: ensure event order (for testability)

* fix: error handling (incl. imports of wrong pkgs)
This commit is contained in:
Livio Amstutz
2021-04-15 15:30:19 +02:00
committed by GitHub
parent 8fccd7c495
commit b0681a0bbe
6 changed files with 36 additions and 19 deletions

View File

@@ -214,7 +214,7 @@ func (u *ProjectMember) getUserByID(userID string) (*usr_view_model.UserView, er
return user, nil
}
}
if userCopy.State == int32(usr_model.UserStateDeleted) {
if userCopy.State == int32(usr_model.UserStateUnspecified) || userCopy.State == int32(usr_model.UserStateDeleted) {
return nil, caos_errs.ThrowNotFound(nil, "HANDLER-m9dos", "Errors.User.NotFound")
}
return &userCopy, nil